mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
wifi: mt76: mt7925: pass mlink to mac_link_sta_remove()
Drop the mt792x_sta_to_link() lookup in mt7925_mac_link_sta_remove() and pass mlink from mt7925_mac_sta_remove_links() instead. The link is already resolved there, making the extra lookup redundant. This keeps the remove helper lookup-free and avoids hidden dependence on msta->link[link_id] during teardown. No functional change intended. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260306232238.2039675-7-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
ecc57c9899
commit
9e4d518a47
|
|
@ -1121,16 +1121,12 @@ EXPORT_SYMBOL_GPL(mt7925_mac_sta_event);
|
|||
|
||||
static void mt7925_mac_link_sta_remove(struct mt76_dev *mdev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
struct ieee80211_link_sta *link_sta,
|
||||
struct mt792x_link_sta *mlink)
|
||||
{
|
||||
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
u8 link_id = link_sta->link_id;
|
||||
struct mt792x_link_sta *mlink;
|
||||
struct mt792x_sta *msta;
|
||||
|
||||
msta = (struct mt792x_sta *)link_sta->sta->drv_priv;
|
||||
mlink = mt792x_sta_to_link(msta, link_id);
|
||||
|
||||
mt7925_roc_abort_sync(dev);
|
||||
|
||||
|
|
@ -1213,7 +1209,7 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
|
|||
if (!mlink)
|
||||
continue;
|
||||
|
||||
mt7925_mac_link_sta_remove(&dev->mt76, vif, link_sta);
|
||||
mt7925_mac_link_sta_remove(&dev->mt76, vif, link_sta, mlink);
|
||||
|
||||
wcid = &mlink->wcid;
|
||||
rcu_assign_pointer(msta->link[link_id], NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user