aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-02 08:39:19 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-02 08:39:19 +0000
commitced63a693f3a9688277738fa6f2c3cb01167a253 (patch)
tree5e02acac3968c4f305b48db158647be99b42c93a
parent6b7c96dad30a215a5a4c774c5c62a2129c93c9d0 (diff)
downloadmaster-187ad058-ced63a693f3a9688277738fa6f2c3cb01167a253.tar.gz
master-187ad058-ced63a693f3a9688277738fa6f2c3cb01167a253.tar.bz2
master-187ad058-ced63a693f3a9688277738fa6f2c3cb01167a253.zip
hostapd: add a new option to control HT coexistance separate from noscan
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45873 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/services/hostapd/files/netifd.sh6
-rw-r--r--package/network/services/hostapd/patches/300-noscan.patch11
2 files changed, 11 insertions, 6 deletions
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 23d2e7e83e..3647b2907f 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -52,7 +52,7 @@ hostapd_common_add_device_config() {
config_add_array supported_rates
config_add_string country
- config_add_boolean country_ie doth
+ config_add_boolean country_ie doth ht_coex
config_add_string require_mode
hostapd_add_log_config
@@ -65,13 +65,15 @@ hostapd_prepare_device_config() {
local base="${config%%.conf}"
local base_cfg=
- json_get_vars country country_ie beacon_int doth require_mode
+ json_get_vars country country_ie beacon_int doth require_mode ht_coex
hostapd_set_log_options base_cfg
set_default country_ie 1
set_default doth 1
+ set_default ht_coex 0
+ append base_cfg "ht_coex=$ht_coex" "$N"
[ -n "$country" ] && {
append base_cfg "country_code=$country" "$N"
diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch
index 5b30abcc60..57d8fe27bf 100644
--- a/package/network/services/hostapd/patches/300-noscan.patch
+++ b/package/network/services/hostapd/patches/300-noscan.patch
@@ -1,21 +1,24 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2771,6 +2771,8 @@ static int hostapd_config_fill(struct ho
+@@ -2771,6 +2771,10 @@ static int hostapd_config_fill(struct ho
}
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_IEEE80211N
+ } else if (os_strcmp(buf, "noscan") == 0) {
+ conf->noscan = atoi(pos);
++ } else if (os_strcmp(buf, "ht_coex") == 0) {
++ conf->no_ht_coex = !atoi(pos);
} else if (os_strcmp(buf, "ieee80211n") == 0) {
conf->ieee80211n = atoi(pos);
} else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -619,6 +619,7 @@ struct hostapd_config {
+@@ -619,6 +619,8 @@ struct hostapd_config {
int ht_op_mode_fixed;
u16 ht_capab;
+ int noscan;
++ int no_ht_coex;
int ieee80211n;
int secondary_channel;
int require_ht;
@@ -36,7 +39,7 @@
if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))
return;
-+ if (iface->conf->noscan)
++ if (iface->conf->noscan || iface->conf->no_ht_coex)
+ return;
+
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie))
@@ -46,7 +49,7 @@
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
return;
-+ if (iface->conf->noscan)
++ if (iface->conf->noscan || iface->conf->no_ht_coex)
+ return;
+
wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR