1 --- a/hostapd/config_file.c
2 +++ b/hostapd/config_file.c
3 @@ -2651,6 +2651,8 @@ static int hostapd_config_fill(struct ho
5 #endif /* CONFIG_IEEE80211W */
6 #ifdef CONFIG_IEEE80211N
7 + } else if (os_strcmp(buf, "noscan") == 0) {
8 + conf->noscan = atoi(pos);
9 } else if (os_strcmp(buf, "ieee80211n") == 0) {
10 conf->ieee80211n = atoi(pos);
11 } else if (os_strcmp(buf, "ht_capab") == 0) {
12 --- a/src/ap/ap_config.h
13 +++ b/src/ap/ap_config.h
14 @@ -605,6 +605,7 @@ struct hostapd_config {
20 int secondary_channel;
22 --- a/src/ap/hw_features.c
23 +++ b/src/ap/hw_features.c
24 @@ -690,7 +690,7 @@ static int ieee80211n_check_40mhz(struct
25 struct wpa_driver_scan_params params;
28 - if (!iface->conf->secondary_channel)
29 + if (!iface->conf->secondary_channel || iface->conf->noscan)
30 return 0; /* HT40 not used */
32 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
33 --- a/src/ap/ieee802_11_ht.c
34 +++ b/src/ap/ieee802_11_ht.c
35 @@ -220,6 +220,9 @@ void hostapd_2040_coex_action(struct hos
36 if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))
39 + if (iface->conf->noscan)
42 if (len < IEEE80211_HDRLEN + 1)
45 @@ -317,6 +320,9 @@ void ht40_intolerant_add(struct hostapd_
46 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
49 + if (iface->conf->noscan)
52 wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
53 " in Association Request", MAC2STR(sta->addr));