openwrt/package/network/services/hostapd/patches/212-Move-definition-of-WLAN...

57 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cotequeiroz@gmail.com>
Date: Mon, 12 Feb 2024 14:18:24 -0300
Subject: [PATCH] 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>
---
src/ap/sta_info.h | 4 ----
src/common/defs.h | 4 ++++
src/drivers/driver.h | 1 -
wpa_supplicant/config_ssid.h | 1 -
4 files changed, 4 insertions(+), 6 deletions(-)
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -49,10 +49,6 @@
#define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
#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 mbo_non_pref_chan_info {
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -63,6 +63,10 @@
WPA_KEY_MGMT_FT_FILS_SHA256 | \
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)
{
return !!(akm & (WPA_KEY_MGMT_IEEE8021X |