diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 242179c..af7c70a 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4362,6 +4362,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, } else if (os_strcmp(buf, "wowlan_triggers") == 0) { os_free(bss->wowlan_triggers); bss->wowlan_triggers = os_strdup(pos); + } else if (os_strcmp(buf, "disable_40mhz_scan") == 0) { + conf->disable_40mhz_scan = atoi(pos); #ifdef CONFIG_FST } else if (os_strcmp(buf, "fst_group_id") == 0) { size_t len = os_strlen(pos); diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index a0a21ab..0e95eb3 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1124,6 +1124,7 @@ struct hostapd_config { } *acs_chan_bias; unsigned int num_acs_chan_bias; #endif /* CONFIG_ACS */ + int disable_40mhz_scan; struct wpabuf *lci; struct wpabuf *civic; diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 828b926..3a2b79b 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -714,9 +714,14 @@ int hostapd_check_ht_capab(struct hostapd_iface *iface) !ieee80211ac_supported_vht_capab(iface)) return -1; #endif /* CONFIG_IEEE80211AC */ - ret = ieee80211n_check_40mhz(iface); - if (ret) - return ret; + if (!iface->conf->disable_40mhz_scan) { + ret = ieee80211n_check_40mhz(iface); + if (ret) + return ret; + } else { + wpa_printf(MSG_INFO, "%s:40mhz scan disabled", + iface->conf->bss[0]->iface); + } if (!ieee80211n_allowed_ht40_channel_pair(iface)) return -1;