Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH mt76-next 19/20] wifi: mt76: connac: set the band of an RX block ack scoreboard reset
Date: Mon, 23 Nov 2026 14:49:18 +0100	[thread overview]
Message-ID: <20261123134920.154270-19-nbd@nbd.name> (raw)
In-Reply-To: <20261123134920.154270-1-nbd@nbd.name>

mt76_connac_mcu_wtbl_ba_tlv() leaves band_idx of the recipient WTBL_BA
TLV at 0. The firmware takes the band of the RX block ack scoreboard
reset from this field alone. A session start or stop of a station on
band 1 thus resets the scoreboard entry of band 0. The entry on band 1
gets no reset.

Reachable via mt7915_ampdu_action() for every station of a band 1 phy.

Pass the band of the station's interface with the TLV. mt7615 keeps
band 0, because its firmware's use of the field is not known.

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c      | 8 ++++----
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 9 +++++----
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 4 ++--
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 3b4982660e61..e31fb63a5562 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -796,7 +796,7 @@ mt7615_mcu_wtbl_tx_ba(struct mt7615_dev *dev,
 		return PTR_ERR(wtbl_hdr);
 
 	mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, true,
-				    NULL, wtbl_hdr);
+				    0, NULL, wtbl_hdr);
 
 	err = mt76_mcu_skb_send_msg(&dev->mt76, skb,
 				    MCU_EXT_CMD(WTBL_UPDATE), true);
@@ -844,7 +844,7 @@ mt7615_mcu_wtbl_rx_ba(struct mt7615_dev *dev,
 		return PTR_ERR(wtbl_hdr);
 
 	mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, false,
-				    NULL, wtbl_hdr);
+				    0, NULL, wtbl_hdr);
 
 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
 				     MCU_EXT_CMD(WTBL_UPDATE), true);
@@ -967,7 +967,7 @@ mt7615_mcu_sta_ba(struct mt7615_dev *dev,
 		return PTR_ERR(wtbl_hdr);
 
 	mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, tx,
-				    sta_wtbl, wtbl_hdr);
+				    0, sta_wtbl, wtbl_hdr);
 
 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
 				     MCU_EXT_CMD(STA_REC_UPDATE), true);
@@ -1201,7 +1201,7 @@ mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,
 		return PTR_ERR(wtbl_hdr);
 
 	mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, false,
-				    sta_wtbl, wtbl_hdr);
+				    0, sta_wtbl, wtbl_hdr);
 
 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
 				     MCU_UNI_CMD(STA_REC_UPDATE), true);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index ce1b4ed5e0d1..a250007101d5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -1148,8 +1148,8 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_cmd);
 
 void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
 				 struct ieee80211_ampdu_params *params,
-				 bool enable, bool tx, void *sta_wtbl,
-				 void *wtbl_tlv)
+				 bool enable, bool tx, u8 band_idx,
+				 void *sta_wtbl, void *wtbl_tlv)
 {
 	struct wtbl_ba *ba;
 	struct tlv *tlv;
@@ -1171,6 +1171,7 @@ void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
 		ba->rst_ba_tid = params->tid;
 		ba->rst_ba_sel = RST_BA_MAC_TID_MATCH;
 		ba->rst_ba_sb = 1;
+		ba->band_idx = band_idx;
 	}
 
 	if (!is_connac_v1(dev)) {
@@ -1357,8 +1358,8 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
 	if (IS_ERR(wtbl_hdr))
 		return PTR_ERR(wtbl_hdr);
 
-	mt76_connac_mcu_wtbl_ba_tlv(dev, skb, params, enable, tx, sta_wtbl,
-				    wtbl_hdr);
+	mt76_connac_mcu_wtbl_ba_tlv(dev, skb, params, enable, tx,
+				    mvif->band_idx, sta_wtbl, wtbl_hdr);
 
 	ret = mt76_connac_mcu_sta_wed_update(dev, skb);
 	if (ret) {
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index a39f90eeb1c2..c5fb7e2adab1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -2053,8 +2053,8 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
 				 void *wtbl_tlv, bool ht_ldpc, bool vht_ldpc);
 void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
 				 struct ieee80211_ampdu_params *params,
-				 bool enable, bool tx, void *sta_wtbl,
-				 void *wtbl_tlv);
+				 bool enable, bool tx, u8 band_idx,
+				 void *sta_wtbl, void *wtbl_tlv);
 void mt76_connac_mcu_sta_ba_tlv(struct sk_buff *skb,
 				struct ieee80211_ampdu_params *params,
 				bool enable, bool tx);
-- 
2.47.3


  parent reply	other threads:[~2026-11-23 13:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 13:49 [PATCH mt76-next 01/20] wifi: mt76: mt7925: undo the BSS of a failed interface add Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 02/20] wifi: mt76: mt7925: keep the embedded link's BMC wcid after a failed add Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 03/20] wifi: mt76: mt7915: read the PS sync state of mt7986 and mt7981 Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 04/20] wifi: mt76: mt7915: leave the BIP check of a group frame to mac80211 Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 05/20] wifi: mt76: mt7921: " Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 06/20] wifi: mt76: mt7925: " Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 07/20] wifi: mt76: mt7615: " Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 08/20] wifi: mt76: mt7925: use wcid_to_sta() in mt7925_mac_write_txwi_8023() Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 09/20] wifi: mt76: log the firmware status of a failed MCU command Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 10/20] wifi: mt76: mt7996: clear the ADM counters only in the airtime poll Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 11/20] wifi: mt76: mt7915: send mt7981 only the group units its firmware holds Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 12/20] wifi: mt76: take the DFS state from the off-channel flag Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 13/20] wifi: mt76: read roc_phy and roc_link once without the mutex Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 14/20] wifi: mt76: mt7996: add only the active links of a station MLD's peer Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 15/20] wifi: mt76: mt7996: resume the radar TX stop at an operating channel set Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 16/20] wifi: mt76: mt7996: divide by the full TWT wake interval Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 17/20] wifi: mt76: mt7915: " Felix Fietkau
2026-11-23 13:49 ` [PATCH mt76-next 18/20] wifi: mt76: mt7996: send the SRG bitmaps in one block per band Felix Fietkau
2026-11-23 13:49 ` Felix Fietkau [this message]
2026-11-23 13:49 ` [PATCH mt76-next 20/20] wifi: mt76: mt7915: reset the CCA statistics of band 1 on mt7916 Felix Fietkau

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=20261123134920.154270-19-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    /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