212-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch 1.9 KB

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