Commit 4fe823b9 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

wifi: mt76: mt7996: skip deflink accounting for offchannel links



Do not take into account offchannel links for deflink accounting.

Fixes: a3316d2f ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Tested-by: default avatarBen Greear <greearb@candelatech.com>
Link: https://patch.msgid.link/20251114-mt76-fix-missing-mtx-v1-4-259ebf11f654@kernel.org


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 6aaaaeac
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -370,7 +370,8 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,

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

	if (mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
	if (!mlink->wcid->offchannel &&
	    mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
		mvif->mt76.deflink_id = link_conf->link_id;

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

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

	if (mvif->mt76.deflink_id == link_conf->link_id) {
	if (!mlink->wcid->offchannel &&
	    mvif->mt76.deflink_id == link_conf->link_id) {
		struct ieee80211_bss_conf *iter;
		unsigned int link_id;