wifi: mt76: mt7996: pass wcid to mt7996_mcu_sta_hdr_trans_tlv

Preparation for MLO support.

Link: https://patch.msgid.link/20250102163508.52945-14-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2025-01-02 17:34:58 +01:00
parent c56d6edebc
commit 0b57e944ce

View File

@ -1795,11 +1795,9 @@ mt7996_mcu_sta_hdrt_tlv(struct mt7996_dev *dev, struct sk_buff *skb)
static void
mt7996_mcu_sta_hdr_trans_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
struct ieee80211_vif *vif, struct mt76_wcid *wcid)
{
struct sta_rec_hdr_trans *hdr_trans;
struct mt76_wcid *wcid;
struct tlv *tlv;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HDR_TRANS, sizeof(*hdr_trans));
@ -1811,10 +1809,9 @@ mt7996_mcu_sta_hdr_trans_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
else
hdr_trans->from_ds = true;
if (!sta)
if (!wcid)
return;
wcid = (struct mt76_wcid *)sta->drv_priv;
hdr_trans->dis_rx_hdr_tran = !test_bit(MT_WCID_FLAG_HDR_TRANS, &wcid->flags);
if (test_bit(MT_WCID_FLAG_4ADDR, &wcid->flags)) {
hdr_trans->to_ds = true;
@ -2194,7 +2191,7 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,
goto out;
/* starec hdr trans */
mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, sta);
mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, &msta->wcid);
/* starec tx proc */
mt7996_mcu_sta_tx_proc_tlv(skb);
@ -4322,7 +4319,7 @@ int mt7996_mcu_wtbl_update_hdr_trans(struct mt7996_dev *dev,
return PTR_ERR(skb);
/* starec hdr trans */
mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, sta);
mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, &msta->wcid);
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
MCU_WMWA_UNI_CMD(STA_REC_UPDATE), true);
}