Skip to content

Commit 15205c7

Browse files
LorenzoBianconigregkh
authored andcommitted
wifi: mt76: mt7996: Set mtxq->wcid just for primary link
[ Upstream commit 654abcb ] Set WCID index in mt76_txq struct just for the primary link in mt7996_vif_link_add routine. Fixes: 69d54ce ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20251205-mt76-txq-wicd-fix-v2-1-f19ba48af7c1@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9005794 commit 15205c7

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

  • drivers/net/wireless/mediatek/mt76/mt7996

drivers/net/wireless/mediatek/mt76/mt7996/main.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
301301
.cmd = SET_KEY,
302302
.link_id = link_conf->link_id,
303303
};
304-
struct mt76_txq *mtxq;
305304
int mld_idx, idx, ret;
306305

307306
mlink->idx = __ffs64(~dev->mt76.vif_mask);
@@ -344,11 +343,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
344343
mt7996_mac_wtbl_update(dev, idx,
345344
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
346345

347-
if (vif->txq) {
348-
mtxq = (struct mt76_txq *)vif->txq->drv_priv;
349-
mtxq->wcid = idx;
350-
}
351-
352346
if (vif->type != NL80211_IFTYPE_AP &&
353347
(!mlink->omac_idx || mlink->omac_idx > 3))
354348
vif->offload_flags = 0;
@@ -371,9 +365,13 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
371365

372366
ieee80211_iter_keys(mphy->hw, vif, mt7996_key_iter, &it);
373367

374-
if (!mlink->wcid->offchannel &&
375-
mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
368+
if (vif->txq && !mlink->wcid->offchannel &&
369+
mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED) {
370+
struct mt76_txq *mtxq = (struct mt76_txq *)vif->txq->drv_priv;
371+
376372
mvif->mt76.deflink_id = link_conf->link_id;
373+
mtxq->wcid = idx;
374+
}
377375

378376
return 0;
379377
}

0 commit comments

Comments
 (0)