mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
wifi: mt76: mt7996: Remove link pointer dependency in mt7996_mac_sta_remove_links()
Remove link pointer dependency in mt7996_mac_sta_remove_links routine to
get the mt7996_phy pointer since the link can be already offchannel
running mt7996_mac_sta_remove_links(). Rely on __mt7996_phy routine
instead.
Fixes: 344dd6a4c9 ("wifi: mt76: mt7996: Move num_sta accounting in mt7996_mac_sta_{add,remove}_links")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260306-mt7996-deflink-lookup-link-remove-v1-1-7162b332873c@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
c0a47ffc4c
commit
569ce43402
|
|
@ -1097,8 +1097,7 @@ mt7996_mac_sta_remove_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
|
|||
|
||||
for_each_set_bit(link_id, &links, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
struct mt7996_sta_link *msta_link = NULL;
|
||||
struct mt7996_vif_link *link;
|
||||
struct mt76_phy *mphy;
|
||||
struct mt7996_phy *phy;
|
||||
|
||||
msta_link = rcu_replace_pointer(msta->link[link_id], msta_link,
|
||||
lockdep_is_held(&mdev->mutex));
|
||||
|
|
@ -1107,17 +1106,12 @@ mt7996_mac_sta_remove_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
|
|||
|
||||
mt7996_mac_wtbl_update(dev, msta_link->wcid.idx,
|
||||
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
|
||||
|
||||
mt7996_mac_sta_deinit_link(dev, msta_link);
|
||||
link = mt7996_vif_link(dev, vif, link_id);
|
||||
if (!link)
|
||||
continue;
|
||||
|
||||
mphy = mt76_vif_link_phy(&link->mt76);
|
||||
if (!mphy)
|
||||
continue;
|
||||
phy = __mt7996_phy(dev, msta_link->wcid.phy_idx);
|
||||
if (phy)
|
||||
phy->mt76->num_sta--;
|
||||
|
||||
mphy->num_sta--;
|
||||
if (msta->deflink_id == link_id) {
|
||||
msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
|
||||
if (msta->seclink_id == link_id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user