From: Josef Schlehofer <pepe.schlehofer@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH rtw-next] wifi: rtw88: 8822b: Relax ETSI EDCCA threshold on 2.4 GHz
Date: Sun, 11 Oct 2026 22:45:09 +0200 [thread overview]
Message-ID: <20261011204509.46062-1-pepe.schlehofer@gmail.com> (raw)
The RTL8822B has no firmware-managed adaptivity, so rtw88 sets
the EDCCA thresholds in the driver. Under ETSI, the current rule
uses L2H = min(IGI, 36), at most about -74 dBm.
On a TP-Link Archer T4U v3 (RTL8812BU) operating as a 2.4 GHz AP,
in-band energy, mostly from the adapter's own USB 3 link, kept IGI
at 0x2a and L2H at 36. The AP was not seen in any of 5 scans, and
the driver reported "failed to get tx report from firmware".
With min(max(IGI + 8, 48), 50), the AP was seen in 4/5 scans on the
same port and boot (16/19 across repeated runs), with no TX report
failures and no change in the false alarm rate.
EN 300 328 V2.2.2 tests detection at -70 dBm/MHz for a 20 dBm EIRP
transmitter, about -57 dBm over 20 MHz.
Use the normal threshold, max(IGI + 8, 48), on 2.4 GHz under ETSI,
capped at 50 (nominally -60 dBm). Keep the existing rule on 5 GHz
and in JP.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
How other drivers handle ETSI energy detect: rtw89 has no regional
EDCCA mode (it does not block without a station and never goes below
-62 dBm once linked); mt76x02 and mt7603 keep their ETSI ED/CCA
blocking off by default since 2019 ("stability issues"); ath9k caps
its CCA noise floor at -60 dBm for non-FCC boards; Realtek's 88x2bu
vendor driver ships adaptivity disabled and its 802.11ax driver uses
-60 dBm for CE.
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 6 ++++++
drivers/net/wireless/realtek/rtw88/rtw8822b.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index a56c8befa..cd39888ae 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -1565,6 +1565,12 @@ static void rtw8822b_adaptivity(struct rtw_dev *rtwdev)
if (dm_info->edcca_mode == RTW_EDCCA_NORMAL) {
l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
h2l = l2h - EDCCA_L2H_H2L_DIFF_NORMAL;
+ } else if (rtwdev->regd.dfs_region == NL80211_DFS_ETSI &&
+ rtwdev->hal.current_band_type == RTW_BAND_2G) {
+ /* follow the normal threshold, capped for EN 300 328 */
+ l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
+ l2h = min_t(s8, l2h, RTW8822B_EDCCA_ETSI_2G);
+ h2l = l2h - EDCCA_L2H_H2L_DIFF;
} else {
l2h = min_t(s8, igi, dm_info->l2h_th_ini);
h2l = l2h - EDCCA_L2H_H2L_DIFF;
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.h b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
index 9fca9ba67..1083953e0 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
@@ -151,6 +151,8 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
#define RTW8822B_EDCCA_MAX 0x7f
#define RTW8822B_EDCCA_SRC_DEF 1
+/* nominally -60 dBm: 3 dB below the EN 300 328 level at 20 dBm e.i.r.p. */
+#define RTW8822B_EDCCA_ETSI_2G 50
#define REG_HTSTFWT 0x800
#define REG_RXCCAMSK 0x814
#define REG_L1WT 0x83c
--
2.54.0 (Apple Git-157)
next reply other threads:[~2026-10-11 20:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 20:45 Josef Schlehofer [this message]
2026-10-19 3:49 ` [PATCH rtw-next] wifi: rtw88: 8822b: Relax ETSI EDCCA threshold on 2.4 GHz Ping-Ke Shih
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=20261011204509.46062-1-pepe.schlehofer@gmail.com \
--to=pepe.schlehofer@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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