On Mon, May 30, 2016 at 10:52:50AM +0100, Dimitris Papastamos wrote: > On Sun, May 29, 2016 at 08:10:02PM +0200, Stefan Sperling wrote: > > On Sun, May 29, 2016 at 01:25:02PM +0100, Dimitris Papastamos wrote: > > > Hi all, > > > > > > I recently bought a Thinkpad x250 and just noticed that IPv6 stateless > > > autoconfiguraton is not working using iwm(4). It works if I use em(4) > > > instead. > > > > > > Not sure how this could be driver related. I have a t420 running > > > current and it works with iwn(4) and em(4). > > > > > > pf was disabled during the tests. Let me know if I should try anything > > > and I will report back. > > > > Interesting. I believe I can reproduce this, but only on a WPA network. > > The router receives the router solicitation and sends an advertisement. > > It seems the advertisement is not received by iwm(4), but the driver > > does not count an input error in netstat -I iwm0. > > All works fine with iwn(4). > > > > What's odd is that unencrypted wifi doesn't seem to have this problem. > > Can you confirm this? > > I just tried with an unencrypted network and it still doesn't work. > I tried both 11g and 11n modes. > > $ ifconfig iwm0 > iwm0: flags=208843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> > mtu 1500 > lladdr 18:5e:0f:ae:37:15 > index 2 priority 4 > groups: wlan egress > media: IEEE802.11 autoselect mode 11n (HT-MCS4 mode 11n) > status: active > ieee80211: nwid ElectricKingdom chan 6 bssid ac:22:0b:32:d5:48 32% > inet6 fe80::1a5e:fff:feae:3715%iwm0 prefixlen 64 scopeid 0x2 > inet 10.0.0.6 netmask 0xffffff00 broadcast 10.0.0.255 > > I am not seeing any input errors with netstat -I iwm0 either. >
This diff should fix IPv6 and ARP on iwm(4). It seems multicast receive filter settings aren't applied correctly by the firmware without this mac_ctxt_changed function call. I had removed this function call to address a different problem reported by Imre (in Cc). So in hindsight that was not quite right. We'll have to find a different fix for that other problem (related to occasional DHCP lease failures, which I cannot reproduce). Index: if_iwm.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v retrieving revision 1.85 diff -u -p -r1.85 if_iwm.c --- if_iwm.c 28 May 2016 18:30:01 -0000 1.85 +++ if_iwm.c 3 Jun 2016 15:36:46 -0000 @@ -5994,6 +5994,11 @@ iwm_assoc(struct iwm_softc *sc) in->in_assoc = 1; + if ((error = iwm_mvm_mac_ctxt_changed(sc, in)) != 0) { + printf("%s: failed to update MAC\n", DEVNAME(sc)); + return error; + } + return 0; }