2022-10-12 18:37:29

by Muna Sinada

[permalink] [raw]
Subject: [PATCH 1/4] wifi: ath11k: modify accessor macros to match index size

HE PHY is only 11 bytes, therefore it should be using byte indexes
instead of dword. Change corresponding macros to reflect this.

Signed-off-by: Muna Sinada <[email protected]>
---
drivers/net/wireless/ath/ath11k/wmi.h | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 8f2c07d70a4a..368b7755e800 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -2857,30 +2857,32 @@ struct rx_reorder_queue_remove_params {
#define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
#define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)

-#define HECAP_PHYDWORD_0 0
-#define HECAP_PHYDWORD_1 1
-#define HECAP_PHYDWORD_2 2
+#define HE_PHYCAP_BYTE_0 0
+#define HE_PHYCAP_BYTE_1 1
+#define HE_PHYCAP_BYTE_2 2
+#define HE_PHYCAP_BYTE_3 3
+#define HE_PHYCAP_BYTE_4 4

-#define HECAP_PHY_SU_BFER BIT(31)
+#define HECAP_PHY_SU_BFER BIT(7)
#define HECAP_PHY_SU_BFEE BIT(0)
#define HECAP_PHY_MU_BFER BIT(1)
-#define HECAP_PHY_UL_MUMIMO BIT(22)
-#define HECAP_PHY_UL_MUOFDMA BIT(23)
+#define HECAP_PHY_UL_MUMIMO BIT(6)
+#define HECAP_PHY_UL_MUOFDMA BIT(7)

#define HECAP_PHY_SUBFMR_GET(hecap_phy) \
- FIELD_GET(HECAP_PHY_SU_BFER, hecap_phy[HECAP_PHYDWORD_0])
+ FIELD_GET(HECAP_PHY_SU_BFER, hecap_phy[HE_PHYCAP_BYTE_3])

#define HECAP_PHY_SUBFME_GET(hecap_phy) \
- FIELD_GET(HECAP_PHY_SU_BFEE, hecap_phy[HECAP_PHYDWORD_1])
+ FIELD_GET(HECAP_PHY_SU_BFEE, hecap_phy[HE_PHYCAP_BYTE_4])

#define HECAP_PHY_MUBFMR_GET(hecap_phy) \
- FIELD_GET(HECAP_PHY_MU_BFER, hecap_phy[HECAP_PHYDWORD_1])
+ FIELD_GET(HECAP_PHY_MU_BFER, hecap_phy[HE_PHYCAP_BYTE_4])

#define HECAP_PHY_ULMUMIMO_GET(hecap_phy) \
- FIELD_GET(HECAP_PHY_UL_MUMIMO, hecap_phy[HECAP_PHYDWORD_0])
+ FIELD_GET(HECAP_PHY_UL_MUMIMO, hecap_phy[HE_PHYCAP_BYTE_2])

#define HECAP_PHY_ULOFDMA_GET(hecap_phy) \
- FIELD_GET(HECAP_PHY_UL_MUOFDMA, hecap_phy[HECAP_PHYDWORD_0])
+ FIELD_GET(HECAP_PHY_UL_MUOFDMA, hecap_phy[HE_PHYCAP_BYTE_2])

#define HE_MODE_SU_TX_BFEE BIT(0)
#define HE_MODE_SU_TX_BFER BIT(1)
--
2.7.4


2022-10-13 06:29:41

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/4] wifi: ath11k: modify accessor macros to match index size

Muna Sinada <[email protected]> wrote:

> HE PHY is only 11 bytes, therefore it should be using byte indexes
> instead of dword. Change corresponding macros to reflect this.
>
> Signed-off-by: Muna Sinada <[email protected]>

Fails to build. How did you test this if it doesn't even build? ALL
patches submitted to upstream need to be properly tested before
submission.

drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_set_he_txbf_conf':
drivers/net/wireless/ath/ath11k/mac.c:2711:33: error: 'struct ieee80211_bss_conf' has no member named 'he_su_beamformer'
2711 | if (arvif->vif->bss_conf.he_su_beamformer) {
| ^
drivers/net/wireless/ath/ath11k/mac.c:2713:41: error: 'struct ieee80211_bss_conf' has no member named 'he_mu_beamformer'
2713 | if (arvif->vif->bss_conf.he_mu_beamformer &&
| ^
drivers/net/wireless/ath/ath11k/mac.c:2722:41: error: 'struct ieee80211_bss_conf' has no member named 'he_full_ul_mumimo'
2722 | if (arvif->vif->bss_conf.he_full_ul_mumimo)
| ^
drivers/net/wireless/ath/ath11k/mac.c:2725:41: error: 'struct ieee80211_bss_conf' has no member named 'he_su_beamformee'
2725 | if (arvif->vif->bss_conf.he_su_beamformee)
| ^
make[5]: *** [scripts/Makefile.build:249: drivers/net/wireless/ath/ath11k/mac.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:465: drivers/net/wireless/ath/ath11k] Error 2
make[3]: *** [scripts/Makefile.build:465: drivers/net/wireless/ath] Error 2
make[2]: *** [scripts/Makefile.build:465: drivers/net/wireless] Error 2
make[1]: *** [scripts/Makefile.build:465: drivers/net] Error 2
make: *** [Makefile:1853: drivers] Error 2

4 patches set to Changes Requested.

13005351 [1/4] wifi: ath11k: modify accessor macros to match index size
13005352 [2/4] wifi: ath11k: push MU-MIMO params from hostapd to hardware
13005353 [3/4] wifi: ath11k: move HE MCS mapper to a separate function
13005354 [4/4] wifi: ath11k: generate rx and tx mcs maps for supported HE mcs

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2022-10-18 21:58:23

by Muna Sinada

[permalink] [raw]
Subject: RE: [PATCH 1/4] wifi: ath11k: modify accessor macros to match index size

Kalle Valo <[email protected]> wrote:

> drivers/net/wireless/ath/ath11k/mac.c:2711:33: error: 'struct ieee80211_bss_conf' has no member named 'he_su_beamformer'
> 2711 | if (arvif->vif->bss_conf.he_su_beamformer) {
> | ^
> drivers/net/wireless/ath/ath11k/mac.c:2713:41: error: 'struct ieee80211_bss_conf' has no member named 'he_mu_beamformer'
> 2713 | if (arvif->vif->bss_conf.he_mu_beamformer &&
> | ^
> drivers/net/wireless/ath/ath11k/mac.c:2722:41: error: 'struct ieee80211_bss_conf' has no member named 'he_full_ul_mumimo'
> 2722 | if (arvif->vif->bss_conf.he_full_ul_mumimo)
> | ^
> drivers/net/wireless/ath/ath11k/mac.c:2725:41: error: 'struct ieee80211_bss_conf' has no member named 'he_su_beamformee'
> 2725 | if (arvif->vif->bss_conf.he_su_beamformee)
> | ^


These attributes are defined as part of this mac80211 patchset which is in public review :
https://patchwork.kernel.org/project/linux-wireless/list/?series=683322&state=%2A&archive=both

I have included this dependency in the cover letter of V2 of this patchset.

Thank you,
Muna