mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00: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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+3
-7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user