]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: correct header conversion rule for MLO only
authorPo-Hao Huang <phhuang@realtek.com>
Tue, 31 Dec 2024 00:48:10 +0000 (08:48 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Sun, 12 Jan 2025 01:12:30 +0000 (09:12 +0800)
Header conversion should only be used with MLO connections. Otherwise
P2P connection fails due to wrong probe responses sent. Fix it
accordingly.

Fixes: b8499664fca9 ("wifi: rtw89: Add header conversion for MLO connections")
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241231004811.8646-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h

index bb4621d386588899932c4daf865c92ed4b121492..74bf590ad88c70705fdd5de977a1c854c3f597de 100644 (file)
@@ -980,6 +980,11 @@ rtw89_core_tx_update_desc_info(struct rtw89_dev *rtwdev,
        bool is_bmc;
        u16 seq;
 
+       if (tx_req->sta)
+               desc_info->mlo = tx_req->sta->mlo;
+       else if (tx_req->vif)
+               desc_info->mlo = ieee80211_vif_is_mld(tx_req->vif);
+
        seq = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
        if (tx_req->tx_type != RTW89_CORE_TX_TYPE_FWCMD) {
                tx_type = rtw89_core_get_tx_type(rtwdev, skb);
@@ -987,7 +992,7 @@ rtw89_core_tx_update_desc_info(struct rtw89_dev *rtwdev,
 
                addr_cam = rtw89_get_addr_cam_of(tx_req->rtwvif_link,
                                                 tx_req->rtwsta_link);
-               if (addr_cam->valid)
+               if (addr_cam->valid && desc_info->mlo)
                        upd_wlan_hdr = true;
        }
        is_bmc = (is_broadcast_ether_addr(hdr->addr1) ||
@@ -1127,6 +1132,8 @@ int rtw89_core_tx_write(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
        }
 
        tx_req.skb = skb;
+       tx_req.vif = vif;
+       tx_req.sta = sta;
        tx_req.rtwvif_link = rtwvif_link;
        tx_req.rtwsta_link = rtwsta_link;
 
index 37722a0b6a8bf553e91c2b3429c552249568d452..77af3cf3019a281ce2ed16b1930dc125d35ef41d 100644 (file)
@@ -1170,12 +1170,15 @@ struct rtw89_tx_desc_info {
        bool stbc;
        bool ldpc;
        bool upd_wlan_hdr;
+       bool mlo;
 };
 
 struct rtw89_core_tx_request {
        enum rtw89_core_tx_type tx_type;
 
        struct sk_buff *skb;
+       struct ieee80211_vif *vif;
+       struct ieee80211_sta *sta;
        struct rtw89_vif_link *rtwvif_link;
        struct rtw89_sta_link *rtwsta_link;
        struct rtw89_tx_desc_info desc_info;