mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
wifi: mt76: mt7925: pass mlink to sta_hdr_trans_tlv()
Drop the mt792x_sta_to_link() lookup in mt7925_mcu_sta_hdr_trans_tlv() and pass the resolved mlink from the caller instead. The link is already known at the call site, making the lookup redundant. This keeps the helper lookup-free and makes WCID selection explicit. No functional change intended. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260306232238.2039675-8-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
9e4d518a47
commit
8951131c18
|
|
@ -1066,9 +1066,9 @@ EXPORT_SYMBOL_GPL(mt7925_run_firmware);
|
|||
static void
|
||||
mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
struct ieee80211_link_sta *link_sta,
|
||||
struct mt792x_link_sta *mlink)
|
||||
{
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct sta_rec_hdr_trans *hdr_trans;
|
||||
struct mt76_wcid *wcid;
|
||||
struct tlv *tlv;
|
||||
|
|
@ -1082,15 +1082,7 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
|||
else
|
||||
hdr_trans->from_ds = true;
|
||||
|
||||
if (link_sta) {
|
||||
struct mt792x_sta *msta = (struct mt792x_sta *)link_sta->sta->drv_priv;
|
||||
struct mt792x_link_sta *mlink;
|
||||
|
||||
mlink = mt792x_sta_to_link(msta, link_sta->link_id);
|
||||
wcid = &mlink->wcid;
|
||||
} else {
|
||||
wcid = &mvif->sta.deflink.wcid;
|
||||
}
|
||||
wcid = &mlink->wcid;
|
||||
|
||||
if (!wcid)
|
||||
return;
|
||||
|
|
@ -1127,7 +1119,10 @@ int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
|||
return PTR_ERR(skb);
|
||||
|
||||
/* starec hdr trans */
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, vif, link_sta);
|
||||
if (!link_sta)
|
||||
mlink = &mvif->sta.deflink;
|
||||
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, vif, link_sta, mlink);
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_WMWA_UNI_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
|
@ -2028,7 +2023,10 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
|
|||
mt76_connac_mcu_add_tlv(skb, STA_REC_MLD_OFF,
|
||||
sizeof(struct tlv));
|
||||
} else {
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->link_sta);
|
||||
if (!info->link_sta)
|
||||
mlink = &mvif->sta.deflink;
|
||||
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->link_sta, mlink);
|
||||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user