]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/hostapd/hostapd-2.7-noscan.patch
Rootfile update
[ipfire-2.x.git] / src / patches / hostapd / hostapd-2.7-noscan.patch
1 diff U3 a/src/ap/ap_config.h b/src/ap/ap_config.h
2 --- a/src/ap/ap_config.h Sun Dec 2 20:34:59 2018
3 +++ b/src/ap/ap_config.h Mon Mar 4 15:58:05 2019
4 @@ -779,6 +779,8 @@
5
6 int ht_op_mode_fixed;
7 u16 ht_capab;
8 + int noscan;
9 + int no_ht_coex;
10 int ieee80211n;
11 int secondary_channel;
12 int no_pri_sec_switch;
13 diff U3 a/hostapd/config_file.c b/hostapd/config_file.c
14 --- a/hostapd/config_file.c Sun Dec 2 20:34:59 2018
15 +++ b/hostapd/config_file.c Mon Mar 4 15:56:51 2019
16 @@ -3317,6 +3317,10 @@
17 }
18 #endif /* CONFIG_IEEE80211W */
19 #ifdef CONFIG_IEEE80211N
20 + } else if (os_strcmp(buf, "noscan") == 0) {
21 + conf->noscan = atoi(pos);
22 + } else if (os_strcmp(buf, "ht_coex") == 0) {
23 + conf->no_ht_coex = !atoi(pos);
24 } else if (os_strcmp(buf, "ieee80211n") == 0) {
25 conf->ieee80211n = atoi(pos);
26 } else if (os_strcmp(buf, "ht_capab") == 0) {
27 diff U3 a/src/ap/hw_features.c b/src/ap/hw_features.c
28 --- a/src/ap/hw_features.c Sun Dec 2 20:34:59 2018
29 +++ b/src/ap/hw_features.c Mon Mar 4 15:59:08 2019
30 @@ -480,7 +480,8 @@
31 int ret;
32
33 /* Check that HT40 is used and PRI / SEC switch is allowed */
34 - if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
35 + if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
36 + iface->conf->noscan)
37 return 0;
38
39 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
40 diff U3 a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
41 --- a/src/ap/ieee802_11_ht.c Sun Dec 2 20:34:59 2018
42 +++ b/src/ap/ieee802_11_ht.c Mon Mar 4 16:02:13 2019
43 @@ -252,6 +252,9 @@
44 return;
45 }
46
47 + if (iface->conf->noscan || iface->conf->no_ht_coex)
48 + return;
49 +
50 if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
51 wpa_printf(MSG_DEBUG,
52 "Ignore too short 20/40 BSS Coexistence Management frame");
53 @@ -410,6 +413,9 @@
54 void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta)
55 {
56 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
57 + return;
58 +
59 + if (iface->conf->noscan || iface->conf->no_ht_coex)
60 return;
61
62 wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR