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 08/11] wifi: rtw89: Add rtw8922a_hfc_param_ini_usb{2,3}
Date: Sun, 19 Apr 2026 16:45:55 +0300 [thread overview]
Message-ID: <474eb37a-a2e1-434a-b648-9e4b78e604d2@gmail.com> (raw)
In-Reply-To: <6ba2910d-020c-41bd-86fa-d1b0e0f7a2f5@gmail.com>
"hfc" means "hci fc" which is "Host Control Interface Flow Control".
These are some parameters needed for RTL8922AU.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
---
v2:
- Add Acked-by.
---
drivers/net/wireless/realtek/rtw89/mac.c | 3 +
drivers/net/wireless/realtek/rtw89/mac.h | 3 +
drivers/net/wireless/realtek/rtw89/rtw8922a.c | 125 +++++++++++++++++-
3 files changed, 130 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 8d5375ec33a2..9058312322e0 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -1716,6 +1716,9 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
.hfc_preccfg_pcie = {2, 40, 0, 0, 1, 0, 0, 0},
.hfc_prec_cfg_c0 = {2, 32, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0},
.hfc_prec_cfg_c2 = {0, 256, 0, 0, 0, 0, 0, 0, 0, 256, 0, 0},
+ .hfc_prec_cfg_c3 = {18, 32, 148, 148, 1, 1, 1, 1},
+ .hfc_prec_cfg_c5 = {18, 32, 148, 148, 1, 1, 0, 1},
+ .hfc_prec_cfg_c6 = {8, 32, 148, 148, 1, 1, 0, 1},
/* PCIE 64 */
.wde_size0 = {RTW89_WDE_PG_64, 4095, 1,},
.wde_size0_v1 = {RTW89_WDE_PG_64, 3328, 0, 0,},
diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
index 9db9ae219cd6..3aad234b2a0f 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.h
+++ b/drivers/net/wireless/realtek/rtw89/mac.h
@@ -926,6 +926,9 @@ struct rtw89_mac_size_set {
const struct rtw89_hfc_prec_cfg hfc_preccfg_pcie;
const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c0;
const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c2;
+ const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c3;
+ const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c5;
+ const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c6;
const struct rtw89_dle_size wde_size0;
const struct rtw89_dle_size wde_size1;
const struct rtw89_dle_size wde_size0_v1;
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8922a.c b/drivers/net/wireless/realtek/rtw89/rtw8922a.c
index b247980cc9ec..380049ef15b5 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922a.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922a.c
@@ -57,6 +57,126 @@ static const struct rtw89_hfc_param_ini rtw8922a_hfc_param_ini_pcie[] = {
[RTW89_QTA_INVALID] = {NULL},
};
+static const struct rtw89_hfc_ch_cfg rtw8922a_hfc_chcfg_ch7[] = {
+ {54, 222, grp_0}, /* ACH 0 */
+ {0, 0, grp_0}, /* ACH 1 */
+ {54, 222, grp_0}, /* ACH 2 */
+ {0, 0, grp_0}, /* ACH 3 */
+ {54, 222, grp_0}, /* ACH 4 */
+ {0, 0, grp_0}, /* ACH 5 */
+ {54, 222, grp_0}, /* ACH 6 */
+ {0, 0, grp_0}, /* ACH 7 */
+ {54, 222, grp_0}, /* B0MGQ */
+ {0, 0, grp_0}, /* B0HIQ */
+ {54, 222, grp_0}, /* B1MGQ */
+ {0, 0, grp_0}, /* B1HIQ */
+ {0, 0, 0}, /* FWCMDQ */
+ {0, 0, 0}, /* BMC */
+ {0, 0, 0}, /* H2D */
+};
+
+static const struct rtw89_hfc_pub_cfg rtw8922a_hfc_pubcfg_p7 = {
+ 492, /* Group 0 */
+ 0, /* Group 1 */
+ 492, /* Public Max */
+ 0, /* WP threshold */
+};
+
+static const struct rtw89_hfc_ch_cfg rtw8922a_hfc_chcfg_ch8[] = {
+ {24, 196, grp_0}, /* ACH 0 */
+ {0, 0, grp_0}, /* ACH 1 */
+ {54, 226, grp_0}, /* ACH 2 */
+ {0, 0, grp_0}, /* ACH 3 */
+ {54, 196, grp_1}, /* ACH 4 */
+ {0, 0, grp_1}, /* ACH 5 */
+ {54, 196, grp_1}, /* ACH 6 */
+ {0, 0, grp_1}, /* ACH 7 */
+ {54, 226, grp_0}, /* B0MGQ */
+ {0, 0, grp_0}, /* B0HIQ */
+ {54, 196, grp_1}, /* B1MGQ */
+ {0, 0, grp_0}, /* B1HIQ */
+ {0, 0, 0}, /* FWCMDQ */
+ {0, 0, 0}, /* BMC */
+ {0, 0, 0}, /* H2D */
+};
+
+static const struct rtw89_hfc_pub_cfg rtw8922a_hfc_pubcfg_p8 = {
+ 304, /* Group 0 */
+ 304, /* Group 1 */
+ 608, /* Public Max */
+ 96, /* WP threshold */
+};
+
+static const struct rtw89_hfc_param_ini rtw8922a_hfc_param_ini_usb2[] = {
+ [RTW89_QTA_SCC] = {rtw8922a_hfc_chcfg_ch7, &rtw8922a_hfc_pubcfg_p7,
+ &rtw89_mac_size.hfc_prec_cfg_c5, RTW89_HCIFC_STF},
+ [RTW89_QTA_DBCC] = {rtw8922a_hfc_chcfg_ch8, &rtw8922a_hfc_pubcfg_p8,
+ &rtw89_mac_size.hfc_prec_cfg_c6, RTW89_HCIFC_STF},
+ [RTW89_QTA_DLFW] = {NULL, NULL, &rtw89_mac_size.hfc_prec_cfg_c2,
+ RTW89_HCIFC_POH},
+ [RTW89_QTA_INVALID] = {NULL},
+};
+
+static const struct rtw89_hfc_ch_cfg rtw8922a_hfc_chcfg_ch4[] = {
+ {54, 606, grp_0}, /* ACH 0 */
+ {0, 0, grp_0}, /* ACH 1 */
+ {54, 606, grp_0}, /* ACH 2 */
+ {0, 0, grp_0}, /* ACH 3 */
+ {54, 606, grp_0}, /* ACH 4 */
+ {0, 0, grp_0}, /* ACH 5 */
+ {54, 606, grp_0}, /* ACH 6 */
+ {0, 0, grp_0}, /* ACH 7 */
+ {54, 606, grp_0}, /* B0MGQ */
+ {0, 0, grp_0}, /* B0HIQ */
+ {54, 606, grp_0}, /* B1MGQ */
+ {0, 0, grp_0}, /* B1HIQ */
+ {0, 0, 0}, /* FWCMDQ */
+ {0, 0, 0}, /* BMC */
+ {0, 0, 0}, /* H2D */
+};
+
+static const struct rtw89_hfc_pub_cfg rtw8922a_hfc_pubcfg_p4 = {
+ 876, /* Group 0 */
+ 0, /* Group 1 */
+ 876, /* Public Max */
+ 0, /* WP threshold */
+};
+
+static const struct rtw89_hfc_ch_cfg rtw8922a_hfc_chcfg_ch5[] = {
+ {54, 311, grp_0}, /* ACH 0 */
+ {0, 0, grp_0}, /* ACH 1 */
+ {54, 311, grp_0}, /* ACH 2 */
+ {0, 0, grp_0}, /* ACH 3 */
+ {54, 311, grp_1}, /* ACH 4 */
+ {0, 0, grp_1}, /* ACH 5 */
+ {54, 311, grp_1}, /* ACH 6 */
+ {0, 0, grp_1}, /* ACH 7 */
+ {54, 311, grp_0}, /* B0MGQ */
+ {0, 0, grp_0}, /* B0HIQ */
+ {54, 311, grp_1}, /* B1MGQ */
+ {0, 0, grp_0}, /* B1HIQ */
+ {0, 0, 0}, /* FWCMDQ */
+ {0, 0, 0}, /* BMC */
+ {0, 0, 0}, /* H2D */
+};
+
+static const struct rtw89_hfc_pub_cfg rtw8922a_hfc_pubcfg_p5 = {
+ 419, /* Group 0 */
+ 419, /* Group 1 */
+ 838, /* Public Max */
+ 0, /* WP threshold */
+};
+
+static const struct rtw89_hfc_param_ini rtw8922a_hfc_param_ini_usb3[] = {
+ [RTW89_QTA_SCC] = {rtw8922a_hfc_chcfg_ch4, &rtw8922a_hfc_pubcfg_p4,
+ &rtw89_mac_size.hfc_prec_cfg_c3, RTW89_HCIFC_STF},
+ [RTW89_QTA_DBCC] = {rtw8922a_hfc_chcfg_ch5, &rtw8922a_hfc_pubcfg_p5,
+ &rtw89_mac_size.hfc_prec_cfg_c3, RTW89_HCIFC_STF},
+ [RTW89_QTA_DLFW] = {NULL, NULL, &rtw89_mac_size.hfc_prec_cfg_c2,
+ RTW89_HCIFC_POH},
+ [RTW89_QTA_INVALID] = {NULL},
+};
+
static const struct rtw89_dle_mem rtw8922a_dle_mem_pcie[] = {
[RTW89_QTA_SCC] = {RTW89_QTA_SCC, &rtw89_mac_size.wde_size0_v1,
&rtw89_mac_size.ple_size0_v1, &rtw89_mac_size.wde_qt0_v1,
@@ -2969,7 +3089,10 @@ const struct rtw89_chip_info rtw8922a_chip_info = {
.max_rx_agg_num = 64,
.dis_2g_40m_ul_ofdma = false,
.rsvd_ple_ofst = 0x8f800,
- .hfc_param_ini = {rtw8922a_hfc_param_ini_pcie, NULL, NULL, NULL},
+ .hfc_param_ini = {rtw8922a_hfc_param_ini_pcie,
+ rtw8922a_hfc_param_ini_usb2,
+ rtw8922a_hfc_param_ini_usb3,
+ NULL},
.dle_mem = {rtw8922a_dle_mem_pcie, NULL, NULL, NULL},
.wde_qempty_acq_grpnum = 4,
.wde_qempty_mgq_grpsel = 4,
--
2.53.0
next prev parent reply other threads:[~2026-04-19 13:45 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 ` [PATCH rtw-next v2 05/11] wifi: rtw89: usb: Enable RX aggregation " Bitterblue Smith
2026-04-20 8:38 ` 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 ` Bitterblue Smith [this message]
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=474eb37a-a2e1-434a-b648-9e4b78e604d2@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 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.