]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7925: pass WCID explicitly to mt7925_mcu_sta_ba()
authorSean Wang <sean.wang@mediatek.com>
Sat, 25 Apr 2026 15:47:20 +0000 (10:47 -0500)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:21 +0000 (10:15 +0000)
mt7925_mcu_sta_ba() currently hides the BA target behind an implicit WCID
lookup.

Pass the WCID explicitly so the caller controls which BA context is being
programmed.

No functional change intended.

Tested-by: Yao Ting Hsieh <yao-ting.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20260425154721.738101-2-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

index f667eba99a51114c8d0836e7218f028dfcfdcde6..8f0970d2ba31d3ba1fa1e3df09985f13a33be705 100644 (file)
@@ -655,9 +655,8 @@ void mt7925_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb)
 static int
 mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                  struct ieee80211_ampdu_params *params,
-                 bool enable, bool tx)
+                 struct mt76_wcid *wcid, bool enable, bool tx)
 {
-       struct mt76_wcid *wcid = (struct mt76_wcid *)params->sta->drv_priv;
        struct sta_rec_ba_uni *ba;
        struct sk_buff *skb;
        struct tlv *tlv;
@@ -695,6 +694,7 @@ int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
                msta->deflink.wcid.amsdu = false;
 
        return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
+                                &msta->deflink.wcid,
                                 enable, true);
 }
 
@@ -706,6 +706,7 @@ int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
        struct mt792x_vif *mvif = msta->vif;
 
        return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
+                                &msta->deflink.wcid,
                                 enable, false);
 }