]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: mt7996: Fix secondary link lookup in mt7996_mcu_sta_mld_setup_tlv()
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 4 Jul 2025 13:08:06 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 14:38:43 +0000 (16:38 +0200)
[ Upstream commit e8d7eef07199887161cd6f3c062406628781f8b6 ]

Use proper link_id value for secondary link lookup in
mt7996_mcu_sta_mld_setup_tlv routine.

Fixes: 00cef41d9d8f5 ("wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250704-mt7996-mlo-fixes-v1-2-356456c73f43@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c

index 994526c65bfc3234aa6f9efd0ea00e2459980df1..dd4b7b8c34ea1f7ff7bf5139a95c5541f3b2d828 100644 (file)
@@ -2326,8 +2326,7 @@ mt7996_mcu_sta_mld_setup_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
 
        if (nlinks > 1) {
                link_id = __ffs(links & ~BIT(msta->deflink_id));
-               msta_link = mt76_dereference(msta->link[msta->deflink_id],
-                                            &dev->mt76);
+               msta_link = mt76_dereference(msta->link[link_id], &dev->mt76);
                if (!msta_link)
                        return;
        }