mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
wifi: mt76: mt7925: resolve primary mlink via def_wcid
Use mlink->wcid.def_wcid to obtain the primary mlink in mt7925_mac_link_sta_add() instead of calling mt792x_sta_to_link(). The primary link context is already carried by the WCID, so the extra lookup is redundant. This makes the add path follow the existing WCID association directly. No functional change intended. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260306232238.2039675-6-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
dc019e3294
commit
ecc57c9899
|
|
@ -927,8 +927,17 @@ static int mt7925_mac_link_sta_add(struct mt76_dev *mdev,
|
|||
} else if (ieee80211_vif_is_mld(vif) &&
|
||||
link_sta != mlink->pri_link) {
|
||||
struct mt792x_link_sta *pri_mlink;
|
||||
struct mt76_wcid *pri_wcid;
|
||||
|
||||
pri_mlink = mt792x_sta_to_link(msta, mlink->pri_link->link_id);
|
||||
/* alternative lookup via def_wcid */
|
||||
pri_wcid = mlink->wcid.def_wcid;
|
||||
|
||||
pri_mlink = pri_wcid ?
|
||||
container_of(pri_wcid, struct mt792x_link_sta, wcid) :
|
||||
NULL;
|
||||
|
||||
if (WARN_ON_ONCE(!pri_mlink))
|
||||
return -EINVAL;
|
||||
|
||||
ret = mt7925_mcu_sta_update(dev, mlink->pri_link, vif,
|
||||
pri_mlink, true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user