Page MenuHomeFreeBSD

LinuxKPI: 802.11: try to avoid firmware crashes with sta bw > channel width
ClosedPublic

Authored by bz on Apr 10 2025, 3:30 PM.
Tags
None
Referenced Files
F116939453: D49761.diff
Mon, May 12, 6:04 AM
Unknown Object (File)
Sun, May 11, 6:02 AM
Unknown Object (File)
Thu, May 1, 10:06 AM
Unknown Object (File)
Wed, Apr 30, 1:33 PM
Unknown Object (File)
Wed, Apr 30, 10:27 AM
Unknown Object (File)
Mon, Apr 28, 3:14 AM
Unknown Object (File)
Wed, Apr 23, 1:46 PM
Unknown Object (File)
Tue, Apr 22, 11:35 PM
Subscribers

Details

Summary
LinuxKPI: 802.11: try to limit VHT (11ac) to 5Ghz

We have multiple reports for iwlwifi firmware crashes where net80211
logged:
ieee80211_sta_join: BSS xx:xx:xx:xx:xx:xx: 2GHz channel, VHT info; ignoring

Make sure when we sync from net80211 or set state that we only do
VHT if we are on the 5Ghz band.  This change is likely helpful
whether it fixes the originally reported problems or not.

Sponsored by:	The FreeBSD Foundation
Reported by:	Jonathan Vasquez (jon xyinn.org)
Reported by:	Michael Butler (imb protected-networks.net)
Reported by:	others (fw crash w/o net80211 logging)
MFC after:	3 days

LinuxKPI: 802.11: optimize mo_bss_info_changed

In case we are not announcing any changes there is no need to do a
downcall into the driver.  Catch that with an early return.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days

LinuxKPI: 802.11: deal with sta bw > channel width

Especially on 2.4Ghz everything may indicate that we can use HT40
but we are stuck on a 20Mhz channel.  Adjust the logic in
lkpi_sta_sync_ht_from_ni() to also check the channel width before
setting the sta bandwidth to 40.

Further check that the sta bw is not larger than the channel width
after the 'sync from ni' for HT and VHT and if it is, then update
the chanctx accordingly.

Firmware crashes we have seen with
iwlwifi0: 0x00010000 | umac data1
iwlwifi0: 0x00000000 | umac data2
iwlwifi0: 0xDEADBEEF | umac data3
iwlwifi0: 0xXXXX050F | last host cmd
likely indicate this problem.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reported by:	Jonathan Vasquez (jon xyinn.org)
Reported by:	Michael Butler (imb protected-networks.net)
Reported by:	bapt
Reported by:	William D Pool (rotaechojunk gmail.com)
Reported by:	Eirik (ltning-freebsd-wireless anduin.net)
Reported by:	likely others before

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Apr 10 2025, 3:30 PM
bz created this revision.
bz retitled this revision from LinuxKPI: 802.11: try to avoid firmware crashes with sta bw > channel width ``` LinuxKPI: 802.11: try to limit VHT (11ac) to 5Ghz to LinuxKPI: 802.11: try to avoid firmware crashes with sta bw > channel width.Apr 10 2025, 3:31 PM
bz edited the summary of this revision. (Show Details)
bz edited the summary of this revision. (Show Details)
bz removed a subscriber: linuxkpi.
bz planned changes to this revision.Apr 11 2025, 11:10 AM
bz added inline comments.
sys/compat/linuxkpi/common/src/linux_80211.c
520

This must not be run when called from lkpi_lsta_alloc as net80211 can call us at weird times still. I need to sit down and fix net80211 state machine bits.

Avoid updating the chanctx from noce allocation; see comment in the code

This revision was not accepted when it landed; it landed in state Needs Review.Apr 11 2025, 9:28 PM
This revision was automatically updated to reflect the committed changes.