From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Bitterblue Smith" <rtl8821cerfe2@gmail.com>,
"Ping-Ke Shih" <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
"Michael Straube" <straube.linux@gmail.com>,
"Peter Robinson" <pbrobinson@gmail.com>,
luka.gejak@linux.dev
Subject: Re: [PATCH v4 3/6] wifi: rtw88: 8723b: add the RTL8723B chip driver
Date: Wed, 30 Sep 2026 08:20:31 +0000 [thread overview]
Message-ID: <6aa5303bd95549de53c37dbeafe544ce886a4183@linux.dev> (raw)
In-Reply-To: <a1ef423d-519d-47bb-be6c-d413a8421943@gmail.com>
September 29, 2026 at 13:28, "Bitterblue Smith" <rtl8821cerfe2@gmail.com mailto:rtl8821cerfe2@gmail.com?to=%22Bitterblue%20Smith%22%20%3Crtl8821cerfe2%40gmail.com%3E > wrote:
>
> On 29/09/2026 13:10, Luka Gejak wrote:
>
>>
>> static void rtw8723b_lck(struct rtw_dev *rtwdev)
>> {
>> ...
>> rtw_write_rf(rtwdev, RF_PATH_A, 0xb0, RFREG_MASK, 0xdfbe0);
>> rtw_write_rf(rtwdev, RF_PATH_A, RF_CFGCH, MASK12BITS, lc_cal | BIT_LCK);
>> ...
>> rtw_write_rf(rtwdev, RF_PATH_A, 0xb0, RFREG_MASK, 0xdffe0);
>> }
>
> Why drop this function? You don't know what RF_SYN_PFD is for.
> Maybe it's required every time it does LC calibration?
That is rtw8723b_lck(). You are right about the pair, and I had it
backwards. The vendor writes it inside the calibration itself, in
_phy_lc_calibrate_8723b(), which is what halrf_lck_trigger() calls for
this chip, at init and from the power tracking: 0xDFBE0 on RF reg 0xB0
before the LCK trigger and 0xDFFE0 after it. rtw8723x_lck() does not
touch 0xB0, so every calibration after the first one ran with the LDO
off.
The pair is back, and it is the whole function now:
static void rtw8723b_lck(struct rtw_dev *rtwdev)
{
rtw_write_rf(rtwdev, RF_PATH_A, RF_SYN_PFD, RFREG_MASK, 0xdfbe0);
rtw8723x_lck(rtwdev);
rtw_write_rf(rtwdev, RF_PATH_A, RF_SYN_PFD, RFREG_MASK, 0xdffe0);
}
The RF_MODE standby pair stays gone, it only runs in the continuous TX
branch of the vendor. On the card RF_SYN_PFD reads 0xdfbe0 at the LCK
now and 0xdffe0 before, and the LCK completes in both cases.
>> rtw8723b_reassert_rx_path(rtwdev);
>>
>> if (rtw_is_8723bs(rtwdev)) {
>> ...
>> rtw_write_rf(rtwdev, RF_PATH_A, RF_WLINT, RFREG_MASK,
>> 0x0780);
>> }
>
> So the driver doesn't work if you delete this part?
It does, and I removed it, both the helper and the block. Its own record
is against it too: four of the five registers it checks already held
the value it was about to write, and the RF_WLINT write it depends on
did not take effect at the time. The stall it was added for was the
firmware dropping unicast management frames, so it can safely go out.
>> iqk:
>> if (do_iqk)
>> rtw8723b_phy_calibration(rtwdev);
>
> Different chips can have different needs...
You are right, and the vendor says it outright. Its power tracking
excludes this chip from the IQK rerun, and the LCK just above it is not
excluded, so the chip now redoes the LCK on a drift and leaves the IQK
alone. I forced iqk_threshold to 1 to exercise it: the LCK ran, no IQK,
link stayed up.
>> /* REG_CSRATIO does not exist on this chip generation. */
>> .cck_pd_set = NULL,
>
> A better idea: move rtw88xxa_phy_cck_pd_set() to phy.c and don't depend
> on rtw88_88xxa. That can be a separate patch, of course.
Done, and it took the other two calls with it. It is
rtw_phy_cck_pd_set() in phy.c now, and the adaptive control and EDCA
init are rtw_mac_init_* in mac.c, so RTW88_8723B no longer selects
RTW88_88XXA. rtw88_8723b.ko depends on rtw88_core and rtw88_8723x only,
the same two modules as rtw8723d and rtw8703b, and the patch is the
first of the series.
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-09-30 8:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 21:35 [PATCH v4 0/6] wifi: rtw88: add RTL8723B/RTL8723BS support Luka Gejak
2026-09-23 21:35 ` [PATCH v4 1/6] wifi: rtw88: 8723b: add the RTL8723B register definitions Luka Gejak
2026-09-27 15:20 ` Bitterblue Smith
2026-09-23 21:35 ` [PATCH v4 2/6] wifi: rtw88: 8723b: add the RTL8723B BB, RF and AGC tables Luka Gejak
2026-09-23 21:35 ` [PATCH v4 3/6] wifi: rtw88: 8723b: add the RTL8723B chip driver Luka Gejak
2026-09-27 15:21 ` Bitterblue Smith
2026-09-27 17:29 ` Bitterblue Smith
2026-09-29 10:13 ` Luka Gejak
2026-09-29 11:28 ` Bitterblue Smith
2026-09-30 8:44 ` Luka Gejak
2026-09-29 10:10 ` Luka Gejak
2026-09-29 11:28 ` Bitterblue Smith
2026-09-30 8:20 ` Luka Gejak [this message]
2026-09-23 21:35 ` [PATCH v4 4/6] wifi: rtw88: 8723bs: add the RTL8723BS SDIO bind Luka Gejak
2026-09-23 21:35 ` [PATCH v4 5/6] wifi: rtw88: 8723bs: enable building the RTL8723BS driver Luka Gejak
2026-09-23 21:35 ` [PATCH v4 6/6] MAINTAINERS: add entry for the RTL8723B rtw88 driver Luka Gejak
2026-09-24 1:24 ` Ping-Ke Shih
2026-09-24 5:58 ` Luka Gejak
2026-09-29 1:15 ` Ping-Ke Shih
2026-09-29 6:36 ` Luka Gejak
2026-09-29 6:47 ` Luka Gejak
2026-09-29 9:08 ` Ping-Ke Shih
2026-09-29 9:17 ` Luka Gejak
2026-09-25 14:27 ` Bitterblue Smith
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=6aa5303bd95549de53c37dbeafe544ce886a4183@linux.dev \
--to=luka.gejak@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pbrobinson@gmail.com \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=straube.linux@gmail.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
all inboxes | Powered by JetHome®