]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blame - src/patches/hostapd/hostapd-2.9-noscan.patch
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x
[people/mfischer/ipfire-2.x.git] / src / patches / hostapd / hostapd-2.9-noscan.patch
CommitLineData
5b2fc5d6
MT
1--- a/hostapd/config_file.c
2+++ b/hostapd/config_file.c
6491a923 3@@ -3474,6 +3474,10 @@ static int hostapd_config_fill(struct ho
5b2fc5d6 4 if (bss->ocv && !bss->ieee80211w)
3f7cec61
MF
5 bss->ieee80211w = 1;
6 #endif /* CONFIG_OCV */
d6d5999a
MF
7+ } else if (os_strcmp(buf, "noscan") == 0) {
8+ conf->noscan = atoi(pos);
9+ } else if (os_strcmp(buf, "ht_coex") == 0) {
10+ conf->no_ht_coex = !atoi(pos);
11 } else if (os_strcmp(buf, "ieee80211n") == 0) {
12 conf->ieee80211n = atoi(pos);
13 } else if (os_strcmp(buf, "ht_capab") == 0) {
5b2fc5d6
MT
14--- a/src/ap/ap_config.h
15+++ b/src/ap/ap_config.h
6491a923 16@@ -1014,6 +1014,8 @@ struct hostapd_config {
3f7cec61
MF
17
18 int ht_op_mode_fixed;
19 u16 ht_capab;
20+ int noscan;
21+ int no_ht_coex;
22 int ieee80211n;
23 int secondary_channel;
24 int no_pri_sec_switch;
5b2fc5d6
MT
25--- a/src/ap/hw_features.c
26+++ b/src/ap/hw_features.c
6491a923 27@@ -517,7 +517,8 @@ static int ieee80211n_check_40mhz(struct
d6d5999a
MF
28 int ret;
29
30 /* Check that HT40 is used and PRI / SEC switch is allowed */
31- if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
32+ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
33+ iface->conf->noscan)
34 return 0;
35
36 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
5b2fc5d6
MT
37--- a/src/ap/ieee802_11_ht.c
38+++ b/src/ap/ieee802_11_ht.c
39@@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hos
d6d5999a
MF
40 return;
41 }
42
43+ if (iface->conf->noscan || iface->conf->no_ht_coex)
44+ return;
45+
46 if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
47 wpa_printf(MSG_DEBUG,
48 "Ignore too short 20/40 BSS Coexistence Management frame");
5b2fc5d6 49@@ -390,6 +393,9 @@ void ht40_intolerant_add(struct hostapd_
d6d5999a 50 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
d6d5999a
MF
51 return;
52
5b2fc5d6
MT
53+ if (iface->conf->noscan || iface->conf->no_ht_coex)
54+ return;
55+
d6d5999a 56 wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
5b2fc5d6
MT
57 " in Association Request", MAC2STR(sta->addr));
58