Skip to content

Commit c319967

Browse files
LorenzoBianconigregkh
authored andcommitted
wifi: mt76: mt7996: skip deflink accounting for offchannel links
[ Upstream commit 4fe823b ] Do not take into account offchannel links for deflink accounting. Fixes: a3316d2 ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Tested-by: Ben Greear <greearb@candelatech.com> Link: https://patch.msgid.link/20251114-mt76-fix-missing-mtx-v1-4-259ebf11f654@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 70656b4 commit c319967

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
370370

371371
ieee80211_iter_keys(mphy->hw, vif, mt7996_key_iter, &it);
372372

373-
if (mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
373+
if (!mlink->wcid->offchannel &&
374+
mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
374375
mvif->mt76.deflink_id = link_conf->link_id;
375376

376377
return 0;
@@ -401,7 +402,8 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
401402

402403
rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
403404

404-
if (mvif->mt76.deflink_id == link_conf->link_id) {
405+
if (!mlink->wcid->offchannel &&
406+
mvif->mt76.deflink_id == link_conf->link_id) {
405407
struct ieee80211_bss_conf *iter;
406408
unsigned int link_id;
407409

0 commit comments

Comments
 (0)