0038-wifi-ath11k-modify-accessor-macros-to-match-index-si.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From a96f10422e74cde27c100b321b127ec32ae75747 Mon Sep 17 00:00:00 2001
  2. From: Muna Sinada <quic_msinada@quicinc.com>
  3. Date: Fri, 24 Feb 2023 12:28:03 +0200
  4. Subject: [PATCH] wifi: ath11k: modify accessor macros to match index size
  5. HE PHY is only 11 bytes, therefore it should be using byte indexes
  6. instead of dword. Change corresponding macros to reflect this.
  7. Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
  8. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  9. Link: https://lore.kernel.org/r/1666128501-12364-2-git-send-email-quic_msinada@quicinc.com
  10. ---
  11. drivers/net/wireless/ath/ath11k/wmi.h | 24 +++++++++++++-----------
  12. 1 file changed, 13 insertions(+), 11 deletions(-)
  13. --- a/drivers/net/wireless/ath/ath11k/wmi.h
  14. +++ b/drivers/net/wireless/ath/ath11k/wmi.h
  15. @@ -2859,30 +2859,32 @@ struct rx_reorder_queue_remove_params {
  16. #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
  17. #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
  18. -#define HECAP_PHYDWORD_0 0
  19. -#define HECAP_PHYDWORD_1 1
  20. -#define HECAP_PHYDWORD_2 2
  21. +#define HE_PHYCAP_BYTE_0 0
  22. +#define HE_PHYCAP_BYTE_1 1
  23. +#define HE_PHYCAP_BYTE_2 2
  24. +#define HE_PHYCAP_BYTE_3 3
  25. +#define HE_PHYCAP_BYTE_4 4
  26. -#define HECAP_PHY_SU_BFER BIT(31)
  27. +#define HECAP_PHY_SU_BFER BIT(7)
  28. #define HECAP_PHY_SU_BFEE BIT(0)
  29. #define HECAP_PHY_MU_BFER BIT(1)
  30. -#define HECAP_PHY_UL_MUMIMO BIT(22)
  31. -#define HECAP_PHY_UL_MUOFDMA BIT(23)
  32. +#define HECAP_PHY_UL_MUMIMO BIT(6)
  33. +#define HECAP_PHY_UL_MUOFDMA BIT(7)
  34. #define HECAP_PHY_SUBFMR_GET(hecap_phy) \
  35. - FIELD_GET(HECAP_PHY_SU_BFER, hecap_phy[HECAP_PHYDWORD_0])
  36. + FIELD_GET(HECAP_PHY_SU_BFER, hecap_phy[HE_PHYCAP_BYTE_3])
  37. #define HECAP_PHY_SUBFME_GET(hecap_phy) \
  38. - FIELD_GET(HECAP_PHY_SU_BFEE, hecap_phy[HECAP_PHYDWORD_1])
  39. + FIELD_GET(HECAP_PHY_SU_BFEE, hecap_phy[HE_PHYCAP_BYTE_4])
  40. #define HECAP_PHY_MUBFMR_GET(hecap_phy) \
  41. - FIELD_GET(HECAP_PHY_MU_BFER, hecap_phy[HECAP_PHYDWORD_1])
  42. + FIELD_GET(HECAP_PHY_MU_BFER, hecap_phy[HE_PHYCAP_BYTE_4])
  43. #define HECAP_PHY_ULMUMIMO_GET(hecap_phy) \
  44. - FIELD_GET(HECAP_PHY_UL_MUMIMO, hecap_phy[HECAP_PHYDWORD_0])
  45. + FIELD_GET(HECAP_PHY_UL_MUMIMO, hecap_phy[HE_PHYCAP_BYTE_2])
  46. #define HECAP_PHY_ULOFDMA_GET(hecap_phy) \
  47. - FIELD_GET(HECAP_PHY_UL_MUOFDMA, hecap_phy[HECAP_PHYDWORD_0])
  48. + FIELD_GET(HECAP_PHY_UL_MUOFDMA, hecap_phy[HE_PHYCAP_BYTE_2])
  49. #define HE_MODE_SU_TX_BFEE BIT(0)
  50. #define HE_MODE_SU_TX_BFER BIT(1)