hostapd: update to 2023-03-29
[openwrt/staging/dedeckeh.git] / package / network / services / hostapd / patches / 301-mesh-noscan.patch
1 --- a/wpa_supplicant/config.c
2 +++ b/wpa_supplicant/config.c
3 @@ -2599,6 +2599,7 @@ static const struct parse_data ssid_fiel
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
13 @@ -775,6 +775,7 @@ static void wpa_config_write_network(FIL
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
34 @@ -2693,7 +2693,7 @@ static bool ibss_mesh_can_use_vht(struct
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))
43 @@ -2766,7 +2766,7 @@ static void ibss_mesh_select_40mhz(struc
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;
52 @@ -3016,7 +3016,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
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;
56 - int i, obss_scan = 1;
57 + int i, obss_scan = !(ssid->noscan);
58 u8 channel;
59 bool is_6ghz;
60 bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
61 --- a/wpa_supplicant/config_ssid.h
62 +++ b/wpa_supplicant/config_ssid.h
63 @@ -1035,6 +1035,8 @@ struct wpa_ssid {
64 */
65 int no_auto_peer;
66
67 + int noscan;
68 +
69 /**
70 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
71 *