4ea26b6c72f7357a23bd7e6e99216c7b5c6ec131
[15.05/openwrt.git] / package / network / services / hostapd / patches / 300-noscan.patch
1 --- a/hostapd/config_file.c
2 +++ b/hostapd/config_file.c
3 @@ -2639,6 +2639,8 @@ static int hostapd_config_fill(struct ho
4                 }
5  #endif /* CONFIG_IEEE80211W */
6  #ifdef CONFIG_IEEE80211N
7 +       } else if (os_strcmp(buf, "noscan") == 0) {
8 +               conf->noscan = atoi(pos);
9         } else if (os_strcmp(buf, "ieee80211n") == 0) {
10                 conf->ieee80211n = atoi(pos);
11         } else if (os_strcmp(buf, "ht_capab") == 0) {
12 --- a/src/ap/ap_config.h
13 +++ b/src/ap/ap_config.h
14 @@ -576,6 +576,7 @@ struct hostapd_config {
15  
16         int ht_op_mode_fixed;
17         u16 ht_capab;
18 +       int noscan;
19         int ieee80211n;
20         int secondary_channel;
21         int require_ht;
22 --- a/src/ap/hw_features.c
23 +++ b/src/ap/hw_features.c
24 @@ -690,7 +690,7 @@ static int ieee80211n_check_40mhz(struct
25         struct wpa_driver_scan_params params;
26         int ret;
27  
28 -       if (!iface->conf->secondary_channel)
29 +       if (!iface->conf->secondary_channel || iface->conf->noscan)
30                 return 0; /* HT40 not used */
31  
32         hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);