]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net80211: fix channel list construction for non-auto operating mode.
authoravos <avos@FreeBSD.org>
Wed, 23 Jan 2019 12:43:46 +0000 (12:43 +0000)
committeravos <avos@FreeBSD.org>
Wed, 23 Jan 2019 12:43:46 +0000 (12:43 +0000)
commit35a19e7ffdaacce8760ac9651003e2d72f580fa2
tree01341c7491bbcc673fbb2e43731a307ca931f488
parentc13a54f858c0bf2ba773bdadf078de5982ccb812
net80211: fix channel list construction for non-auto operating mode.

Change the way how channel list mode <-> desired mode match is done:
- Match channel list mode for next non-auto desired modes:
 * 11b: 11g, 11ng, 11acg;
 * 11a: 11na, 11ac
- Add pre-defined channels only when one of the next conditions met:
 * the desired channel mode is 'auto' or
 * the desired channel and selected channel list modes are exactly
the same or
 * the previous rule (11g / 11n / 11ac promotion) applies.

Before r275875 construction work properly for all except
11ng / 11na / 11acg / 11ac modes - these were broken at all
(i.e., the scan list was empty); after r275875 all checks were removed,
so scan table was populated by all device-compatible channels
(desired mode was ignored).

For example, if I will set 'ifconfig wlan0 mode 11ng' for RTL8821AU:
- pre-r275875: nothing, scan will not work;
- after r275875: both 11ng and 11na bands were scanned; also, since 11b
channel list was used, 14th channel was scanned too.
- after this change: only 11ng - 1-13 channels - are used for scanning.

Tested with:
 * RTL8188EE, STA mode.
 * RTL8821AU, STA mode.

MFC after: 5 days
sys/net80211/ieee80211_scan_sta.c