CVSROOT: /cvs Module name: src Changes by: s...@cvs.openbsd.org 2022/03/20 06:01:58
Modified files: sys/dev/ic : bwfm.c sys/dev/pci : if_iwm.c if_iwn.c if_iwx.c sys/net80211 : ieee80211_input.c ieee80211_node.h Log message: Introduce an alternative mechanism for wifi drivers to communicate the channel on which a frame was received. ieee80211_inputm() was expecting that ic->ic_bss->ni_chan would correspond to the channel which is currently being scanned. This dates back to older devices which are manually tuned to the next channel by the driver during SCAN->SCAN state transitions. However, this approach is very awkward for drivers which scan across a whole range of channels in firmware. Such drivers had an ugly workaround in place which tweaked ni_chan for each received frame. Introduce a channel number field in the Rx info struct which drivers can use to indicate the channel on which a frame was received. If this field is set, net80211 will use it instead of using the current channel of ic_bss. Use this new mechanism in all affected drivers. Tested by jmc@, sthen@, and myself on iwm(4) and iwx(4). Changes to iwn(4) and bwfm(4) are the same mechanical changes to get rid of the ni_chan tweak, and are therefore expected to work. ok sthen@ dlg@