diff options
| author | Arif Hussain <arifhussain@codeaurora.org> | 2014-06-17 15:23:23 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-05-09 13:08:30 -0700 |
| commit | 62cd79d473cda37895c02c7a003bcf7c5ea03603 (patch) | |
| tree | 0d6511244ef16e4c9c1fe7042dc249c1166e6dcf | |
| parent | 425ea41b56ad11cee78cf79ef3971583f95d63cc (diff) | |
| download | android_external_wpa_supplicant_8-62cd79d473cda37895c02c7a003bcf7c5ea03603.tar.gz android_external_wpa_supplicant_8-62cd79d473cda37895c02c7a003bcf7c5ea03603.tar.bz2 android_external_wpa_supplicant_8-62cd79d473cda37895c02c7a003bcf7c5ea03603.zip | |
hostap: Provide option to disable HT20/40 COEX
Added support to disable ht2040 coex, New parameter
"ht2040_coex_disable" is added in hostapd.conf file
for disabling ht2040 coex. By default, HT2040 coex
is enabled, if user wants to disable, ht2040_coex_disable
can be set to 1.
Eg. ht2040_coex_disable=1 /* disable ht2040 coex */
ht2040_coex_disable=0 /* default,enable ht2040 coex */
Change-Id: Id460ff592648f2afb4ffec373badb7f6004b67f3
CRs-fixed: 681619
| -rw-r--r-- | hostapd/config_file.c | 8 | ||||
| -rw-r--r-- | hostapd/hostapd.conf | 8 | ||||
| -rw-r--r-- | src/ap/ap_config.h | 1 | ||||
| -rw-r--r-- | src/ap/hw_features.c | 3 | ||||
| -rw-r--r-- | src/ap/ieee802_11_ht.c | 3 |
5 files changed, 23 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 795fc370..5540059d 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2793,6 +2793,14 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->require_ht = atoi(pos); } else if (os_strcmp(buf, "obss_interval") == 0) { conf->obss_interval = atoi(pos); + } else if (os_strcmp(buf, "ht2040_coex_disable") == 0) { + int val = atoi(pos); + if (val == 1 || val == 0) { + conf->ht2040_coex_disable = val; + } else { + wpa_printf(MSG_ERROR, "ht2040_coex_disable: " + "invalid value: %d", val); + } #endif /* CONFIG_IEEE80211N */ #ifdef CONFIG_IEEE80211AC } else if (os_strcmp(buf, "ieee80211ac") == 0) { diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 6a4964e6..c9c4d7e3 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -517,6 +517,14 @@ wmm_ac_vo_acm=0 # no co-existence issues with neighboring devices are found. #obss_interval=0 +# ht2040_coex_disable: Whether to disable HT20/40 CoEx or not. If this +# entry is removed, it is same as the value set to 0, i.e., HT20/40 +# CoEx is enabled. +# 0 = enable (default) +# 1 = disable +# Note: HT20/40 CoEx is mandatory for any device supporting HT in the standard. +#ht2040_coex_disable=0 + ##### IEEE 802.11ac related configuration ##################################### # ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 6cf44c7e..71fc06e4 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -623,6 +623,7 @@ struct hostapd_config { int secondary_channel; int require_ht; int obss_interval; + int ht2040_coex_disable; u32 vht_capab; int ieee80211ac; int require_vht; diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 28324a8e..fcda6ab1 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -466,6 +466,9 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface) struct wpa_driver_scan_params params; int ret; + if (iface->conf->ht2040_coex_disable == 1) + return 0; + if (!iface->conf->secondary_channel) return 0; /* HT40 not used */ diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c index 11fde2a2..764e77b8 100644 --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c @@ -218,6 +218,9 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd, HOSTAPD_LEVEL_DEBUG, "hostapd_public_action - action=%d", mgmt->u.action.u.public_action.action); + if (iface->conf->ht2040_coex_disable == 1) + return; + if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) return; |
