Move definition of WLAN_SUPP_RATES_MAX to defs.h

Patch 460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
("wpa_supplicant: add new config params to be used with the ibss join
command") adds the definition of unsigned char
rates[WLAN_SUPP_RATES_MAX] to driver.h, which needs to have
WLAN_SUPP_RATES_MAX defined.  So it includes sta_info.h to get the
definition.

Commit c74739250a ("AP MLD: Use a helper function to check if a STA is a
non-AP MLD") makes sta_info.h include driver.h before
it defines WLAN_SUPP_RATES_MAX, causing an error:

src/drivers/driver.h:969:29: error: 'WLAN_SUPP_RATES_MAX' undeclared here (not in a function)

Move the definition of WLAN_SUPP_RATES_MAX to defs.h to ensure it gets
defined before other headers are included.  The inclusion of sta_info.h
in driver.h can be reverted as well.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Eneas U de Queiroz 2024-02-12 14:18:24 -03:00 committed by sinavir
parent 7840cec664
commit daadbcc258
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -49,10 +49,6 @@
#define WLAN_STA_PENDING_DEAUTH_CB BIT(30) #define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
#define WLAN_STA_NONERP BIT(31) #define WLAN_STA_NONERP BIT(31)
/* Maximum number of supported rates (from both Supported Rates and Extended
* Supported Rates IEs). */
#define WLAN_SUPP_RATES_MAX 32
struct hostapd_data; struct hostapd_data;
struct mbo_non_pref_chan_info { struct mbo_non_pref_chan_info {

View file

@ -63,6 +63,10 @@
WPA_KEY_MGMT_FT_FILS_SHA256 | \ WPA_KEY_MGMT_FT_FILS_SHA256 | \
WPA_KEY_MGMT_FT_FILS_SHA384) WPA_KEY_MGMT_FT_FILS_SHA384)
/* Maximum number of supported rates (from both Supported Rates and Extended
* Supported Rates IEs). */
#define WLAN_SUPP_RATES_MAX 32
static inline int wpa_key_mgmt_wpa_ieee8021x(int akm) static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
{ {
return !!(akm & (WPA_KEY_MGMT_IEEE8021X | return !!(akm & (WPA_KEY_MGMT_IEEE8021X |