developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 1 | --- a/wpa_supplicant/config.c |
| 2 | +++ b/wpa_supplicant/config.c |
developer | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 3 | @@ -2555,6 +2555,7 @@ static const struct parse_data ssid_fiel |
developer | 7b43f2d | 2022-04-29 17:53:25 +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 | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 13 | @@ -766,6 +766,7 @@ static void wpa_config_write_network(FIL |
developer | 7b43f2d | 2022-04-29 17:53:25 +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 |
developer | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 23 | @@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 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 | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 34 | @@ -2463,7 +2463,7 @@ void ibss_mesh_setup_freq(struct wpa_sup |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 35 | 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, |
developer | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 43 | @@ -2471,7 +2471,7 @@ void ibss_mesh_setup_freq(struct wpa_sup |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 44 | 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; |
developer | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 52 | @@ -2562,7 +2562,7 @@ void ibss_mesh_setup_freq(struct wpa_sup |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 53 | #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 |
developer | 198585d | 2022-09-22 17:12:54 +0800 | [diff] [blame^] | 63 | @@ -981,6 +981,8 @@ struct wpa_ssid { |
developer | 7b43f2d | 2022-04-29 17:53:25 +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 | * |