wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/d00-003-wpa-supplicant-override-HE-toVHT-2G.patch
Felix Fietkau 5b397d54ce wifi-ax: backport hostapd reload support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:34 +02:00

60 lines
1.7 KiB
Diff

--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -1121,7 +1121,6 @@ struct wpa_ssid {
* FT initial mobility domain association.
*/
int ft_eap_pmksa_caching;
-
/**
* beacon_prot - Whether Beacon protection is enabled
*
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2521,16 +2521,14 @@ void ibss_mesh_setup_freq(struct wpa_sup
return;
/* Allow HE on 2.4 GHz without VHT: see nl80211_put_freq_params() */
- if (is_24ghz)
- freq->he_enabled = mode->he_capab[ieee80211_mode].he_supported;
+ if (is_24ghz) {
#ifdef CONFIG_HE_OVERRIDES
- if (is_24ghz && ssid->disable_he)
- freq->he_enabled = 0;
+ if (ssid->disable_he)
+ freq->he_enabled = 0;
+ else
#endif /* CONFIG_HE_OVERRIDES */
-
- /* Setup higher BW only for 5 GHz */
- if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
- return;
+ freq->he_enabled = mode->he_capab[ieee80211_mode].he_supported;
+ }
for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
pri_chan = &mode->channels[chan_idx];
@@ -2626,6 +2624,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
wpa_scan_results_free(scan_res);
}
+#ifdef CONFIG_HE_OVERRIDES
+skip_vht80:
+ if (ssid->disable_he)
+ vht_freq.he_enabled = 0;
+#endif /* CONFIG_HE_OVERRIDES */
#ifdef CONFIG_HT_OVERRIDES
skip_ht40:
@@ -2658,6 +2661,11 @@ skip_ht40:
/* Enable HE with VHT for 5 GHz */
freq->he_enabled = mode->he_capab[ieee80211_mode].he_supported;
+#ifdef CONFIG_HE_OVERRIDES
+ if (is_24ghz)
+ goto skip_vht80;
+#endif /* CONFIG_HE_OVERRIDES */
+
/* setup center_freq1, bandwidth */
for (j = 0; j < ARRAY_SIZE(vht80); j++) {
if (freq->channel >= vht80[j] &&