developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 1 | --- a/wpa_supplicant/config.c |
| 2 | +++ b/wpa_supplicant/config.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 3 | @@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel |
developer | 29c4d2d | 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 | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 13 | @@ -775,6 +775,7 @@ static void wpa_config_write_network(FIL |
developer | 29c4d2d | 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 | } |
| 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 |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 34 | @@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct |
developer | 505c943 | 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 | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 43 | @@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc |
developer | 505c943 | 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, |
| 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; |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame] | 52 | @@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup |
developer | 29c4d2d | 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 | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 56 | - int i, obss_scan = 1; |
| 57 | + int i, obss_scan = !(ssid->noscan); |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 58 | u8 channel; |
developer | 505c943 | 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 | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 61 | --- a/wpa_supplicant/config_ssid.h |
| 62 | +++ b/wpa_supplicant/config_ssid.h |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 63 | @@ -1035,6 +1035,8 @@ struct wpa_ssid { |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 64 | */ |
| 65 | int no_auto_peer; |
| 66 | |
| 67 | + int noscan; |
| 68 | + |
| 69 | /** |
| 70 | * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm) |
| 71 | * |