From: Sean Wang <sean.wang@kernel.org>
To: nbd@nbd.name, lorenzo.bianconi@redhat.com
Cc: linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org, "Javier Tia" <floss@jetm.me>,
"Marcin FM" <marcin@lgic.pl>,
"Cristian-Florin Radoi" <radoi.chris@gmail.com>,
"George Salukvadze" <giosal90@gmail.com>,
"Evgeny Kapusta" <3193631@gmail.com>,
"Samu Toljamo" <samu.toljamo@gmail.com>,
"Ariel Rosenfeld" <ariel.rosenfeld.750@gmail.com>,
"Chapuis Dario" <chapuisdario4@gmail.com>,
"Thibaut François" <tibo@humeurlibre.fr>,
张旭涵 <Loong.0x00@gmail.com>, "Sean Wang" <sean.wang@mediatek.com>
Subject: [PATCH v5 03/21] wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS
Date: Sat, 25 Apr 2026 14:49:53 -0500 [thread overview]
Message-ID: <20260425195011.790265-4-sean.wang@kernel.org> (raw)
In-Reply-To: <20260425195011.790265-1-sean.wang@kernel.org>
From: Javier Tia <floss@jetm.me>
The RX vector (RXV) and TX status (TXS) parsing in mac.c lack handling
for 320MHz channel width. When the hardware reports 320MHz in the
bandwidth field, mt7925_mac_fill_rx_rate() returns -EINVAL and
mt7925_mac_add_txs_skb() records no bandwidth stats.
Add IEEE80211_STA_RX_BW_320 cases to both functions. The RXV parser
also handles BW_320+1 since the hardware can report 320MHz in two
adjacent encoding positions.
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Reviewed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index c47bd812b66b..d681005cc6ff 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -339,6 +339,11 @@ mt7925_mac_fill_rx_rate(struct mt792x_dev *dev,
case IEEE80211_STA_RX_BW_160:
status->bw = RATE_INFO_BW_160;
break;
+ /* RXV can report 320 in two positions */
+ case IEEE80211_STA_RX_BW_320:
+ case IEEE80211_STA_RX_BW_320 + 1:
+ status->bw = RATE_INFO_BW_320;
+ break;
default:
return -EINVAL;
}
@@ -997,6 +1002,10 @@ mt7925_mac_add_txs_skb(struct mt792x_dev *dev, struct mt76_wcid *wcid,
stats->tx_mode[mode]++;
switch (FIELD_GET(MT_TXS0_BW, txs)) {
+ case IEEE80211_STA_RX_BW_320:
+ rate.bw = RATE_INFO_BW_320;
+ stats->tx_bw[4]++;
+ break;
case IEEE80211_STA_RX_BW_160:
rate.bw = RATE_INFO_BW_160;
stats->tx_bw[3]++;
--
2.43.0
next prev parent reply other threads:[~2026-04-25 19:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 19:49 [PATCH v5 00/21] wifi: mt76: mt7925: MT7927 (Filogic 380) support Sean Wang
2026-04-25 19:49 ` [PATCH v5 01/21] wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links Sean Wang
2026-04-25 19:49 ` [PATCH v5 02/21] wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv Sean Wang
2026-04-25 19:49 ` Sean Wang [this message]
2026-04-25 19:49 ` [PATCH v5 04/21] wifi: mt76: mt7925: populate EHT 320MHz MCS map in sta_rec Sean Wang
2026-04-25 19:49 ` [PATCH v5 05/21] wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band Sean Wang
2026-04-25 19:49 ` [PATCH v5 06/21] wifi: mt76: mt7925: add MT7927 chip ID helpers Sean Wang
2026-04-25 19:49 ` [PATCH v5 07/21] wifi: mt76: mt7925: add MT7927 firmware paths Sean Wang
2026-04-25 19:49 ` [PATCH v5 08/21] wifi: mt76: mt7925: use irq_map for chip-specific interrupt handling Sean Wang
2026-04-25 19:49 ` [PATCH v5 09/21] wifi: mt76: mt7925: disable ASPM and runtime PM for MT7927 Sean Wang
2026-04-25 19:50 ` [PATCH v5 10/21] wifi: mt76: connac: replace is_mt7925() with is_connac3() Sean Wang
2026-04-25 19:50 ` [PATCH v5 11/21] wifi: mt76: mt7925: use link-specific removal for non-MLD STA Sean Wang
2026-04-25 19:50 ` [PATCH v5 12/21] wifi: mt76: connac: tolerate inactive BSS deactivation Sean Wang
2026-04-25 19:50 ` [PATCH v5 13/21] wifi: mt76: mt792x: add MT7927 WFSYS reset support Sean Wang
2026-04-25 19:50 ` [PATCH v5 14/21] wifi: mt76: mt792x: factor out common DMA queue allocation Sean Wang
2026-04-25 19:50 ` [PATCH v5 15/21] wifi: mt76: mt7925: switch DMA init to common mt792x queue helpers Sean Wang
2026-04-25 19:50 ` [PATCH v5 16/21] wifi: mt76: mt792x: add MT7927-specific PCIe DMA support Sean Wang
2026-04-25 19:50 ` [PATCH v5 17/21] wifi: mt76: mt7925: sync MT7927 BSS band assignment Sean Wang
2026-04-25 19:50 ` [PATCH v5 18/21] wifi: mt76: mt7925: add MBMC event handling Sean Wang
2026-04-25 19:50 ` [PATCH v5 19/21] wifi: mt76: mt792x: enable CNM ops for MT7927 Sean Wang
2026-04-25 19:50 ` [PATCH v5 20/21] wifi: mt76: mt7925: add MT7927 PCIe support Sean Wang
2026-04-25 19:50 ` [PATCH v5 21/21] wifi: mt76: mt7925: add MT7927 USB support Sean Wang
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=20260425195011.790265-4-sean.wang@kernel.org \
--to=sean.wang@kernel.org \
--cc=3193631@gmail.com \
--cc=Loong.0x00@gmail.com \
--cc=ariel.rosenfeld.750@gmail.com \
--cc=chapuisdario4@gmail.com \
--cc=floss@jetm.me \
--cc=giosal90@gmail.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=marcin@lgic.pl \
--cc=nbd@nbd.name \
--cc=radoi.chris@gmail.com \
--cc=samu.toljamo@gmail.com \
--cc=sean.wang@mediatek.com \
--cc=tibo@humeurlibre.fr \
/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