diff mbox series

[v3,2/2] wifi: rtw88: 8703b: Fix reported RX band width

Message ID 1cfed9d5-4304-4b96-84c5-c347f59fedb9@gmail.com
State New
Headers show
Series [v3,1/2] wifi: rtw88: 8822c: Fix reported RX band width | expand

Commit Message

Bitterblue Smith July 23, 2024, 7:32 p.m. UTC
The definition of GET_RX_DESC_BW is incorrect. Fix it according to the
GET_RX_STATUS_DESC_BW_8703B macro from the official driver.

Tested only with RTL8812AU, which uses the same bits.

Cc: stable@vger.kernel.org
Fixes: 9bb762b3a957 ("wifi: rtw88: Add definitions for 8703b chip")
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v3:
 - Use Fixes and Cc: stable.

v2:
 - Use Fixes instead of Cc: stable.
---
 drivers/net/wireless/realtek/rtw88/rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fiona Klute July 23, 2024, 9:32 p.m. UTC | #1
Am 23.07.24 um 21:32 schrieb Bitterblue Smith:
> The definition of GET_RX_DESC_BW is incorrect. Fix it according to the
> GET_RX_STATUS_DESC_BW_8703B macro from the official driver.
>
> Tested only with RTL8812AU, which uses the same bits.

Thanks for catching this! Confirmed that RTL8723CS correctly reports
20MHz, my radio environment is too noisy to connect with HT40.

Tested-by: Fiona Klute <fiona.klute@gmx.de>

> Cc: stable@vger.kernel.org
> Fixes: 9bb762b3a957 ("wifi: rtw88: Add definitions for 8703b chip")
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> ---
> v3:
>   - Use Fixes and Cc: stable.
>
> v2:
>   - Use Fixes instead of Cc: stable.
> ---
>   drivers/net/wireless/realtek/rtw88/rx.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rx.h b/drivers/net/wireless/realtek/rtw88/rx.h
> index d3668c4efc24..8a072dd3d73c 100644
> --- a/drivers/net/wireless/realtek/rtw88/rx.h
> +++ b/drivers/net/wireless/realtek/rtw88/rx.h
> @@ -41,7 +41,7 @@ enum rtw_rx_desc_enc {
>   #define GET_RX_DESC_TSFL(rxdesc)                                               \
>   	le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
>   #define GET_RX_DESC_BW(rxdesc)                                                 \
> -	(le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(31, 24)))
> +	(le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(5, 4)))
>
>   void rtw_rx_stats(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
>   		  struct sk_buff *skb);

--
Dipl.-Ing. Fiona Klute
Mollwitzer Str. 2
44141 Dortmund
Germany

USt.-ID/VAT number: DE363488944
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/rx.h b/drivers/net/wireless/realtek/rtw88/rx.h
index d3668c4efc24..8a072dd3d73c 100644
--- a/drivers/net/wireless/realtek/rtw88/rx.h
+++ b/drivers/net/wireless/realtek/rtw88/rx.h
@@ -41,7 +41,7 @@  enum rtw_rx_desc_enc {
 #define GET_RX_DESC_TSFL(rxdesc)                                               \
 	le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
 #define GET_RX_DESC_BW(rxdesc)                                                 \
-	(le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(31, 24)))
+	(le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(5, 4)))
 
 void rtw_rx_stats(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
 		  struct sk_buff *skb);