blob: ceb6d0c161f50b7624baea66bdb3a3b2c08f0413 [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 }
developerbf0f2d62023-11-14 17:01:47 +080027+ if (conf->noscan)
28+ ssid->noscan = 1;
developer29c4d2d2022-12-26 19:41:22 +080029
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,
developerbf0f2d62023-11-14 17:01:47 +080048+ 1, 2, 3, 4, 5, 6, 7, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
developer505c9432023-05-12 18:58:17 +080049 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);
developerbf0f2d62023-11-14 17:01:47 +080061@@ -3080,6 +3080,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
62 freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode,
63 ieee80211_mode);
64 freq->channel = channel;
65+ if (mode->mode == HOSTAPD_MODE_IEEE80211G && ssid->noscan)
66+ ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
67 /* Setup higher BW only for 5 GHz */
68 if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
69 ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
developer29c4d2d2022-12-26 19:41:22 +080070--- a/wpa_supplicant/config_ssid.h
71+++ b/wpa_supplicant/config_ssid.h
developer505c9432023-05-12 18:58:17 +080072@@ -1035,6 +1035,8 @@ struct wpa_ssid {
developer29c4d2d2022-12-26 19:41:22 +080073 */
74 int no_auto_peer;
75
76+ int noscan;
77+
78 /**
79 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
80 *