All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <gary.chang@realtek.com>, <echuang@realtek.com>,
	<wenjie.tsai@realtek.com>, <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 6/6] wifi: rtw89: pack I/O during RF nctl init to reduce execution time
Date: Wed, 30 Sep 2026 14:45:24 +0800	[thread overview]
Message-ID: <20260930064524.39403-7-pkshih@realtek.com> (raw)
In-Reply-To: <20260930064524.39403-1-pkshih@realtek.com>

From: Johnson Tsai <wenjie.tsai@realtek.com>

Wrap the register writes of rtw89_phy_init_rf_nctl() with
rtw89_io_pack/unpack so they are batched into single bus transactions,
reducing API execution time.

8852C USB2.0 AMD B450 initialization time:
    rtw89_phy_init_rf_nctl                  5355 ms -> 10 ms

Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/phy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c
index 074865665b16..795920b899d9 100644
--- a/drivers/net/wireless/realtek/rtw89/phy.c
+++ b/drivers/net/wireless/realtek/rtw89/phy.c
@@ -2071,7 +2071,10 @@ static void rtw89_phy_init_rf_nctl(struct rtw89_dev *rtwdev)
 	rtw89_phy_preinit_rf_nctl(rtwdev);
 
 	nctl_table = elm_info->rf_nctl ? elm_info->rf_nctl : chip->nctl_table;
+
+	rtw89_io_pack(rtwdev);
 	rtw89_phy_init_reg(rtwdev, nctl_table, false, rtw89_phy_config_bb_reg, NULL);
+	rtw89_io_unpack(rtwdev);
 
 	if (chip->nctl_post_table)
 		rtw89_rfk_parser(rtwdev, chip->nctl_post_table);
-- 
2.25.1


      parent reply	other threads:[~2026-09-30  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih
2026-09-30  6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih
2026-10-07  3:47   ` Ping-Ke Shih
2026-09-30  6:45 ` [PATCH rtw-next 2/6] wifi: rtw89: pci: fix typo of "deliver" Ping-Ke Shih
2026-09-30  6:45 ` [PATCH rtw-next 3/6] wifi: rtw89: rx: refine skb/desc naming to improve readability Ping-Ke Shih
2026-09-30  6:45 ` [PATCH rtw-next 4/6] wifi: rtw89: rx: no need to cancel 6 GHz probe per vif Ping-Ke Shih
2026-09-30  6:45 ` [PATCH rtw-next 5/6] wifi: rtw89: phy: write full data for BB gain table type 15 Ping-Ke Shih
2026-09-30  6:45 ` Ping-Ke Shih [this message]

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=20260930064524.39403-7-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=echuang@realtek.com \
    --cc=gary.chang@realtek.com \
    --cc=kevin_yang@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wenjie.tsai@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.