1 From c61daab867671af884a7bb707f9bc0f086241bcd Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Wed, 20 Jan 2010 02:26:00 +0000
4 Subject: [PATCH] Add noscan, no_ht_coex config options
6 --- a/hostapd/config_file.c
7 +++ b/hostapd/config_file.c
8 @@ -3747,6 +3747,10 @@ static int hostapd_config_fill(struct ho
9 if (bss->ocv && !bss->ieee80211w)
11 #endif /* CONFIG_OCV */
12 + } else if (os_strcmp(buf, "noscan") == 0) {
13 + conf->noscan = atoi(pos);
14 + } else if (os_strcmp(buf, "ht_coex") == 0) {
15 + conf->no_ht_coex = !atoi(pos);
16 } else if (os_strcmp(buf, "ieee80211n") == 0) {
17 conf->ieee80211n = atoi(pos);
18 } else if (os_strcmp(buf, "ht_capab") == 0) {
19 --- a/src/ap/ap_config.h
20 +++ b/src/ap/ap_config.h
21 @@ -1122,6 +1122,8 @@ struct hostapd_config {
28 int secondary_channel;
29 int no_pri_sec_switch;
30 --- a/src/ap/hw_features.c
31 +++ b/src/ap/hw_features.c
32 @@ -573,7 +573,8 @@ static int ieee80211n_check_40mhz(struct
35 /* Check that HT40 is used and PRI / SEC switch is allowed */
36 - if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
37 + if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
38 + iface->conf->noscan)
41 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
42 --- a/src/ap/ieee802_11_ht.c
43 +++ b/src/ap/ieee802_11_ht.c
44 @@ -279,6 +279,9 @@ void hostapd_2040_coex_action(struct hos
48 + if (iface->conf->noscan || iface->conf->no_ht_coex)
51 if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
53 "Ignore too short 20/40 BSS Coexistence Management frame");
54 @@ -439,6 +442,9 @@ void ht40_intolerant_add(struct hostapd_
55 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
58 + if (iface->conf->noscan || iface->conf->no_ht_coex)
61 wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
62 " in Association Request", MAC2STR(sta->addr));