Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong
GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/packages/extras-buildpkgs/hostapd-realtek/debian/patches/300-noscan.patch
8665 views
1
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
2
index 82ac61d..3570d96 100644
3
--- a/hostapd/config_file.c
4
+++ b/hostapd/config_file.c
5
@@ -2795,6 +2795,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
6
}
7
#endif /* CONFIG_IEEE80211W */
8
#ifdef CONFIG_IEEE80211N
9
+ } else if (os_strcmp(buf, "noscan") == 0) {
10
+ conf->noscan = atoi(pos);
11
} else if (os_strcmp(buf, "ieee80211n") == 0) {
12
conf->ieee80211n = atoi(pos);
13
} else if (os_strcmp(buf, "ht_capab") == 0) {
14
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
15
index de470a9..f2a0235 100644
16
--- a/src/ap/ap_config.h
17
+++ b/src/ap/ap_config.h
18
@@ -626,6 +626,7 @@ struct hostapd_config {
19
20
int ht_op_mode_fixed;
21
u16 ht_capab;
22
+ int noscan;
23
int ieee80211n;
24
int secondary_channel;
25
int no_pri_sec_switch;
26
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
27
index fc8786d..0d5b384 100644
28
--- a/src/ap/hw_features.c
29
+++ b/src/ap/hw_features.c
30
@@ -472,7 +472,7 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
31
struct wpa_driver_scan_params params;
32
int ret;
33
34
- if (!iface->conf->secondary_channel)
35
+ if (!iface->conf->secondary_channel || iface->conf->noscan)
36
return 0; /* HT40 not used */
37
38
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
39
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
40
index 11fde2a..87fb67b 100644
41
--- a/src/ap/ieee802_11_ht.c
42
+++ b/src/ap/ieee802_11_ht.c
43
@@ -221,6 +221,9 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
44
if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))
45
return;
46
47
+ if (iface->conf->noscan)
48
+ return;
49
+
50
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie))
51
return;
52
53
@@ -345,6 +348,9 @@ void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta)
54
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
55
return;
56
57
+ if (iface->conf->noscan)
58
+ return;
59
+
60
wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
61
" in Association Request", MAC2STR(sta->addr));
62
63
64