]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: Fix mlink lookup in mt7996_tx_prepare_skb
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 4 Jul 2025 13:08:09 +0000 (15:08 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 7 Jul 2025 16:03:29 +0000 (18:03 +0200)
Use proper link_id in mt7996_tx_prepare_skb routine for mlink lookup.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250704-mt7996-mlo-fixes-v1-5-356456c73f43@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c

index 0dbd4662bc842947abf09f9ae3aa4a1d4b86cba8..0844f27b8458fe53c0765ece70fe91acdfc6510a 100644 (file)
@@ -1087,9 +1087,9 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
                if (wcid->offchannel)
                        mlink = rcu_dereference(mvif->mt76.offchannel_link);
                if (!mlink)
-                       mlink = &mvif->deflink.mt76;
+                       mlink = rcu_dereference(mvif->mt76.link[wcid->link_id]);
 
-               txp->fw.bss_idx = mlink->idx;
+               txp->fw.bss_idx = mlink ? mlink->idx : mvif->deflink.mt76.idx;
        }
 
        txp->fw.token = cpu_to_le16(id);