From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Fedor Pchelkin <pchelkin@ispras.ru>, Ping-Ke Shih <pkshih@realtek.com>
Cc: Zong-Zhe Yang <kevin_yang@realtek.com>,
Po-Hao Huang <phhuang@realtek.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH rtw-next v2 0/7] wifi: rtw89: improvements for USB part
Date: Sat, 4 Oct 2025 20:37:17 +0300 [thread overview]
Message-ID: <88f30433-98fa-4f9a-bbe3-9d630b72c2e4@gmail.com> (raw)
In-Reply-To: <20251002200857.657747-1-pchelkin@ispras.ru>
On 02/10/2025 23:08, Fedor Pchelkin wrote:
> The first two patches concern memory leak issues found during testing.
>
> The third and the fourth one do some extra small changes.
>
> The other ones implement TX completion functionality missing for the USB
> part of rtw89 driver, suggested by Bitterblue Smith [1]. This will allow
> handling TX wait skbs and the ones flagged with IEEE80211_TX_CTL_REQ_TX_STATUS
> correctly.
>
> rtw89 has several ways of handling TX status report events. The first one
> is based on RPP feature which is used by PCIe HCI. The other one depends
> on firmware sending a corresponding C2H message, quite similar to what
> rtw88 has. RTL8851BU vendor driver [2] was taken for reference.
>
> [1]: https://lore.kernel.org/linux-wireless/0cb4d19b-94c7-450e-ac56-8b0d4a1d889f@gmail.com/
> [2]: https://github.com/fofajardo/rtl8851bu.git
>
> Series has been tested to work with RTL8851BU (USB) and RTL8852BE (PCIe)
> devices.
>
>
> Changelog.
>
> v2: - add new 3/7 and 4/7 patches prepared due feedback to previous comments
> or developed in process
> - further changelog below --- in the patches
>
> v1: https://lore.kernel.org/linux-wireless/20250920132614.277719-1-pchelkin@ispras.ru/
>
> Fedor Pchelkin (7):
> wifi: rtw89: usb: use common error path for skbs in
> rtw89_usb_rx_handler()
> wifi: rtw89: usb: fix leak in rtw89_usb_write_port()
> wifi: rtw89: usb: use ieee80211_free_txskb() where appropriate
> wifi: rtw89: refine rtw89_core_tx_wait_complete()
> wifi: rtw89: implement C2H TX report handler
> wifi: rtw89: handle IEEE80211_TX_CTL_REQ_TX_STATUS frames for USB
> wifi: rtw89: process TX wait skbs for USB via C2H handler
>
> drivers/net/wireless/realtek/rtw89/core.c | 41 ++++++++++++---
> drivers/net/wireless/realtek/rtw89/core.h | 45 +++++++++++++----
> drivers/net/wireless/realtek/rtw89/fw.h | 14 ++++++
> drivers/net/wireless/realtek/rtw89/mac.c | 46 +++++++++++++++++
> drivers/net/wireless/realtek/rtw89/mac.h | 61 +++++++++++++++++++++++
> drivers/net/wireless/realtek/rtw89/pci.c | 2 +-
> drivers/net/wireless/realtek/rtw89/pci.h | 4 --
> drivers/net/wireless/realtek/rtw89/txrx.h | 6 ++-
> drivers/net/wireless/realtek/rtw89/usb.c | 41 +++++++++++----
> 9 files changed, 228 insertions(+), 32 deletions(-)
>
I tested these patches with RTL8851BU, RTL8832AU, RTL8832BU, RTL8832CU, and
RTL8912AU. They all work, with a few additions.
Before these patches RTL8851BU and RTL8832AU would remain "connected" when
I power off the router. That's because they don't have beacon filtering in
the firmware and the null frames sent by mac80211 were always marked with
IEEE80211_TX_STAT_ACK. With these patches they disconnect immediately when
I power off the router. So that works nicely.
What doesn't work is TX reports for management frames. Currently rtw89
doesn't configure the firmware to provide TX reports for the management
queue. That can be enabled with SET_CMC_TBL_MGQ_RPT_EN for the wifi 6 chips
and with CCTLINFO_G7_W0_MGQ_RPT_EN for RTL8922AU.
The other thing that doesn't work is the TX reports are different for
RTL8852CU and RTL8922AU. It's only a small difference for RTL8852CU:
#define RTW89_C2H_MAC_TX_RPT_W5_DATA_TX_CNT_V1 GENMASK(15, 10)
RTL8922AU is more strange. It needs something like this:
#define RTW89_C2H_MAC_TX_RPT_W12_TX_STATE_V2 GENMASK(9, 8)
#define RTW89_C2H_MAC_TX_RPT_W12_SW_DEFINE_V2 GENMASK(15, 12)
#define RTW89_C2H_MAC_TX_RPT_W14_DATA_TX_CNT_V2 GENMASK(15, 10)
The C2H is 80 bytes here (header included).
I think that's everything.
next prev parent reply other threads:[~2025-10-04 17:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 20:08 [PATCH rtw-next v2 0/7] wifi: rtw89: improvements for USB part Fedor Pchelkin
2025-10-02 20:08 ` [PATCH rtw-next v2 1/7] wifi: rtw89: usb: use common error path for skbs in rtw89_usb_rx_handler() Fedor Pchelkin
2025-10-07 2:46 ` Ping-Ke Shih
2025-10-02 20:08 ` [PATCH rtw-next v2 2/7] wifi: rtw89: usb: fix leak in rtw89_usb_write_port() Fedor Pchelkin
2025-10-02 20:08 ` [PATCH rtw-next v2 3/7] wifi: rtw89: usb: use ieee80211_free_txskb() where appropriate Fedor Pchelkin
2025-10-07 2:51 ` Ping-Ke Shih
2025-10-02 20:08 ` [PATCH rtw-next v2 4/7] wifi: rtw89: refine rtw89_core_tx_wait_complete() Fedor Pchelkin
2025-10-07 2:54 ` Ping-Ke Shih
2025-10-02 20:08 ` [PATCH rtw-next v2 5/7] wifi: rtw89: implement C2H TX report handler Fedor Pchelkin
2025-10-07 3:13 ` Ping-Ke Shih
2025-10-02 20:08 ` [PATCH rtw-next v2 6/7] wifi: rtw89: handle IEEE80211_TX_CTL_REQ_TX_STATUS frames for USB Fedor Pchelkin
2025-10-07 6:31 ` Ping-Ke Shih
2025-10-14 21:23 ` Fedor Pchelkin
2025-10-15 1:43 ` Ping-Ke Shih
2025-10-15 7:51 ` Fedor Pchelkin
2025-10-16 0:54 ` Ping-Ke Shih
2025-10-17 10:06 ` Fedor Pchelkin
2025-10-02 20:08 ` [PATCH rtw-next v2 7/7] wifi: rtw89: process TX wait skbs for USB via C2H handler Fedor Pchelkin
2025-10-03 2:23 ` Zong-Zhe Yang
2025-10-07 8:07 ` Ping-Ke Shih
2025-10-11 16:06 ` Fedor Pchelkin
2025-10-13 0:59 ` Ping-Ke Shih
2025-10-04 17:37 ` Bitterblue Smith [this message]
2025-10-11 14:57 ` [PATCH rtw-next v2 0/7] wifi: rtw89: improvements for USB part Fedor Pchelkin
2025-10-11 22:49 ` Bitterblue Smith
2025-10-14 21:33 ` Fedor Pchelkin
2025-10-20 13:52 ` 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=88f30433-98fa-4f9a-bbe3-9d630b72c2e4@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=kevin_yang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=pchelkin@ispras.ru \
--cc=phhuang@realtek.com \
--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