]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: Adjust management queue mapping for [MLO, HW-1]
authorPo-Hao Huang <phhuang@realtek.com>
Mon, 28 Apr 2025 11:24:49 +0000 (19:24 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 5 May 2025 01:45:47 +0000 (09:45 +0800)
Adjust mapping of management packets accordingly to send it on the
second hardware band. Previously only single band is used and we
plan to enable MLO, so the second band will be needed. Data packets
will be steered by hardware so no related changes are required.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250428112456.13165-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/txrx.h

index a6e67e22349e2ad651eb4b886005ea5d262b2ec4..93e7889eec960392f4afe45b45ed8231b90ab3be 100644 (file)
@@ -673,7 +673,7 @@ rtw89_core_tx_update_mgmt_info(struct rtw89_dev *rtwdev,
        struct sk_buff *skb = tx_req->skb;
        u8 qsel, ch_dma;
 
-       qsel = desc_info->hiq ? RTW89_TX_QSEL_B0_HI : RTW89_TX_QSEL_B0_MGMT;
+       qsel = rtw89_core_get_qsel_mgmt(rtwdev, tx_req);
        ch_dma = rtw89_core_get_ch_dma(rtwdev, qsel);
 
        desc_info->qsel = qsel;
index 70fe7cebc9d53386aface6d154ca49200a518e25..720c6b1bb25401b392d50f0c309b287c36772a72 100644 (file)
@@ -712,6 +712,25 @@ static inline u8 rtw89_core_get_qsel(struct rtw89_dev *rtwdev, u8 tid)
        }
 }
 
+static inline u8
+rtw89_core_get_qsel_mgmt(struct rtw89_dev *rtwdev, struct rtw89_core_tx_request *tx_req)
+{
+       struct rtw89_tx_desc_info *desc_info = &tx_req->desc_info;
+       struct rtw89_vif_link *rtwvif_link = tx_req->rtwvif_link;
+
+       if (desc_info->hiq) {
+               if (rtwvif_link->mac_idx == RTW89_MAC_1)
+                       return RTW89_TX_QSEL_B1_HI;
+               else
+                       return RTW89_TX_QSEL_B0_HI;
+       }
+
+       if (rtwvif_link->mac_idx == RTW89_MAC_1)
+               return RTW89_TX_QSEL_B1_MGMT;
+       else
+               return RTW89_TX_QSEL_B0_MGMT;
+}
+
 static inline u8 rtw89_core_get_ch_dma(struct rtw89_dev *rtwdev, u8 qsel)
 {
        switch (qsel) {