Path: blob/next/external/packages/extras-buildpkgs/hostapd-realtek/debian/patches/300-noscan.patch
8665 views
diff --git a/hostapd/config_file.c b/hostapd/config_file.c1index 82ac61d..3570d96 1006442--- a/hostapd/config_file.c3+++ b/hostapd/config_file.c4@@ -2795,6 +2795,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,5}6#endif /* CONFIG_IEEE80211W */7#ifdef CONFIG_IEEE80211N8+ } else if (os_strcmp(buf, "noscan") == 0) {9+ conf->noscan = atoi(pos);10} else if (os_strcmp(buf, "ieee80211n") == 0) {11conf->ieee80211n = atoi(pos);12} else if (os_strcmp(buf, "ht_capab") == 0) {13diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h14index de470a9..f2a0235 10064415--- a/src/ap/ap_config.h16+++ b/src/ap/ap_config.h17@@ -626,6 +626,7 @@ struct hostapd_config {1819int ht_op_mode_fixed;20u16 ht_capab;21+ int noscan;22int ieee80211n;23int secondary_channel;24int no_pri_sec_switch;25diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c26index fc8786d..0d5b384 10064427--- a/src/ap/hw_features.c28+++ b/src/ap/hw_features.c29@@ -472,7 +472,7 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)30struct wpa_driver_scan_params params;31int ret;3233- if (!iface->conf->secondary_channel)34+ if (!iface->conf->secondary_channel || iface->conf->noscan)35return 0; /* HT40 not used */3637hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);38diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c39index 11fde2a..87fb67b 10064440--- a/src/ap/ieee802_11_ht.c41+++ b/src/ap/ieee802_11_ht.c42@@ -221,6 +221,9 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,43if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))44return;4546+ if (iface->conf->noscan)47+ return;48+49if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie))50return;5152@@ -345,6 +348,9 @@ void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta)53if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)54return;5556+ if (iface->conf->noscan)57+ return;58+59wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR60" in Association Request", MAC2STR(sta->addr));61626364