mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

* mac80211: bump to 5.8-rc2 changelog: dfe0bc8 mac80211: allow ACS restriction with fixed channel 727685c mac80211: rt2x00: define RF5592 in init_eeprom routine cfd2f3b mac80211: create channel list for fixed channel operation d1100c7 mac80211: Update to version 5.7.5-1 ed2015c mac80211: Update to version 5.8-rc2-1 a956c14 mac80211: util: don't warn on missing sband iftype data 8b3e170 hostapd: fix incorrect service name 68bf5a9 mac80211: don't kill wireless daemon on teardown 25e0ae6 mac80211: make cfg80211 testmode support optional (and disabled by default) b7727a8 mac80211: fix AQL issues 3d731fc mac80211: merge performance improvement patches * mt76: update to 2020-07-22 Signed-off-by: Felix Fietkau <nbd@nbd.name> * mac80211: allow VHT on 2.4GHz Allow VHT rate on 2.4GHz in order to use 256-QAM Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * ath10k: allow VHT on 2.4GHz Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * hostapd: add vendor_vht option hostapd has vendor_vht option to enable VHT (256-QAM) on 2.4GHz Add this option to hostapd.sh so users can enable it via uci Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * ipq807x: Refresh kernel configuration Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> * ipq807x: Add WCSS bus This is needed to build ath11k. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> * mac80211: Add ath11k This adds the Qualcomm 802.11ax wireless chipset support. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Co-authored-by: Felix Fietkau <nbd@nbd.name> Co-authored-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
103 lines
3.1 KiB
Diff
103 lines
3.1 KiB
Diff
From 978a59514ccde994b5c06e1cbb49cc8cebe6381c Mon Sep 17 00:00:00 2001
|
|
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
|
Date: Tue, 30 Jun 2020 13:53:19 +0200
|
|
Subject: [PATCH 03/19] wpa_supplicant: handle HT40 and mode downgrade in AP
|
|
mode
|
|
|
|
This patch adds some missing pieces to the interface configuration
|
|
of AP/mesh mode in wpa_supplicant.
|
|
- check for secondary channel and HT40 capability
|
|
- try to downgrade to 11b if 11g is not available
|
|
Especially with the HT40 check, this code now performs all settings,
|
|
which the deleted/duplicated mesh code did.
|
|
|
|
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
|
---
|
|
wpa_supplicant/ap.c | 49 ++++++++++++++++++++++++++++++++++++---------
|
|
1 file changed, 40 insertions(+), 9 deletions(-)
|
|
|
|
--- a/wpa_supplicant/ap.c
|
|
+++ b/wpa_supplicant/ap.c
|
|
@@ -134,6 +134,23 @@ no_vht:
|
|
}
|
|
|
|
|
|
+static struct hostapd_hw_modes *wpa_supplicant_find_hw_mode(struct wpa_supplicant *wpa_s,
|
|
+ enum hostapd_hw_mode hw_mode)
|
|
+{
|
|
+ struct hostapd_hw_modes *mode = NULL;
|
|
+ int i;
|
|
+
|
|
+ for (i = 0; i < wpa_s->hw.num_modes; i++) {
|
|
+ if (wpa_s->hw.modes[i].mode == hw_mode) {
|
|
+ mode = &wpa_s->hw.modes[i];
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ return mode;
|
|
+}
|
|
+
|
|
+
|
|
int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
|
|
struct wpa_ssid *ssid,
|
|
struct hostapd_config *conf)
|
|
@@ -147,9 +164,6 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
|
return -1;
|
|
}
|
|
|
|
- /* TODO: enable HT40 if driver supports it;
|
|
- * drop to 11b if driver does not support 11g */
|
|
-
|
|
/*
|
|
* Enable HT20 if the driver supports it, by setting conf->ieee80211n
|
|
* and a mask of allowed capabilities within conf->ht_capab.
|
|
@@ -158,17 +172,27 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
|
*/
|
|
if (wpa_s->hw.modes) {
|
|
struct hostapd_hw_modes *mode = NULL;
|
|
- int i, no_ht = 0;
|
|
+ int no_ht = 0;
|
|
|
|
wpa_printf(MSG_DEBUG,
|
|
"Determining HT/VHT options based on driver capabilities (freq=%u chan=%u)",
|
|
ssid->frequency, conf->channel);
|
|
|
|
- for (i = 0; i < wpa_s->hw.num_modes; i++) {
|
|
- if (wpa_s->hw.modes[i].mode == conf->hw_mode) {
|
|
- mode = &wpa_s->hw.modes[i];
|
|
- break;
|
|
- }
|
|
+ mode = wpa_supplicant_find_hw_mode(wpa_s, conf->hw_mode);
|
|
+
|
|
+ /* may drop drop to 11b if driver does not support 11g */
|
|
+ if (!mode && conf->hw_mode == HOSTAPD_MODE_IEEE80211G) {
|
|
+ conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
|
|
+ wpa_printf(MSG_INFO,
|
|
+ "Try downgrade to IEEE 802.11b as 802.11g is not "
|
|
+ "supported by the current hardware");
|
|
+ mode = wpa_supplicant_find_hw_mode(wpa_s, conf->hw_mode);
|
|
+ }
|
|
+
|
|
+ if (!mode) {
|
|
+ wpa_printf(MSG_ERROR,
|
|
+ "No match between requested and supported hw modes found");
|
|
+ return -1;
|
|
}
|
|
|
|
#ifdef CONFIG_HT_OVERRIDES
|
|
@@ -193,6 +217,13 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
|
HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET),
|
|
ssid->ht40);
|
|
conf->ieee80211n = 1;
|
|
+
|
|
+ if (ssid->ht40 &&
|
|
+ mode->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)
|
|
+ conf->secondary_channel = ssid->ht40;
|
|
+ else
|
|
+ conf->secondary_channel = 0;
|
|
+
|
|
#ifdef CONFIG_P2P
|
|
if (ssid->p2p_group &&
|
|
conf->hw_mode == HOSTAPD_MODE_IEEE80211A &&
|