alpine-repo/sakamoto/hostapd-40mhz/40mhz.patch

68 lines
2.2 KiB
Diff

--- a/src/ap/hw_features.c 2021-06-08 21:57:10.333932391 +0200
+++ b/src/ap/hw_features.c 2021-06-08 22:00:14.910183739 +0200
@@ -310,6 +310,7 @@
wpa_scan_results_free(scan_res);
iface->secondary_ch = iface->conf->secondary_channel;
+ oper40=1;
if (!oper40) {
wpa_printf(MSG_INFO, "20/40 MHz operation not permitted on "
"channel pri=%d sec=%d based on overlapping BSSes",
--- a/src/ap/ieee802_11_ht.c 2021-09-09 20:48:01.738045122 +0200
+++ b/src/ap/ieee802_11_ht.c 2021-09-09 20:51:40.823037068 +0200
@@ -299,7 +299,6 @@
HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG,
"20 MHz BSS width request bit is set in BSS coexistence information field");
- is_ht40_allowed = 0;
}
if (bc_ie->coex_param & WLAN_20_40_BSS_COEX_40MHZ_INTOL) {
@@ -309,7 +308,6 @@
HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG,
"40 MHz intolerant bit is set in BSS coexistence information field");
- is_ht40_allowed = 0;
}
/* 20/40 BSS Intolerant Channel Report element (zero or more times) */
@@ -341,38 +339,12 @@
HOSTAPD_LEVEL_DEBUG,
"20_40_INTOLERANT channel %d reported",
chan);
- is_ht40_allowed = 0;
}
data += 2 + ielen;
}
wpa_printf(MSG_DEBUG, "is_ht40_allowed=%d num_sta_ht40_intolerant=%d",
is_ht40_allowed, iface->num_sta_ht40_intolerant);
-
- if (!is_ht40_allowed &&
- (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
- if (iface->conf->secondary_channel) {
- hostapd_logger(hapd, mgmt->sa,
- HOSTAPD_MODULE_IEEE80211,
- HOSTAPD_LEVEL_INFO,
- "Switching to 20 MHz operation");
- iface->conf->secondary_channel = 0;
- ieee802_11_set_beacons(iface);
- }
- if (!iface->num_sta_ht40_intolerant &&
- iface->conf->obss_interval) {
- unsigned int delay_time;
- delay_time = OVERLAPPING_BSS_TRANS_DELAY_FACTOR *
- iface->conf->obss_interval;
- eloop_cancel_timeout(ap_ht2040_timeout, hapd->iface,
- NULL);
- eloop_register_timeout(delay_time, 0, ap_ht2040_timeout,
- hapd->iface, NULL);
- wpa_printf(MSG_DEBUG,
- "Reschedule HT 20/40 timeout to occur in %u seconds",
- delay_time);
- }
- }
}