iwm: loosing connection to AP very often

From: <freebsd_at_walstatt-de.de>
Date: Sun, 12 Sep 2021 09:29:24 UTC
Hello.

I observe a very negative and unpleasant development and behaviour with Intel iwm driver
in FreeBSD recently. Using this WiFi adapter in a Lenovo E540 (technical specs see below,
output of pciconf -lvbc), this adapter ran stable with FreeBSD 12-CURRENT some time ago,
until I moved to 13-STABLE on that notebook.

I use a "typical" wlan0/re0/lagg0 configuration on that notebook, since I have to switch
very often between WiFi and wired LAN. The FreeBSD 13-STABLE (most recent incarnation) is
configured dual stack IPv4 and IPv6.

The overall observation is that the WiFi connection is, no matter what kind of AP I used
to be connected to, that the connection is highly unstable! While ifconfig still reports
attached IPs (both IPv4 and IPv6) on lagg0 and allegedly beeing associated via wlan0 to
the AP, there is no connection any more and the only salvation is service netif restart
or bringin down and up IF and all associated services. This problem gets worse, the more
the WiFi is crowded with other stations, but even in sparsely populated WiFi areas the
loose of connection/association is only a matter of time, sometimes the death of the
connection comes rather quickly.

I can only report my observations. I used to use the very same notebook with FreeBSD
CURRENT and lately with 13-STABLE with FreeBSD since I purchased it in 2014 and used the
same wlan0/re0/lagg0 configuration I use these days, but with I never faced an
instability like the reported with 12-STABLE I face with 13-STABLE. The problem is
present almost 1 1/2 years for now and even with newer commits to WiFi in FreeBSD I did
not see a mitigation.

I also realized that iwm() is limited by its FreeBSD driver to 802.11b and 802.11g,
although it claims to be an 802.11ac driver. Is this about to change in a measurable
timeframe for a human lifetime?

Thanks a lot,

oh

[...]
iwm0@pci0:5:0:0:        class=0x028000 rev=0x73 hdr=0x00 vendor=0x8086 device=0x08b2
subvendor=0x8086 subdevice=0x4262 vendor     = 'Intel Corporation'
    device     = 'Wireless 7260'
    class      = network
    bar   [10] = type Memory, range 64, base 0xf1c00000, size 8192, enabled
    cap 01[c8] = powerspec 3  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[40] = PCI-Express 2 endpoint max data 128(128) FLR RO NS
                 max read 128
                 link x1(x1) speed 2.5(2.5) ASPM L1(L0s/L1) ClockPM enabled
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0003[140] = Serial 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ecap 0018[14c] = LTR 1
    ecap 000b[154] = Vendor [1] ID cafe Rev 1 Length 20