1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Mon, 12 Feb 2024 14:18:24 -0300
4 Subject: [PATCH] Move definition of WLAN_SUPP_RATES_MAX to defs.h
6 Patch 460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
7 ("wpa_supplicant: add new config params to be used with the ibss join
8 command") adds the definition of unsigned char
9 rates[WLAN_SUPP_RATES_MAX] to driver.h, which needs to have
10 WLAN_SUPP_RATES_MAX defined. So it includes sta_info.h to get the
13 Commit c74739250a ("AP MLD: Use a helper function to check if a STA is a
14 non-AP MLD") makes sta_info.h include driver.h before
15 it defines WLAN_SUPP_RATES_MAX, causing an error:
17 src/drivers/driver.h:969:29: error: 'WLAN_SUPP_RATES_MAX' undeclared here (not in a function)
19 Move the definition of WLAN_SUPP_RATES_MAX to defs.h to ensure it gets
20 defined before other headers are included. The inclusion of sta_info.h
21 in driver.h can be reverted as well.
23 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
25 src/ap/sta_info.h | 4 ----
26 src/common/defs.h | 4 ++++
27 src/drivers/driver.h | 1 -
28 wpa_supplicant/config_ssid.h | 1 -
29 4 files changed, 4 insertions(+), 6 deletions(-)
31 --- a/src/ap/sta_info.h
32 +++ b/src/ap/sta_info.h
34 #define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
35 #define WLAN_STA_NONERP BIT(31)
37 -/* Maximum number of supported rates (from both Supported Rates and Extended
38 - * Supported Rates IEs). */
39 -#define WLAN_SUPP_RATES_MAX 32
43 struct mbo_non_pref_chan_info {
44 --- a/src/common/defs.h
45 +++ b/src/common/defs.h
47 WPA_KEY_MGMT_FT_FILS_SHA256 | \
48 WPA_KEY_MGMT_FT_FILS_SHA384)
50 +/* Maximum number of supported rates (from both Supported Rates and Extended
51 + * Supported Rates IEs). */
52 +#define WLAN_SUPP_RATES_MAX 32
54 static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
56 return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
57 --- a/src/drivers/driver.h
58 +++ b/src/drivers/driver.h
61 #define WPA_SUPPLICANT_DRIVER_VERSION 4
63 -#include "ap/sta_info.h"
64 #include "common/defs.h"
65 #include "common/ieee802_11_defs.h"
66 #include "common/wpa_common.h"
67 --- a/wpa_supplicant/config_ssid.h
68 +++ b/wpa_supplicant/config_ssid.h
72 #include "common/defs.h"
73 -#include "ap/sta_info.h"
74 #include "utils/list.h"
75 #include "eap_peer/eap_config.h"
76 #include "drivers/nl80211_copy.h"