mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 17:27:11 -04:00
wifi: mt76: mt7925: fix the wrong header translation config
The header translation config should set to broadcast and unicast
cases correctly, not only unicast case. And also remove the cmds
of wtbl (wlan table) series, because these MCU commands have
already been replaced by other commands in mt7925.
Fixes: c948b5da6b ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
47916693ec
commit
d8cf7e1344
@@ -814,6 +814,7 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct sta_rec_hdr_trans *hdr_trans;
|
||||
struct mt76_wcid *wcid;
|
||||
struct tlv *tlv;
|
||||
@@ -827,7 +828,11 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
|
||||
else
|
||||
hdr_trans->from_ds = true;
|
||||
|
||||
wcid = (struct mt76_wcid *)sta->drv_priv;
|
||||
if (sta)
|
||||
wcid = (struct mt76_wcid *)sta->drv_priv;
|
||||
else
|
||||
wcid = &mvif->sta.wcid;
|
||||
|
||||
if (!wcid)
|
||||
return;
|
||||
|
||||
@@ -1577,8 +1582,6 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
|
||||
{
|
||||
struct mt76_vif *mvif = (struct mt76_vif *)info->vif->drv_priv;
|
||||
struct mt76_dev *dev = phy->dev;
|
||||
struct wtbl_req_hdr *wtbl_hdr;
|
||||
struct tlv *sta_wtbl;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = __mt76_connac_mcu_alloc_sta_req(dev, mvif, info->wcid,
|
||||
@@ -1602,30 +1605,11 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
|
||||
mt7925_mcu_sta_state_v2_tlv(phy, skb, info->sta,
|
||||
info->vif, info->rcpi,
|
||||
info->state);
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->sta);
|
||||
mt7925_mcu_sta_mld_tlv(skb, info->vif, info->sta);
|
||||
}
|
||||
|
||||
sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
|
||||
sizeof(struct tlv));
|
||||
|
||||
wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(dev, info->wcid,
|
||||
WTBL_RESET_AND_SET,
|
||||
sta_wtbl, &skb);
|
||||
if (IS_ERR(wtbl_hdr))
|
||||
return PTR_ERR(wtbl_hdr);
|
||||
|
||||
if (info->enable) {
|
||||
mt76_connac_mcu_wtbl_generic_tlv(dev, skb, info->vif,
|
||||
info->sta, sta_wtbl,
|
||||
wtbl_hdr);
|
||||
mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, info->vif, info->wcid,
|
||||
sta_wtbl, wtbl_hdr);
|
||||
if (info->sta)
|
||||
mt76_connac_mcu_wtbl_ht_tlv(dev, skb, info->sta,
|
||||
sta_wtbl, wtbl_hdr,
|
||||
true, true);
|
||||
}
|
||||
if (info->enable)
|
||||
mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->sta);
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user