From: Mingyen Hsieh <mingyen.hsieh@mediatek.com>
To: <nbd@nbd.name>, <lorenzo@kernel.org>
Cc: <deren.wu@mediatek.com>, <Sean.Wang@mediatek.com>,
<Soul.Huang@mediatek.com>, <Leon.Yen@mediatek.com>,
<Eric-SY.Chang@mediatek.com>, <km.lin@mediatek.com>,
<robin.chiu@mediatek.com>, <ch.yeh@mediatek.com>,
<posh.sun@mediatek.com>, <Quan.Zhou@mediatek.com>,
<Ryder.Lee@mediatek.com>, <Shayne.Chen@mediatek.com>,
<linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Subject: [PATCH 07/10] wifi: mt76: mt7925: fix the wrong header translation config
Date: Thu, 28 Dec 2023 17:07:46 +0800 [thread overview]
Message-ID: <20231228090749.15191-8-mingyen.hsieh@mediatek.com> (raw)
In-Reply-To: <20231228090749.15191-1-mingyen.hsieh@mediatek.com>
From: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
---
.../net/wireless/mediatek/mt76/mt7925/mcu.c | 32 +++++--------------
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 8c3233182083..932ecf38672c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -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);
}
--
2.18.0
next prev parent reply other threads:[~2023-12-28 9:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 9:07 [PATCH 00/10] wifi: mt76: mt7925: fix connection and throughput issues Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 01/10] wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 02/10] wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 03/10] wifi: mt76: mt7925: fix mcu query command fail Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 04/10] wifi: mt76: mt7925: fix wmm queue mapping Mingyen Hsieh
2023-12-28 13:56 ` Lorenzo Bianconi
2023-12-28 9:07 ` [PATCH 05/10] wifi: mt76: mt7925: fix fw download fail Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 06/10] wifi: mt76: mt7925: fix WoW failed in encrypted mode Mingyen Hsieh
2023-12-28 9:07 ` Mingyen Hsieh [this message]
2023-12-28 9:07 ` [PATCH 08/10] wifi: mt76: mt7925: add flow to avoid chip bt function fail Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 09/10] wifi: mt76: mt7925: add support to set ifs time by mcu command Mingyen Hsieh
2023-12-28 9:07 ` [PATCH 10/10] wifi: mt76: mt7925: update PCIe DMA settings Mingyen Hsieh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231228090749.15191-8-mingyen.hsieh@mediatek.com \
--to=mingyen.hsieh@mediatek.com \
--cc=Eric-SY.Chang@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Quan.Zhou@mediatek.com \
--cc=Ryder.Lee@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=Shayne.Chen@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=ch.yeh@mediatek.com \
--cc=deren.wu@mediatek.com \
--cc=km.lin@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=posh.sun@mediatek.com \
--cc=robin.chiu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox