developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 1 | --- a/wpa_supplicant/config.c |
| 2 | +++ b/wpa_supplicant/config.c |
developer | 9a58788 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 3 | @@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 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 |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 13 | @@ -775,6 +775,7 @@ static void wpa_config_write_network(FIL |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 14 | #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 | } |
developer | 70180b0 | 2023-11-14 17:01:47 +0800 | [diff] [blame^] | 27 | + if (conf->noscan) |
| 28 | + ssid->noscan = 1; |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 29 | |
| 30 | if (ssid->mesh_basic_rates == NULL) { |
| 31 | /* |
| 32 | --- a/wpa_supplicant/wpa_supplicant.c |
| 33 | +++ b/wpa_supplicant/wpa_supplicant.c |
developer | 9a58788 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 34 | @@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 35 | 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)) |
developer | 9a58788 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 43 | @@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 44 | 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, |
developer | 70180b0 | 2023-11-14 17:01:47 +0800 | [diff] [blame^] | 48 | + 1, 2, 3, 4, 5, 6, 7, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173, |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 49 | 184, 192 |
| 50 | }; |
| 51 | int ht40 = -1; |
developer | 9a58788 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 52 | @@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 53 | int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode); |
| 54 | enum hostapd_hw_mode hw_mode; |
| 55 | struct hostapd_hw_modes *mode = NULL; |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 56 | - int i, obss_scan = 1; |
| 57 | + int i, obss_scan = !(ssid->noscan); |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 58 | u8 channel; |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 59 | bool is_6ghz; |
| 60 | bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); |
developer | 70180b0 | 2023-11-14 17:01:47 +0800 | [diff] [blame^] | 61 | @@ -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); |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 70 | --- a/wpa_supplicant/config_ssid.h |
| 71 | +++ b/wpa_supplicant/config_ssid.h |
developer | 5e0a8d7 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 72 | @@ -1035,6 +1035,8 @@ struct wpa_ssid { |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 73 | */ |
| 74 | int no_auto_peer; |
| 75 | |
| 76 | + int noscan; |
| 77 | + |
| 78 | /** |
| 79 | * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm) |
| 80 | * |