]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: correct user macid mask of RX info for RTL8922D
authorChih-Kang Chang <gary.chang@realtek.com>
Fri, 14 Nov 2025 06:01:28 +0000 (14:01 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 18 Nov 2025 01:30:20 +0000 (09:30 +0800)
The user MAC ID mask of RX info in MAC PPDU for RTL8922A and RTL8922D
is different, correct it accordingly.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20251114060128.35363-15-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/txrx.h

index a14edc321ca7bf67f9dc3f04185db648aa3a1ce1..8078c9aa0ac89c9aa3ac416cf438ebf11c47fa1f 100644 (file)
@@ -1834,9 +1834,13 @@ static int rtw89_core_rx_process_mac_ppdu(struct rtw89_dev *rtwdev,
                /* For WiFi 7 chips, RXWD.mac_id of PPDU status is not set
                 * by hardware, so update mac_id by rxinfo_user[].mac_id.
                 */
-               if (chip_gen == RTW89_CHIP_BE)
+               if (chip->chip_id == RTL8922A)
                        phy_ppdu->mac_id =
                                le32_get_bits(user->w0, RTW89_RXINFO_USER_MACID);
+               else if (chip->chip_id == RTL8922D)
+                       phy_ppdu->mac_id =
+                               le32_get_bits(user->w0, RTW89_RXINFO_USER_MACID_V1);
+
                phy_ppdu->has_data =
                        le32_get_bits(user->w0, RTW89_RXINFO_USER_DATA);
                phy_ppdu->has_bcn =
index ab71489b89a33cb6c4886de276a8f0c8b7cf5c47..a9cb47ea0b93529238a6866ec463687161f3e5cc 100644 (file)
@@ -155,6 +155,7 @@ enum rtw89_core_chip_id {
        RTL8852C,
        RTL8851B,
        RTL8922A,
+       RTL8922D,
 };
 
 enum rtw89_chip_gen {
index b37dbac7b790866eacb42fb89983762355c88c69..fa324b4a1dde4511b14fe3fcee7898450824756c 100644 (file)
@@ -421,6 +421,7 @@ struct rtw89_rxinfo_user {
 #define RTW89_RXINFO_USER_MGMT BIT(3)
 #define RTW89_RXINFO_USER_BCN BIT(4)
 #define RTW89_RXINFO_USER_MACID GENMASK(15, 8)
+#define RTW89_RXINFO_USER_MACID_V1 GENMASK(31, 20)
 
 struct rtw89_rxinfo {
        __le32 w0;