mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
wifi: mt76: mt7925: pass mconf and mlink to wtbl_update_hdr_trans()
Drop the mt792x_vif_to_link() lookup in mt7925_mcu_wtbl_update_hdr_trans() and pass the resolved mconf and mlink from the caller instead. The link context is already known at the call site, making the lookup redundant. This keeps the helper lookup-free and makes link ownership explicit. No functional change intended. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260306232238.2039675-13-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
beec58f369
commit
9763ead5b9
|
|
@ -1590,8 +1590,10 @@ static void mt7925_sta_set_decap_offload(struct ieee80211_hw *hw,
|
|||
valid = ieee80211_vif_is_mld(vif) ? mvif->valid_links : BIT(0);
|
||||
|
||||
for_each_set_bit(i, &valid, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
struct mt792x_bss_conf *mconf;
|
||||
struct mt792x_link_sta *mlink;
|
||||
|
||||
mconf = mt792x_vif_to_link(mvif, i);
|
||||
mlink = mt792x_sta_to_link(msta, i);
|
||||
|
||||
if (enabled)
|
||||
|
|
@ -1602,7 +1604,7 @@ static void mt7925_sta_set_decap_offload(struct ieee80211_hw *hw,
|
|||
if (!mlink->wcid.sta)
|
||||
continue;
|
||||
|
||||
mt7925_mcu_wtbl_update_hdr_trans(dev, vif, sta, mlink, i);
|
||||
mt7925_mcu_wtbl_update_hdr_trans(dev, vif, mconf, mlink);
|
||||
}
|
||||
|
||||
mt792x_mutex_release(dev);
|
||||
|
|
|
|||
|
|
@ -1066,7 +1066,6 @@ 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 mt792x_link_sta *mlink)
|
||||
{
|
||||
struct sta_rec_hdr_trans *hdr_trans;
|
||||
|
|
@ -1096,29 +1095,18 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
|||
|
||||
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct mt792x_link_sta *mlink,
|
||||
int link_id)
|
||||
struct mt792x_bss_conf *mconf,
|
||||
struct mt792x_link_sta *mlink)
|
||||
{
|
||||
struct ieee80211_link_sta *link_sta = sta ? &sta->deflink : NULL;
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct mt792x_bss_conf *mconf;
|
||||
struct sk_buff *skb;
|
||||
|
||||
link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
|
||||
mconf = mt792x_vif_to_link(mvif, link_id);
|
||||
|
||||
skb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mconf->mt76,
|
||||
&mlink->wcid,
|
||||
MT7925_STA_UPDATE_MAX_SIZE);
|
||||
if (IS_ERR(skb))
|
||||
return PTR_ERR(skb);
|
||||
|
||||
/* starec hdr trans */
|
||||
if (!link_sta)
|
||||
mlink = &mvif->sta.deflink;
|
||||
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, vif, link_sta, mlink);
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, vif, mlink);
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_WMWA_UNI_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
|
@ -2022,7 +2010,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
|
|||
if (!info->link_sta)
|
||||
mlink = &mvif->sta.deflink;
|
||||
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->link_sta, mlink);
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, mlink);
|
||||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true);
|
||||
|
|
|
|||
|
|
@ -370,9 +370,8 @@ int mt7925_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
|||
int mt7925_mcu_set_rts_thresh(struct mt792x_phy *phy, u32 val);
|
||||
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct mt792x_link_sta *mlink,
|
||||
int link_id);
|
||||
struct mt792x_bss_conf *mconf,
|
||||
struct mt792x_link_sta *mlink);
|
||||
int mt7925_mcu_wf_rf_pin_ctrl(struct mt792x_phy *phy);
|
||||
|
||||
int mt7925_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user