mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: pass mlink to wtbl_update_hdr_trans()
Drop the mt792x_sta_to_link() lookup in mt7925_mcu_wtbl_update_hdr_trans() and pass the resolved 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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+1
-1
@@ -1598,7 +1598,7 @@ static void mt7925_sta_set_decap_offload(struct ieee80211_hw *hw,
|
|||||||
if (!mlink->wcid.sta)
|
if (!mlink->wcid.sta)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
mt7925_mcu_wtbl_update_hdr_trans(dev, vif, sta, i);
|
mt7925_mcu_wtbl_update_hdr_trans(dev, vif, sta, mlink, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
mt792x_mutex_release(dev);
|
mt792x_mutex_release(dev);
|
||||||
|
|||||||
+2
-6
@@ -1097,18 +1097,14 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
|||||||
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_sta *sta,
|
struct ieee80211_sta *sta,
|
||||||
|
struct mt792x_link_sta *mlink,
|
||||||
int link_id)
|
int link_id)
|
||||||
{
|
{
|
||||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
|
||||||
struct ieee80211_link_sta *link_sta = sta ? &sta->deflink : NULL;
|
struct ieee80211_link_sta *link_sta = sta ? &sta->deflink : NULL;
|
||||||
struct mt792x_link_sta *mlink;
|
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||||
struct mt792x_bss_conf *mconf;
|
struct mt792x_bss_conf *mconf;
|
||||||
struct mt792x_sta *msta;
|
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
msta = sta ? (struct mt792x_sta *)sta->drv_priv : &mvif->sta;
|
|
||||||
|
|
||||||
mlink = mt792x_sta_to_link(msta, link_id);
|
|
||||||
link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
|
link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
|
||||||
mconf = mt792x_vif_to_link(mvif, link_id);
|
mconf = mt792x_vif_to_link(mvif, link_id);
|
||||||
|
|
||||||
|
|||||||
@@ -371,6 +371,7 @@ int mt7925_mcu_set_rts_thresh(struct mt792x_phy *phy, u32 val);
|
|||||||
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_sta *sta,
|
struct ieee80211_sta *sta,
|
||||||
|
struct mt792x_link_sta *mlink,
|
||||||
int link_id);
|
int link_id);
|
||||||
int mt7925_mcu_wf_rf_pin_ctrl(struct mt792x_phy *phy);
|
int mt7925_mcu_wf_rf_pin_ctrl(struct mt792x_phy *phy);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user