HomeFreeBSD

net80211: fix channel list construction for non-auto operating mode.

Description

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

Details

Provenance
avosAuthored on
Parents
rS343339: Silence Clang Scan warning about use of unitialized variable.
Branches
Unknown
Tags
Unknown