Linux wireless drivers development
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
	PierluigiFrullani <pierluigi.frullani@frumar.it>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Problems with rtw89 on 5Ghz wlans.
Date: Mon, 5 Oct 2026 23:09:13 +0300	[thread overview]
Message-ID: <5c5292e2-b52a-4cb3-9016-45840c490630@gmail.com> (raw)
In-Reply-To: <2f8b1f510df840e1a73a3321e77bbc1b@realtek.com>

On 05/10/2026 05:30, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>>>> diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b.c
>>>> b/drivers/net/wireless/realtek/rtw89/rtw8852b.c
>>>>> index 356623341f65..c9ee3c76cfc9 100644
>>>>> --- a/drivers/net/wireless/realtek/rtw89/rtw8852b.c
>>>>> +++ b/drivers/net/wireless/realtek/rtw89/rtw8852b.c
>>>>> @@ -771,6 +771,15 @@ static void rtw8852b_btc_set_rfe(struct rtw89_dev *rtwdev)
>>>>>      } else {
>>>>>          md->ant.type = BTC_ANT_SHARED;
>>>>>          md->bt0_pos = BTC_BT_BTG;
>>>>> +
>>>>> +        if (md->rfe_type == 41) {
>>>
>>> Use the same quirk by the way.
>>>
>>
>> This was the initial version of the patch. Since then I changed
>> it to check hal->tx_nss and hal->rx_nss, to mirror what the
>> vendor driver does. Is that okay?
> 
> I checked vendor driver. It looks like this:
> 
>         if (phy_hw[0].tx_num == 1 && phy_hw[0].tx_path_num == 2 &&
>                 phy_hw[0].rx_num == 1 && phy_hw[0].rx_path_num == 2) {
> 
>                 if (rfe_type == 41) {
>                         RF_DBG(rf, DBG_RF_INIT, "%s: rfe_type: %d set to 1T1R\n", __func__, rfe_type);
>                         phy_hw[0].tx_path_num = 1;
>                         phy_hw[0].rx_path_num = 1;
>                 } else if (rfe_type == 43) {
>                         RF_DBG(rf, DBG_RF_INIT, "%s: rfe_type: %d set to 1T2R\n", __func__, rfe_type);
>                         phy_hw[0].tx_path_num = 2;
>                         phy_hw[0].rx_path_num = 2;
>                 }
>         }
> 
> I'm not sure the "mirror" you menat. 

I meant the check in rtw8852b_btc_set_rfe(). Originally I checked
rfe_type, then later I went back to the vendor driver and traced
where p->phy_cap[0].txss and p->phy_cap[0].rxss came from, and
replaced the rfe_type check with hal->tx_nss and hal->rx_nss.

> I feel it is okay to check tx_num/tx_patch_num before doing override the values
> at first glance. But think a bit more, it looks like no checking will be also
> okay, because I don't think rfe_type 41 can be another configuration.
> 
> By the way, my thinking of this patch is 
> 
> 1. after reading efuse. If rfe_type 41 --> set a quirk
> 2. by quirk, set BTC
> 3. by quirk, set tx_nss/tx_ant
> 
> With the quirk, it will be easier to understand 2 and 3 related things. 

Sounds good.

      reply	other threads:[~2026-10-05 20:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  9:21 Problems with rtw89 on 5Ghz wlans PierluigiFrullani
2026-10-01 14:06 ` Bitterblue Smith
2026-10-02  3:44   ` Ping-Ke Shih
2026-10-02 17:02     ` Bitterblue Smith
2026-10-03 14:15       ` Luka Gejak
2026-10-05  2:30       ` Ping-Ke Shih
2026-10-05 20:09         ` Bitterblue Smith [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=5c5292e2-b52a-4cb3-9016-45840c490630@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pierluigi.frullani@frumar.it \
    --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