c72d5e115c23c04a85acb525ee4fb48128bf4034
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 301-mesh-noscan.patch
1 --- a/wpa_supplicant/config.c
2 +++ b/wpa_supplicant/config.c
3 @@ -2217,6 +2217,7 @@ static const struct parse_data ssid_fiel
4 #else /* CONFIG_MESH */
5 { INT_RANGE(mode, 0, 4) },
6 #endif /* CONFIG_MESH */
7 + { INT_RANGE(noscan, 0, 1) },
8 { INT_RANGE(proactive_key_caching, 0, 1) },
9 { INT_RANGE(disabled, 0, 2) },
10 { STR(id_str) },
11 --- a/wpa_supplicant/config_file.c
12 +++ b/wpa_supplicant/config_file.c
13 @@ -818,6 +818,7 @@ static void wpa_config_write_network(FIL
14 #endif /* IEEE8021X_EAPOL */
15 INT(mode);
16 INT(no_auto_peer);
17 + INT(noscan);
18 INT(mesh_fwding);
19 INT(frequency);
20 INT(fixed_freq);
21 --- a/wpa_supplicant/mesh.c
22 +++ b/wpa_supplicant/mesh.c
23 @@ -287,6 +287,8 @@ static int wpa_supplicant_mesh_init(stru
24 frequency);
25 goto out_free;
26 }
27 + if (ssid->noscan)
28 + conf->noscan = 1;
29 if (ssid->ht40)
30 conf->secondary_channel = ssid->ht40;
31 if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
32 --- a/wpa_supplicant/wpa_supplicant.c
33 +++ b/wpa_supplicant/wpa_supplicant.c
34 @@ -2031,12 +2031,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
35 {
36 enum hostapd_hw_mode hw_mode;
37 struct hostapd_hw_modes *mode = NULL;
38 - int ht40plus[] = { 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
39 + int ht40plus[] = { 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
40 184, 192 };
41 int vht80[] = { 36, 52, 100, 116, 132, 149 };
42 struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
43 u8 channel;
44 - int i, chan_idx, ht40 = -1, res, obss_scan = 1;
45 + int i, chan_idx, ht40 = -1, res, obss_scan = !(ssid->noscan);
46 unsigned int j, k;
47 struct hostapd_freq_params vht_freq;
48 int chwidth, seg0, seg1;
49 @@ -2106,7 +2106,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
50 return;
51
52 /* Setup higher BW only for 5 GHz */
53 - if (mode->mode != HOSTAPD_MODE_IEEE80211A)
54 + if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
55 return;
56
57 for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
58 --- a/wpa_supplicant/config_ssid.h
59 +++ b/wpa_supplicant/config_ssid.h
60 @@ -856,6 +856,8 @@ struct wpa_ssid {
61 */
62 int no_auto_peer;
63
64 + int noscan;
65 +
66 /**
67 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
68 *