From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <timlee@realtek.com>, <damon.chen@realtek.com>
Subject: [PATCH rtw-next 3/8] wifi: rtw89: support EHT GI/LTF setting
Date: Sat, 10 Jan 2026 10:20:14 +0800 [thread overview]
Message-ID: <20260110022019.2254969-4-pkshih@realtek.com> (raw)
In-Reply-To: <20260110022019.2254969-1-pkshih@realtek.com>
From: Kuan-Chung Chen <damon.chen@realtek.com>
Add support for fixed EHT GI/LTF via nl80211.
The command example:
iw wlan0 set bitrates eht-gi-6 0.8 eht-ltf-6 2
Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/phy.c | 28 +++++++++++++++---------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c
index d29fbc9cb5ac..0b72d3dcf666 100644
--- a/drivers/net/wireless/realtek/rtw89/phy.c
+++ b/drivers/net/wireless/realtek/rtw89/phy.c
@@ -281,8 +281,7 @@ static void rtw89_phy_ra_gi_ltf(struct rtw89_dev *rtwdev,
struct cfg80211_bitrate_mask *mask = &rtwsta_link->mask;
u8 band = chan->band_type;
enum nl80211_band nl_band = rtw89_hw_to_nl80211_band(band);
- u8 he_ltf = mask->control[nl_band].he_ltf;
- u8 he_gi = mask->control[nl_band].he_gi;
+ u8 ltf, gi;
*fix_giltf_en = true;
@@ -293,22 +292,31 @@ static void rtw89_phy_ra_gi_ltf(struct rtw89_dev *rtwdev,
else
*fix_giltf = RTW89_GILTF_2XHE08;
- if (!(rtwsta_link->use_cfg_mask && link_sta->he_cap.has_he))
+ if (!rtwsta_link->use_cfg_mask)
+ return;
+
+ if (link_sta->eht_cap.has_eht) {
+ ltf = mask->control[nl_band].eht_ltf;
+ gi = mask->control[nl_band].eht_gi;
+ } else if (link_sta->he_cap.has_he) {
+ ltf = mask->control[nl_band].he_ltf;
+ gi = mask->control[nl_band].he_gi;
+ } else {
return;
+ }
- if (he_ltf == 2 && he_gi == 2) {
+ if (ltf == 2 && gi == 2)
*fix_giltf = RTW89_GILTF_LGI_4XHE32;
- } else if (he_ltf == 2 && he_gi == 0) {
+ else if (ltf == 2 && gi == 0)
*fix_giltf = RTW89_GILTF_SGI_4XHE08;
- } else if (he_ltf == 1 && he_gi == 1) {
+ else if (ltf == 1 && gi == 1)
*fix_giltf = RTW89_GILTF_2XHE16;
- } else if (he_ltf == 1 && he_gi == 0) {
+ else if (ltf == 1 && gi == 0)
*fix_giltf = RTW89_GILTF_2XHE08;
- } else if (he_ltf == 0 && he_gi == 1) {
+ else if (ltf == 0 && gi == 1)
*fix_giltf = RTW89_GILTF_1XHE16;
- } else if (he_ltf == 0 && he_gi == 0) {
+ else if (ltf == 0 && gi == 0)
*fix_giltf = RTW89_GILTF_1XHE08;
- }
}
static void rtw89_phy_ra_sta_update(struct rtw89_dev *rtwdev,
--
2.25.1
next prev parent reply other threads:[~2026-01-10 2:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-10 2:20 [PATCH rtw-next 0/8] wifi: rtw89: fix settings and add MAC/PCI common flow for RTL8922D Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 1/8] wifi: rtw89: pci: validate sequence number of TX release report Ping-Ke Shih
2026-01-15 1:39 ` Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 2/8] wifi: rtw89: wow: add reason codes for disassociation in WoWLAN mode Ping-Ke Shih
2026-01-10 2:20 ` Ping-Ke Shih [this message]
2026-01-10 2:20 ` [PATCH rtw-next 4/8] wifi: rtw89: disable EHT protocol by chip capabilities Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 5/8] wifi: rtw89: align CUSTID defined by firmware Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 6/8] wifi: rtw89: mac: correct page number for CSI response Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 7/8] wifi: rtw89: mac: consider RTL8922D in MAC common flow Ping-Ke Shih
2026-01-10 2:20 ` [PATCH rtw-next 8/8] wifi: rtw89: pci: consider RTL8922D in PCI " 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=20260110022019.2254969-4-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=damon.chen@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=timlee@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