]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: Address some corner cases in scan result channel updating
authorJouni Malinen <jouni@codeaurora.org>
Wed, 5 Sep 2018 15:52:22 +0000 (18:52 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 10 Sep 2018 07:13:09 +0000 (09:13 +0200)
commitbaac014e657aee0552f3533ad43ba4db971f3d31
tree9e4961b9a37065065ef15d29a166e7f7d06d4fc4
parentc537ed12544f05b2106891b221f1249f8c1c02e4
cfg80211: Address some corner cases in scan result channel updating

cfg80211_get_bss_channel() is used to update the RX channel based on the
available frame payload information (channel number from DSSS Parameter
Set element or HT Operation element). This is needed on 2.4 GHz channels
where frames may be received on neighboring channels due to overlapping
frequency range.

This might of some use on the 5 GHz band in some corner cases, but
things are more complex there since there is no n:1 or 1:n mapping
between channel numbers and frequencies due to multiple different
starting frequencies in different operating classes. This could result
in ieee80211_channel_to_frequency() returning incorrect frequency and
ieee80211_get_channel() returning incorrect channel information (or
indication of no match). In the previous implementation, this could
result in some scan results being dropped completely, e.g., for the 4.9
GHz channels. That prevented connection to such BSSs.

Fix this by using the driver-provided channel pointer if
ieee80211_get_channel() does not find matching channel data for the
channel number in the frame payload and if the scan is done with 5 MHz
or 10 MHz channel bandwidth. While doing this, also add comments
describing what the function is trying to achieve to make it easier to
understand what happens here and why.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c