public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH rtw-next v2 05/11] wifi: rtw89: usb: Enable RX aggregation for RTL8922AU
Date: Sun, 19 Apr 2026 16:43:53 +0300	[thread overview]
Message-ID: <bd9e444f-257c-48c8-8adb-f58432b2c5c2@gmail.com> (raw)
In-Reply-To: <6ba2910d-020c-41bd-86fa-d1b0e0f7a2f5@gmail.com>

It uses the same settings as RTL8852CU, but the register and bit names
have "BE" instead of "AX".

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v2:
 - Add rtw89_usb_rx_agg_cfg_v3() and the register and bit definitions it
   uses, instead of reusing rtw89_usb_rx_agg_cfg_v2().
---
 drivers/net/wireless/realtek/rtw89/usb.c | 14 ++++++++++++++
 drivers/net/wireless/realtek/rtw89/usb.h |  8 ++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index a08e43c8275e..c6d55e669776 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -803,6 +803,17 @@ static void rtw89_usb_rx_agg_cfg_v2(struct rtw89_dev *rtwdev)
 	rtw89_write32(rtwdev, R_AX_RXAGG_1_V1, 0x1F);
 }
 
+static void rtw89_usb_rx_agg_cfg_v3(struct rtw89_dev *rtwdev)
+{
+	const u32 rxagg_0 = FIELD_PREP_CONST(B_BE_RXAGG_0_EN, 1) |
+			    FIELD_PREP_CONST(B_BE_RXAGG_0_NUM_TH, 255) |
+			    FIELD_PREP_CONST(B_BE_RXAGG_0_TIME_32US_TH, 32) |
+			    FIELD_PREP_CONST(B_BE_RXAGG_0_BUF_SZ_1K, 20);
+
+	rtw89_write32(rtwdev, R_BE_RXAGG_0_V1, rxagg_0);
+	rtw89_write32(rtwdev, R_BE_RXAGG_1_V1, 0x1F);
+}
+
 static void rtw89_usb_rx_agg_cfg(struct rtw89_dev *rtwdev)
 {
 	switch (rtwdev->chip->chip_id) {
@@ -814,6 +825,9 @@ static void rtw89_usb_rx_agg_cfg(struct rtw89_dev *rtwdev)
 	case RTL8852C:
 		rtw89_usb_rx_agg_cfg_v2(rtwdev);
 		break;
+	case RTL8922A:
+		rtw89_usb_rx_agg_cfg_v3(rtwdev);
+		break;
 	default:
 		rtw89_warn(rtwdev, "%s: USB RX agg not support\n", __func__);
 		return;
diff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h
index 82de700eb142..bdf312559743 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.h
+++ b/drivers/net/wireless/realtek/rtw89/usb.h
@@ -29,6 +29,14 @@
 
 #define R_AX_RXAGG_1_V1			0x6004
 
+#define R_BE_RXAGG_0_V1			0x6000
+#define B_BE_RXAGG_0_EN			BIT(31)
+#define B_BE_RXAGG_0_NUM_TH		GENMASK(23, 16)
+#define B_BE_RXAGG_0_TIME_32US_TH	GENMASK(15, 8)
+#define B_BE_RXAGG_0_BUF_SZ_1K		GENMASK(7, 0)
+
+#define R_BE_RXAGG_1_V1			0x6004
+
 #define R_AX_RXAGG_0			0x8900
 #define B_AX_RXAGG_0_BUF_SZ_4K		GENMASK(7, 0)
 
-- 
2.53.0


  parent reply	other threads:[~2026-04-19 13:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 13:39 [PATCH rtw-next v2 00/11] wifi: rtw89: Add support for RTL8922AU Bitterblue Smith
2026-04-19 13:40 ` [PATCH rtw-next v2 01/11] wifi: rtw89: usb: Support 2 bulk in endpoints Bitterblue Smith
2026-04-29  3:41   ` Ping-Ke Shih
2026-04-19 13:40 ` [PATCH rtw-next v2 02/11] wifi: rtw89: Fix rtw89_usb_ops_mac_lv1_rcvy() for RTL8922AU Bitterblue Smith
2026-04-19 13:42 ` [PATCH rtw-next v2 03/11] wifi: rtw89: Fix rtw89_usb_ops_mac_pre_init() " Bitterblue Smith
2026-04-19 13:43 ` [PATCH rtw-next v2 04/11] wifi: rtw89: Fix rtw89_usb_ops_mac_post_init() " Bitterblue Smith
2026-04-19 13:43 ` Bitterblue Smith [this message]
2026-04-20  8:38   ` [PATCH rtw-next v2 05/11] wifi: rtw89: usb: Enable RX aggregation " Ping-Ke Shih
2026-04-19 13:44 ` [PATCH rtw-next v2 06/11] wifi: rtw89: Fix rtw8922a_pwr_{on,off}_func() for USB Bitterblue Smith
2026-04-19 13:45 ` [PATCH rtw-next v2 07/11] wifi: rtw89: Let hfc_param_ini have separate settings for USB 2/3 Bitterblue Smith
2026-04-20  8:40   ` Ping-Ke Shih
2026-04-19 13:45 ` [PATCH rtw-next v2 08/11] wifi: rtw89: Add rtw8922a_hfc_param_ini_usb{2,3} Bitterblue Smith
2026-04-19 13:46 ` [PATCH rtw-next v2 09/11] wifi: rtw89: Add rtw8922a_dle_mem_usb{2,3} Bitterblue Smith
2026-04-19 13:47 ` [PATCH rtw-next v2 10/11] wifi: rtw89: Add rtw8922au.c Bitterblue Smith
2026-04-20  8:41   ` Ping-Ke Shih
2026-04-19 13:49 ` [PATCH rtw-next v2 11/11] wifi: rtw89: Enable the new rtw89_8922au module Bitterblue Smith
2026-04-20  8:20 ` [PATCH rtw-next v2 00/11] wifi: rtw89: Add support for RTL8922AU Ping-Ke Shih
2026-04-20 18:22   ` Bitterblue Smith
2026-04-21  1:09     ` Ping-Ke Shih
2026-04-21  1:18       ` 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=bd9e444f-257c-48c8-8adb-f58432b2c5c2@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --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