aboutsummaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/patches/212-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
blob: 4c568c924cca23e526e6550dc7f765a0ba37313f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 |