summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBitterblue Smith <rtl8821cerfe2@gmail.com>2025-11-07 19:08:14 +0300
committerPing-Ke Shih <pkshih@realtek.com>2025-11-11 05:02:40 +0300
commitc19b106609f398b3b1b14a89dc68ed0244420d08 (patch)
tree8968c8bcdeebd13e55e9e34c47e11645a7ac0287
parent0eea5e0f03db84d3d1a1a8926fca12295bda1f04 (diff)
downloadlinux-c19b106609f398b3b1b14a89dc68ed0244420d08.tar.xz
wifi: rtw89: Add rtw8852a_hfc_param_ini_usb
"hfc" means "hci fc" which is "Host Control Interface Flow Control". These are some parameters needed for RTL8852AU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/d1032888-2a53-4c52-a8b9-6e00cd6758dc@gmail.com
-rw-r--r--drivers/net/wireless/realtek/rtw89/rtw8852a.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a.c b/drivers/net/wireless/realtek/rtw89/rtw8852a.c
index 7855fd55b43e..76b64fd5a639 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852a.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852a.c
@@ -48,6 +48,48 @@ static const struct rtw89_hfc_param_ini rtw8852a_hfc_param_ini_pcie[] = {
[RTW89_QTA_INVALID] = {NULL},
};
+static const struct rtw89_hfc_ch_cfg rtw8852a_hfc_chcfg_usb[] = {
+ {22, 402, grp_0}, /* ACH 0 */
+ {0, 0, grp_0}, /* ACH 1 */
+ {22, 402, grp_0}, /* ACH 2 */
+ {0, 0, grp_0}, /* ACH 3 */
+ {22, 402, grp_0}, /* ACH 4 */
+ {0, 0, grp_0}, /* ACH 5 */
+ {22, 402, grp_0}, /* ACH 6 */
+ {0, 0, grp_0}, /* ACH 7 */
+ {22, 402, grp_0}, /* B0MGQ */
+ {0, 0, grp_0}, /* B0HIQ */
+ {22, 402, grp_0}, /* B1MGQ */
+ {0, 0, grp_0}, /* B1HIQ */
+ {0, 0, 0} /* FWCMDQ */
+};
+
+static const struct rtw89_hfc_pub_cfg rtw8852a_hfc_pubcfg_usb = {
+ 512, /* Group 0 */
+ 0, /* Group 1 */
+ 512, /* Public Max */
+ 104 /* WP threshold */
+};
+
+static const struct rtw89_hfc_prec_cfg rtw8852a_hfc_preccfg_usb = {
+ 11, /* CH 0-11 pre-cost */
+ 32, /* H2C pre-cost */
+ 76, /* WP CH 0-7 pre-cost */
+ 25, /* WP CH 8-11 pre-cost */
+ 1, /* CH 0-11 full condition */
+ 1, /* H2C full condition */
+ 1, /* WP CH 0-7 full condition */
+ 1, /* WP CH 8-11 full condition */
+};
+
+static const struct rtw89_hfc_param_ini rtw8852a_hfc_param_ini_usb[] = {
+ [RTW89_QTA_SCC] = {rtw8852a_hfc_chcfg_usb, &rtw8852a_hfc_pubcfg_usb,
+ &rtw8852a_hfc_preccfg_usb, RTW89_HCIFC_STF},
+ [RTW89_QTA_DLFW] = {NULL, NULL,
+ &rtw8852a_hfc_preccfg_usb, RTW89_HCIFC_STF},
+ [RTW89_QTA_INVALID] = {NULL},
+};
+
static const struct rtw89_dle_mem rtw8852a_dle_mem_pcie[] = {
[RTW89_QTA_SCC] = {RTW89_QTA_SCC, &rtw89_mac_size.wde_size0,
&rtw89_mac_size.ple_size0, &rtw89_mac_size.wde_qt0,
@@ -2237,7 +2279,9 @@ const struct rtw89_chip_info rtw8852a_chip_info = {
.max_amsdu_limit = 3500,
.dis_2g_40m_ul_ofdma = true,
.rsvd_ple_ofst = 0x6f800,
- .hfc_param_ini = {rtw8852a_hfc_param_ini_pcie, NULL, NULL},
+ .hfc_param_ini = {rtw8852a_hfc_param_ini_pcie,
+ rtw8852a_hfc_param_ini_usb,
+ NULL},
.dle_mem = {rtw8852a_dle_mem_pcie,
rtw8852a_dle_mem_usb,
rtw8852a_dle_mem_usb,