nl80211: Unbreak mode processing due to presence of S1G band
If kernel advertises a band with channels < 2.4 GHz hostapd/wpa_supplicant gets confused and assumes this is an IEEE 802.11b, corrupting the real IEEE 802.11b band info. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
This commit is contained in:
parent
4b96fafcd8
commit
52a1b28345
1 changed files with 4 additions and 1 deletions
|
@ -1946,7 +1946,10 @@ wpa_driver_nl80211_postprocess_modes(struct hostapd_hw_modes *modes,
|
|||
for (m = 0; m < *num_modes; m++) {
|
||||
if (!modes[m].num_channels)
|
||||
continue;
|
||||
if (modes[m].channels[0].freq < 4000) {
|
||||
if (modes[m].channels[0].freq < 2000) {
|
||||
modes[m].num_channels = 0;
|
||||
continue;
|
||||
} else if (modes[m].channels[0].freq < 4000) {
|
||||
modes[m].mode = HOSTAPD_MODE_IEEE80211B;
|
||||
for (i = 0; i < modes[m].num_rates; i++) {
|
||||
if (modes[m].rates[i] > 200) {
|
||||
|
|
Loading…
Reference in a new issue