[PATCH 2/4] wpa_supplicant: Make arrays static const in ibss_mesh_select_*
Nicolas Cavallari
nicolas.cavallari at green-communications.fr
Wed Feb 15 09:02:51 PST 2023
Signed-off-by: Nicolas Cavallari <nicolas.cavallari at green-communications.fr>
---
wpa_supplicant/wpa_supplicant.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 597288ef1..6dc581ad8 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2737,8 +2737,9 @@ static void ibss_mesh_select_40mhz(struct wpa_supplicant *wpa_s,
int chan_idx;
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
int i, j, res;
- int ht40plus[] = { 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
- 184, 192 };
+ static const int ht40plus[] = {
+ 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 184, 192
+ };
int ht40 = -1;
if (!freq->ht_enabled)
@@ -2837,10 +2838,14 @@ static bool ibss_mesh_select_80_160mhz(struct wpa_supplicant *wpa_s,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
int ieee80211_mode, bool is_6ghz) {
- int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955,
- 6035, 6115, 6195, 6275, 6355, 6435, 6515,
- 6595, 6675, 6755, 6835, 6915, 6995 };
- int bw160[] = { 5955, 6115, 6275, 6435, 6595, 6755, 6915 };
+ static const int bw80[] = {
+ 5180, 5260, 5500, 5580, 5660, 5745, 5955,
+ 6035, 6115, 6195, 6275, 6355, 6435, 6515,
+ 6595, 6675, 6755, 6835, 6915, 6995
+ };
+ static const int bw160[] = {
+ 5955, 6115, 6275, 6435, 6595, 6755, 6915
+ };
struct hostapd_freq_params vht_freq;
int i, j, k;
int chwidth, seg0, seg1;
--
2.39.1
More information about the Hostap
mailing list