blob: 6b5416f0ea57ec73b85d7bd6d8cc17fc3465be8f [file] [log] [blame]
developer29c4d2d2022-12-26 19:41:22 +08001--- a/wpa_supplicant/config.c
2+++ b/wpa_supplicant/config.c
developer8bff6472023-07-17 11:11:44 +08003@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
developer29c4d2d2022-12-26 19:41:22 +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
developer505c9432023-05-12 18:58:17 +080013@@ -775,6 +775,7 @@ static void wpa_config_write_network(FIL
developer29c4d2d2022-12-26 19:41:22 +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
23@@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru
24 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
developer8bff6472023-07-17 11:11:44 +080034@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
developer505c9432023-05-12 18:58:17 +080035 const struct wpa_ssid *ssid,
36 struct hostapd_hw_modes *mode)
37 {
38- if (mode->mode != HOSTAPD_MODE_IEEE80211A)
39+ if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
40 return false;
41
42 if (!drv_supports_vht(wpa_s, ssid))
developer8bff6472023-07-17 11:11:44 +080043@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
developer505c9432023-05-12 18:58:17 +080044 int i, res;
45 unsigned int j;
46 static const int ht40plus[] = {
47- 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
48+ 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
49 184, 192
50 };
51 int ht40 = -1;
developer8bff6472023-07-17 11:11:44 +080052@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
developer29c4d2d2022-12-26 19:41:22 +080053 int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
54 enum hostapd_hw_mode hw_mode;
55 struct hostapd_hw_modes *mode = NULL;
developer505c9432023-05-12 18:58:17 +080056- int i, obss_scan = 1;
57+ int i, obss_scan = !(ssid->noscan);
developer29c4d2d2022-12-26 19:41:22 +080058 u8 channel;
developer505c9432023-05-12 18:58:17 +080059 bool is_6ghz;
60 bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
developer29c4d2d2022-12-26 19:41:22 +080061--- a/wpa_supplicant/config_ssid.h
62+++ b/wpa_supplicant/config_ssid.h
developer505c9432023-05-12 18:58:17 +080063@@ -1035,6 +1035,8 @@ struct wpa_ssid {
developer29c4d2d2022-12-26 19:41:22 +080064 */
65 int no_auto_peer;
66
67+ int noscan;
68+
69 /**
70 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
71 *