Skip to contentSkip to conversation

wifi: rtlwifi: rtl8821ae: Fix C2H bit location in RX descriptor

PATCH In review Bitterblue Smith 2 participants 3 messages Apr 25 – Apr 29 Realtek wireless driver (rtlwifi family)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: rtlwifi: rtl8821ae: Fix C2H bit location in RX descriptor

Bit 28 of double word 2 in the RX descriptor indicates if the packet is a normal 802.11 frame, or a message from the wifi firmware to the driver (Card 2 Host).

Commit f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros") mistakenly made the driver look for this bit in double word 1, causing packet loss and Bluetooth coexistence problems.

Fixes f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros")
---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h +1 -1
index 0609039b5322..17d37433e312 100644
@@ -291,7 +291,7 @@ static inline int get_rx_desc_paggr(__le32 *__pdesc)
 
 static inline int get_rx_status_desc_rpt_sel(__le32 *__pdesc)
 {
-	return le32_get_bits(*(__pdesc + 1), BIT(28));
+	return le32_get_bits(*(__pdesc + 2), BIT(28));
 }
 
 static inline int get_rx_desc_rxmcs(__le32 *__pdesc)
Signature · 1 line
2.53.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Bitterblue Smith

Bit 28 of double word 2 in the RX descriptor indicates if the packet is a normal 802.11 frame, or a message from the wifi firmware to the driver (Card 2 Host).

Commit f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros") mistakenly made the driver look for this bit in double word 1, causing packet loss and Bluetooth coexistence problems.

The mistake in the commit is

#define GET_RX_STATUS_DESC_RPT_SEL(__pdesc) \
- LE_BITS_TO_4BYTE(__pdesc+8, 28, 1)
+ le32_get_bits(*((__le32 *)(__pdesc + 4)), BIT(28))

Quoted 4 lines
Fixes f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros")
maintainer
#2 lore raw
In reply to Bitterblue Smith
Quoted 4 lines · Bitterblue Smith

Bit 28 of double word 2 in the RX descriptor indicates if the packet is a normal 802.11 frame, or a message from the wifi firmware to the driver (Card 2 Host).

Quoted 8 lines

Commit f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros") mistakenly made the driver look for this bit in double word 1, causing packet loss and Bluetooth coexistence problems.

Fixes f5678bfe1cdc ("rtlwifi: rtl8821ae: Replace local bit manipulation macros")

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

83d38df69291 wifi: rtlwifi: rtl8821ae: Fix C2H bit location in RX descriptor

---
https://github.com/pkshih/rtw.git