blob: 998540198ec1a1a1c568a2efa8aa51dbdd0abc09 [file] [log] [blame]
developer7b43f2d2022-04-29 17:53:25 +08001--- a/wpa_supplicant/config.c
2+++ b/wpa_supplicant/config.c
developer198585d2022-09-22 17:12:54 +08003@@ -2555,6 +2555,7 @@ static const struct parse_data ssid_fiel
developer7b43f2d2022-04-29 17:53:25 +08004 #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
developer198585d2022-09-22 17:12:54 +080013@@ -766,6 +766,7 @@ static void wpa_config_write_network(FIL
developer7b43f2d2022-04-29 17:53:25 +080014 #endif /* IEEE8021X_EAPOL */
15 INT(mode);
16 INT(no_auto_peer);
17+ INT(noscan);
18 INT(mesh_fwding);
19 INT(frequency);
20 INT(enable_edmg);
21--- a/wpa_supplicant/mesh.c
22+++ b/wpa_supplicant/mesh.c
developer198585d2022-09-22 17:12:54 +080023@@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru
developer7b43f2d2022-04-29 17:53:25 +080024 frequency);
25 goto out_free;
26 }
27+ if (ssid->noscan)
28+ conf->noscan = 1;
29
30 if (ssid->mesh_basic_rates == NULL) {
31 /*
32--- a/wpa_supplicant/wpa_supplicant.c
33+++ b/wpa_supplicant/wpa_supplicant.c
developer198585d2022-09-22 17:12:54 +080034@@ -2463,7 +2463,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
developer7b43f2d2022-04-29 17:53:25 +080035 int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
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 bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955,
42 6035, 6115, 6195, 6275, 6355, 6435, 6515,
developer198585d2022-09-22 17:12:54 +080043@@ -2471,7 +2471,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
developer7b43f2d2022-04-29 17:53:25 +080044 int bw160[] = { 5955, 6115, 6275, 6435, 6595, 6755, 6915 };
45 struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
46 u8 channel;
47- int i, chan_idx, ht40 = -1, res, obss_scan = 1;
48+ int i, chan_idx, ht40 = -1, res, obss_scan = !(ssid->noscan);
49 unsigned int j, k;
50 struct hostapd_freq_params vht_freq;
51 int chwidth, seg0, seg1;
developer198585d2022-09-22 17:12:54 +080052@@ -2562,7 +2562,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
developer7b43f2d2022-04-29 17:53:25 +080053 #endif /* CONFIG_HE_OVERRIDES */
54
55 /* Setup higher BW only for 5 GHz */
56- if (mode->mode != HOSTAPD_MODE_IEEE80211A)
57+ if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
58 return;
59
60 for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
61--- a/wpa_supplicant/config_ssid.h
62+++ b/wpa_supplicant/config_ssid.h
developer198585d2022-09-22 17:12:54 +080063@@ -981,6 +981,8 @@ struct wpa_ssid {
developer7b43f2d2022-04-29 17:53:25 +080064 */
65 int no_auto_peer;
66
67+ int noscan;
68+
69 /**
70 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
71 *