]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r343340:
authorAndriy Voskoboinyk <avos@FreeBSD.org>
Mon, 28 Jan 2019 01:09:23 +0000 (01:09 +0000)
committerAndriy Voskoboinyk <avos@FreeBSD.org>
Mon, 28 Jan 2019 01:09:23 +0000 (01:09 +0000)
commit30ef7c9bbdda60569cf5163ae0d1ad61d597dede
tree8534e9cde9e173165b43fef64bf043d727a7fec0
parent3e5353bb4b8a0930dd464803d93d898d67f7fee6
MFC r343340:
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.
sys/net80211/ieee80211_scan_sta.c