mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 17:31:27 +00:00
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
From 47dec75fa3e1ac2156fe0edf9c80ba06e309cb0e Mon Sep 17 00:00:00 2001
|
|
From: Sven Eckelmann <seckelmann@datto.com>
|
|
Date: Mon, 1 Jul 2019 15:34:08 +0200
|
|
Subject: [PATCH] nl80211: Don't force VHT channel definition with HE
|
|
|
|
HE (802.11ax) is also supported on 2.4GHz. And the 2.4GHz band isn't
|
|
supposed to use VHT opers. Some codepaths in wpa_supplicant will therefore
|
|
not initialize the freq->bandwidth or the freq->center_freq1/2 members. As
|
|
a result, the nl80211_put_freq_params will directly return an error (-1) or
|
|
the kernel will return an error due to the invalid channel definition.
|
|
|
|
Instead, the channel definitions should be created based on the actual
|
|
HT/VHT/none information on 2.4GHz.
|
|
|
|
Fixes: ad9a1bfe788e ("nl80211: Share VHT channel configuration for HE")
|
|
Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
|
|
---
|
|
src/drivers/driver_nl80211.c | 13 ++++++++++++-
|
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
--- a/src/drivers/driver_nl80211.c
|
|
+++ b/src/drivers/driver_nl80211.c
|
|
@@ -4633,8 +4633,8 @@ static int nl80211_put_freq_params(struc
|
|
wpa_printf(MSG_DEBUG, " * ht_enabled=%d", freq->ht_enabled);
|
|
|
|
hw_mode = ieee80211_freq_to_chan(freq->freq, &channel);
|
|
- is_24ghz = hw_mode == HOSTAPD_MODE_IEEE80211G ||
|
|
- hw_mode == HOSTAPD_MODE_IEEE80211B;
|
|
+ is_24ghz = ((hw_mode == HOSTAPD_MODE_IEEE80211G) ||
|
|
+ (hw_mode == HOSTAPD_MODE_IEEE80211B));
|
|
|
|
if (freq->vht_enabled || (freq->he_enabled && !is_24ghz)) {
|
|
enum nl80211_chan_width cw;
|