From: Shayne Chen <shayne.chen@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Evelyn Tsai <evelyn.tsai@mediatek.com>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
StanleyYP Wang <StanleyYP.Wang@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>
Subject: [PATCH mt76 4/7] wifi: mt76: mt7996: abort CCA when CSA is starting
Date: Tue, 25 Nov 2025 11:46:36 +0800 [thread overview]
Message-ID: <20251125034639.1416214-4-shayne.chen@mediatek.com> (raw)
In-Reply-To: <20251125034639.1416214-1-shayne.chen@mediatek.com>
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
When CSA countdown is going to start, carry UNI_BSS_INFO_BCN_BCC tag to
abort any CCA countdown.
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 10 ++++++++++
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 11 ++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 8f2b3f4f25ab..4e78f8e585d9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -2796,6 +2796,16 @@ mt7996_mcu_beacon_cntdwn(struct sk_buff *rskb, struct sk_buff *skb,
info = (struct bss_bcn_cntdwn_tlv *)tlv;
info->cnt = skb->data[offs->cntdwn_counter_offs[0]];
+
+ /* abort the CCA countdown when starting CSA countdown */
+ if (csa) {
+ struct bss_bcn_cntdwn_tlv *cca_info;
+
+ tlv = mt7996_mcu_add_uni_tlv(rskb, UNI_BSS_INFO_BCN_BCC,
+ sizeof(*cca_info));
+ cca_info = (struct bss_bcn_cntdwn_tlv *)tlv;
+ cca_info->cca.abort = true;
+ }
}
static void
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.h b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.h
index 5b3597ca79be..1283beb0dc19 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.h
@@ -412,7 +412,16 @@ struct bss_bcn_cntdwn_tlv {
__le16 tag;
__le16 len;
u8 cnt;
- u8 rsv[3];
+ union {
+ struct {
+ bool static_pp;
+ bool abort;
+ } csa;
+ struct {
+ bool abort;
+ } cca;
+ };
+ u8 rsv;
} __packed;
struct bss_bcn_mbss_tlv {
--
2.51.0
next prev parent reply other threads:[~2025-11-25 3:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 3:46 [PATCH mt76 1/7] wifi: mt76: mt7996: extend CSA and CCA support for MLO Shayne Chen
2025-11-25 3:46 ` [PATCH mt76 2/7] wifi: mt76: mt7996: fix the behavior of radar detection Shayne Chen
2025-12-09 11:19 ` Lorenzo Bianconi
2025-12-12 8:35 ` Shayne Chen
2025-11-25 3:46 ` [PATCH mt76 3/7] wifi: mt76: mt7996: set specific BSSINFO and STAREC commands after channel switch Shayne Chen
2025-11-25 3:46 ` Shayne Chen [this message]
2025-11-25 3:46 ` [PATCH mt76 5/7] wifi: mt76: mt7996: offload radar threshold initialization Shayne Chen
2025-11-25 3:46 ` [PATCH mt76 6/7] wifi: mt76: mt7996: add duplicated WTBL command Shayne Chen
2025-11-25 3:46 ` [PATCH mt76 7/7] wifi: mt76: mt7996: fix iface combination for different chipsets Shayne Chen
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=20251125034639.1416214-4-shayne.chen@mediatek.com \
--to=shayne.chen@mediatek.com \
--cc=StanleyYP.Wang@mediatek.com \
--cc=evelyn.tsai@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@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