All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <owen.hsiao@realtek.com>, <echuang@realtek.com>,
	<henchy.chen@realtek.com>, <phhuang@realtek.com>,
	<kevin_yang@realtek.com>
Subject: [PATCH rtw-next 10/14] wifi: rtw89: 8922d: correct selection of CCK rate circuit
Date: Wed, 26 Aug 2026 14:40:57 +0800	[thread overview]
Message-ID: <20260826064101.58892-11-pkshih@realtek.com> (raw)
In-Reply-To: <20260826064101.58892-1-pkshih@realtek.com>

The RTL8922D has single one shared CCK rate circuit. When operating on
0+2 mode, the selection should be on RTW89_PHY_1. For 1+1 operating mode,
select RTW89_PHY_1 only if PHY0 isn't on 2GHz band but PHY1 does.

Also, change the operating mode of debugging value from decimal to
hexadecimal to be easier to read.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/chan.c     | 2 +-
 drivers/net/wireless/realtek/rtw89/rtw8922d.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c
index 6f11335b4968..99b52ca05fe2 100644
--- a/drivers/net/wireless/realtek/rtw89/chan.c
+++ b/drivers/net/wireless/realtek/rtw89/chan.c
@@ -527,7 +527,7 @@ static void rtw89_entity_recalc_mlo_dbcc_mode(struct rtw89_dev *rtwdev)
 	mode = rtw89_entity_sel_mlo_dbcc_mode(rtwdev, active_hws);
 	rtwdev->mlo_dbcc_mode = mode;
 
-	rtw89_debug(rtwdev, RTW89_DBG_STATE, "recalc mlo dbcc mode to %d\n", mode);
+	rtw89_debug(rtwdev, RTW89_DBG_STATE, "recalc mlo dbcc mode to 0x%x\n", mode);
 }
 
 static void rtw89_entity_recalc_mgnt_roles(struct rtw89_dev *rtwdev)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8922d.c b/drivers/net/wireless/realtek/rtw89/rtw8922d.c
index 287a9476bb77..75297b39c4d7 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922d.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922d.c
@@ -2471,14 +2471,15 @@ static int rtw8922d_ctrl_mlo(struct rtw89_dev *rtwdev, enum rtw89_mlo_dbcc_mode
 		rtw89_write32_mask(rtwdev, reg1, B_BBWRAP_ELMSR_EN_BE4, 0);
 	} else if (mode == MLO_0_PLUS_2_1RF) {
 		rtw89_phy_write32_mask(rtwdev, R_SYS_DBCC_BE4,
-				       B_SYS_DBCC_24G_BAND_SEL_BE4, RTW89_PHY_0);
+				       B_SYS_DBCC_24G_BAND_SEL_BE4, RTW89_PHY_1);
 		rtw89_write32_mask(rtwdev, reg0, B_BBWRAP_ELMSR_EN_BE4, 0);
 		rtw89_write32_mask(rtwdev, reg1, B_BBWRAP_ELMSR_EN_BE4, 0);
 	} else if ((mode == MLO_1_PLUS_1_1RF) || (mode == DBCC_LEGACY)) {
 		struct rtw89_entity_conf conf;
 
 		rtw89_entity_get_conf(rtwdev, &conf);
-		cck_phy_idx = conf.chans[1]->band_type == RTW89_BAND_2G ?
+		cck_phy_idx = conf.chans[0]->band_type != RTW89_BAND_2G &&
+			      conf.chans[1]->band_type == RTW89_BAND_2G ?
 			      RTW89_PHY_1 : RTW89_PHY_0;
 
 		rtw89_phy_write32_mask(rtwdev, R_SYS_DBCC_BE4,
-- 
2.25.1


  parent reply	other threads:[~2026-08-26  6:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26  6:40 [PATCH rtw-next 00/14] wifi: rtw89: update RTL8922D capabilities and settings, and enable P2P device Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 01/14] wifi: rtw89: 8922de: add low latency quirk for Valve device Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 02/14] wifi: rtw89: 8922d: disable VCORE for thermal protection by default Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 03/14] wifi: rtw89: allow two station interfaces in SCC Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 04/14] wifi: rtw89: 8922d: update BB wrapper RFSI ctrl to v4 Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 05/14] wifi: rtw89: 8922d: set BB wrapper settings according to operating channel Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 06/14] wifi: rtw89: 8922d: move conditionally disabled TX shape to common flow Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 07/14] wifi: rtw89: 8922d: update BB wrapper RFSI ctrl to v5 Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 08/14] wifi: rtw89: 8922d: send RFE type to firmware Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 09/14] wifi: rtw89: 8922d: bypass RX IQK when scan Ping-Ke Shih
2026-08-26  6:40 ` Ping-Ke Shih [this message]
2026-08-26  6:40 ` [PATCH rtw-next 11/14] wifi: rtw89: chan: introduce helper and refine active list iteration Ping-Ke Shih
2026-08-26  6:40 ` [PATCH rtw-next 12/14] wifi: rtw89: regd: check only active vifs when recalculating 6 GHz power type Ping-Ke Shih
2026-08-26  6:41 ` [PATCH rtw-next 13/14] wifi: rtw89: skip tracking things when entity is paused Ping-Ke Shih
2026-08-26  6:41 ` [PATCH rtw-next 14/14] wifi: rtw89: add p2p device declaration 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=20260826064101.58892-11-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=echuang@realtek.com \
    --cc=henchy.chen@realtek.com \
    --cc=kevin_yang@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=owen.hsiao@realtek.com \
    --cc=phhuang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.