Re: iwlwifi: Really hard to connect to networks

From: <ltning-freebsd-wireless_at_anduin.net>
Date: Tue, 02 Sep 2025 09:21:58 UTC
On 9/1/25 04:31, Bjoern A. Zeeb wrote:
> On Sat, 30 Aug 2025, ltning-freebsd-wireless@anduin.net wrote:
> 
>>> Yes, I saw that too.  If it happens again after the update wee need to
>>> see. Could be from changing bands; I need to go and have a look about
>>> that.  If it was crypto related there's also a catch for that in main.
>>
>> Attached dmesg from boot right now. The interface did not come up 
>> properly until I did a "service netif restart wlan0" (not included in 
>> the dmesg).
>>
>> Gotta run now, can collect more debug info later.. Hope this helps, 
>> though!
> 
> So two issues:
> 
> (1) you see beacons yet the firmware says you are not...
> 
> iwlwifi0: Not associated and the session protection is over already...
> iwlwifi0: linuxkpi_ieee80211_connection_loss: vif 0xfffffe01e11f0f00 vap 
> 0xfffffe01e11f0010 state AUTH (synched 1, assoc 0 beacons 13 dtim_period 1)
> wlan0: link state changed to UP
> iwlwifi0: linuxkpi_ieee80211_beacon_loss: vif 0xfffffe01e11f0f00 vap 
> 0xfffffe01e11f0010 state RUN (synched 1, assoc 1 beacons 4 dtim_period 1)
> wlan0: link state changed to DOWN
> iwlwifi0: Not associated and the session protection is over already...
> iwlwifi0: linuxkpi_ieee80211_connection_loss: vif 0xfffffe01e11f0f00 vap 
> 0xfffffe01e11f0010 state AUTH (synched 1, assoc 0 beacons 6 dtim_period 1)
> 
> As you can see:
> (a) in all cases LinuxKPI 802.11 thinks it is in synch with net8011
> (b) in all cases we have received beacons
> (c) in the middle case we are still assoc (RUN state) as it is a
>      beacon loss reported by firmware/driver
> (d) in all cases we do have a dtim period set.
> 
>   I wonder why in the AUTH state.  LinuxKPI does reset it.
> Seems like we should only update from net80211 if we get assoc
> as net80211 will always have it set after scan.  I'll prepare a
> patch.
> The reason is that (at least for iwlwifi) that change notification
> will be checked to my memory and if it happend earlier there's no
> more state change.
> 
> 
> (2) firmware crash after this due to ampdu-rx;  I thought that is
>      disabled but I have a further change to put in to help this;
> 
> Hope to make both during Monday, so yes, your log helps!
> Thanks a lot for updating and testing and reporting back.

In case it's useful, here's logs from a cold boot (dead battery) - it 
needs a "service netif restart" before it gets a DHCP lease, despite 
claiming to be associated. And now I'm connected at 2.4GHz again.

Should I git pull and rebuild?

/Eirik