From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 5/7] wifi: rtw88: Extend rtw_fw_send_ra_info() for RTL8814AU
Date: Thu, 30 Jan 2025 09:12:00 +0000 [thread overview]
Message-ID: <975cf4b88f43484e8411764fd72d8313@realtek.com> (raw)
In-Reply-To: <86aae394-be5d-4fca-a68c-2ee02e5ab6af@gmail.com>
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>On 29/01/2025 04:43, Ping-Ke Shih wrote:
>> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>> On 28/01/2025 07:52, Ping-Ke Shih wrote:
>>>> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>>>> On 27/01/2025 08:36, Ping-Ke Shih wrote:
>>>>>> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>>>>>> The existing code is suitable for chips with up to 2 spatial streams.
>>>>>>> Inform the firmware about the rates it's allowed to use when
>>>>>>> transmitting 3 spatial streams.
>>>>>>>
>>>>>>> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
>>>>>>> ---
>>>>>>> drivers/net/wireless/realtek/rtw88/fw.c | 14 ++++++++++++++
>>>>>>> drivers/net/wireless/realtek/rtw88/fw.h | 1 +
>>>>>>> 2 files changed, 15 insertions(+)
>>>>>>>
>>>>>>> diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
>>>>>>> index 02389b7c6876..0ca1b139110d 100644
>>>>>>> --- a/drivers/net/wireless/realtek/rtw88/fw.c
>>>>>>> +++ b/drivers/net/wireless/realtek/rtw88/fw.c
>>>>>>> @@ -735,6 +735,7 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
>>>>>>> {
>>>>>>> u8 h2c_pkt[H2C_PKT_SIZE] = {0};
>>>>>>> bool disable_pt = true;
>>>>>>> + u32 mask_hi;
>>>>>>>
>>>>>>> SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO);
>>>>>>>
>>>>>>> @@ -755,6 +756,19 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
>>>>>>> si->init_ra_lv = 0;
>>>>>>>
>>>>>>> rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
>>>>>>> +
>>>>>>> + if (rtwdev->chip->rf_tbl[RF_PATH_C]) {
>>>>>>
>>>>>> Using `efuse->hw_cap.nss >= 3` would be consistent with latter patch.
>>>>>>
>>>>>
>>>>> I would like that, but nss is 2 when RTL8814AU is in USB 2 mode.
>>>>> I assume this is to keep the current draw under the 500 mA limit
>>>>> of USB 2.
>>>>>
>>>>> What about rtwdev->hal.rf_path_num >= 3 ? I don't remember why
>>>>> I didn't do that.
>>>>
>>>> I think `rtwdev->hal.rf_path_num >= 3` is suitable to initialize/configure
>>>> hardware registers, because no matter USB 2 or 3 mode should be the same.
>>>>
>>>> For this case (RA info), this is related to protocol, so I feel
>>>> `efuse->hw_cap.nss >= 3` is suitable, but I have not seen a patch to declare
>>>> supported NSS in register_hw(), or I missed it? Or, without RA_INFO_HI,
>>>> it gets abnormal rate to RTL8814AU in your test?
>>>>
>>>
>>> You didn't miss it, that will be in part 3. You can see the code here:
>>>
>>> https://github.com/lwfinger/rtw88/blob/21a3fa7ec11a0cbb3be14145f45cdca35c3d3217/rtw8814a.c#L82
>>>
>>
>> I feel we should clearly define the meaning. What I thought for 8814AU are:
>> - hal->rf_type: hardware capability. Should be RF_3T3R no matter USB 2 or 3.
>> - hal->antenna_tx: the antenna for current TX. Can be 2 antenna.
>> - hal->antenna_rx: the antenna for current RX. Can be 2 antenna.
>> - efuse->hw_cap.nss: read from efuse. So this will be 3SS for USB 2/3.
>> If you have better defnitiion, please share your ideas.
>>
>
> If efuse->hw_cap.nss is always 3, how to limit the spatial streams
> to 2 in USB 2 mode?
That's a proposal only, because I felt `efuse->hw_cap.nss` read from efuse
should be persistent, but it is fine to define desired meaning.
I would like to confirm if USB devices will not switch USB 2/3 mode
after USB probe? If so, `efuse->hw_cap.nss` is also a kind of persistent.
Then, using `efuse->hw_cap.nss` seems fine.
next prev parent reply other threads:[~2025-01-30 9:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-26 22:53 [PATCH 0/7] wifi: rtw88: Prepare to support RTL8814AU (part 1/2) Bitterblue Smith
2025-01-26 22:53 ` [PATCH 1/7] wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU Bitterblue Smith
2025-01-27 6:06 ` Ping-Ke Shih
2025-01-26 22:54 ` [PATCH 2/7] wifi: rtw88: Fix download_firmware_validate() " Bitterblue Smith
2025-01-27 6:21 ` Ping-Ke Shih
2025-01-26 22:55 ` [PATCH 3/7] wifi: rtw88: Extend struct rtw_pwr_track_tbl " Bitterblue Smith
2025-01-27 6:23 ` Ping-Ke Shih
2025-01-26 22:55 ` [PATCH 4/7] wifi: rtw88: Extend rf_base_addr and rf_sipi_addr " Bitterblue Smith
2025-01-27 6:26 ` Ping-Ke Shih
2025-01-26 22:56 ` [PATCH 5/7] wifi: rtw88: Extend rtw_fw_send_ra_info() " Bitterblue Smith
2025-01-27 6:36 ` Ping-Ke Shih
2025-01-27 23:18 ` Bitterblue Smith
2025-01-28 5:52 ` Ping-Ke Shih
2025-01-28 17:17 ` Bitterblue Smith
2025-01-29 2:43 ` Ping-Ke Shih
2025-01-29 23:14 ` Bitterblue Smith
2025-01-30 9:12 ` Ping-Ke Shih [this message]
2025-01-30 21:16 ` Bitterblue Smith
2025-01-26 23:01 ` [PATCH 6/7] wifi: rtw88: Extend TX power stuff for 3-4 spatial streams Bitterblue Smith
2025-01-27 7:06 ` Ping-Ke Shih
2025-01-26 23:02 ` [PATCH 7/7] wifi: rtw88: Fix rtw_update_sta_info() for RTL8814AU Bitterblue Smith
2025-01-27 7:14 ` 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=975cf4b88f43484e8411764fd72d8313@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rtl8821cerfe2@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 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.