]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: Add rtw8852a_dle_mem_usb
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Fri, 7 Nov 2025 16:07:06 +0000 (18:07 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 11 Nov 2025 02:01:36 +0000 (10:01 +0800)
Add rtw8852a_dle_mem_usb and its various quotas and sizes in struct
rtw89_mac_size_set.

"dle" could be "Data Link Engine" or "Double Link Engine". 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/d0a09039-97a8-4501-b023-510c126d8c61@gmail.com
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/mac.h
drivers/net/wireless/realtek/rtw89/rtw8852a.c

index e22b5d8c817179189079720497b5ad120e7c38aa..dab0a76556c9ee41f54786ee2a418740fa8291d6 100644 (file)
@@ -1669,6 +1669,8 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        /* PCIE 64 */
        .wde_size0 = {RTW89_WDE_PG_64, 4095, 1,},
        .wde_size0_v1 = {RTW89_WDE_PG_64, 3328, 0, 0,},
+       /* 8852A USB */
+       .wde_size1 = {RTW89_WDE_PG_64, 768, 0,},
        /* DLFW */
        .wde_size4 = {RTW89_WDE_PG_64, 0, 4096,},
        .wde_size4_v1 = {RTW89_WDE_PG_64, 0, 3328, 0,},
@@ -1692,6 +1694,8 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        /* PCIE */
        .ple_size0 = {RTW89_PLE_PG_128, 1520, 16,},
        .ple_size0_v1 = {RTW89_PLE_PG_128, 2688, 240, 212992,},
+       /* 8852A USB */
+       .ple_size1 = {RTW89_PLE_PG_128, 3184, 16,},
        .ple_size3_v1 = {RTW89_PLE_PG_128, 2928, 0, 212992,},
        /* DLFW */
        .ple_size4 = {RTW89_PLE_PG_128, 64, 1472,},
@@ -1715,6 +1719,8 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        /* PCIE 64 */
        .wde_qt0 = {3792, 196, 0, 107,},
        .wde_qt0_v1 = {3302, 6, 0, 20,},
+       /* 8852A USB */
+       .wde_qt1 = {512, 196, 0, 60,},
        /* DLFW */
        .wde_qt4 = {0, 0, 0, 0,},
        /* PCIE 64 */
@@ -1743,6 +1749,9 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .ple_qt13 = {0, 0, 16, 48, 0, 0, 0, 0, 0, 0, 0,},
        /* PCIE 64 */
        .ple_qt18 = {147, 0, 16, 20, 17, 13, 89, 0, 32, 14, 8, 0,},
+       /* 8852A USB SCC */
+       .ple_qt25 = {1536, 0, 16, 48, 13, 13, 360, 0, 32, 40, 8, 0,},
+       .ple_qt26 = {2654, 0, 1134, 48, 64, 13, 1478, 0, 64, 128, 120, 0,},
        /* USB 52C USB3.0 */
        .ple_qt42 = {1068, 0, 16, 48, 4, 13, 178, 0, 16, 1, 8, 16, 0,},
        /* USB 52C USB3.0 */
index ce3474a7ba030005cfbad7f89b074c7c4fce546a..868413335f6ce990cfcadc0588a94fc001a64200 100644 (file)
@@ -924,6 +924,7 @@ struct rtw89_mac_size_set {
        const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c0;
        const struct rtw89_hfc_prec_cfg hfc_prec_cfg_c2;
        const struct rtw89_dle_size wde_size0;
+       const struct rtw89_dle_size wde_size1;
        const struct rtw89_dle_size wde_size0_v1;
        const struct rtw89_dle_size wde_size4;
        const struct rtw89_dle_size wde_size4_v1;
@@ -937,6 +938,7 @@ struct rtw89_mac_size_set {
        const struct rtw89_dle_size wde_size25;
        const struct rtw89_dle_size wde_size31;
        const struct rtw89_dle_size ple_size0;
+       const struct rtw89_dle_size ple_size1;
        const struct rtw89_dle_size ple_size0_v1;
        const struct rtw89_dle_size ple_size3_v1;
        const struct rtw89_dle_size ple_size4;
@@ -950,6 +952,7 @@ struct rtw89_mac_size_set {
        const struct rtw89_dle_size ple_size33;
        const struct rtw89_dle_size ple_size34;
        const struct rtw89_wde_quota wde_qt0;
+       const struct rtw89_wde_quota wde_qt1;
        const struct rtw89_wde_quota wde_qt0_v1;
        const struct rtw89_wde_quota wde_qt4;
        const struct rtw89_wde_quota wde_qt6;
@@ -967,6 +970,8 @@ struct rtw89_mac_size_set {
        const struct rtw89_ple_quota ple_qt9;
        const struct rtw89_ple_quota ple_qt13;
        const struct rtw89_ple_quota ple_qt18;
+       const struct rtw89_ple_quota ple_qt25;
+       const struct rtw89_ple_quota ple_qt26;
        const struct rtw89_ple_quota ple_qt42;
        const struct rtw89_ple_quota ple_qt43;
        const struct rtw89_ple_quota ple_qt44;
index fa347dbebf9acb633825be91f755cf734f3deafb..7855fd55b43e31135a30e03b92b3b2e85a49c2b1 100644 (file)
@@ -65,6 +65,19 @@ static const struct rtw89_dle_mem rtw8852a_dle_mem_pcie[] = {
                               NULL},
 };
 
+static const struct rtw89_dle_mem rtw8852a_dle_mem_usb[] = {
+       [RTW89_QTA_SCC] = {RTW89_QTA_SCC, &rtw89_mac_size.wde_size1,
+                          &rtw89_mac_size.ple_size1, &rtw89_mac_size.wde_qt1,
+                          &rtw89_mac_size.wde_qt1, &rtw89_mac_size.ple_qt25,
+                          &rtw89_mac_size.ple_qt26},
+       [RTW89_QTA_DLFW] = {RTW89_QTA_DLFW, &rtw89_mac_size.wde_size4,
+                           &rtw89_mac_size.ple_size4, &rtw89_mac_size.wde_qt4,
+                           &rtw89_mac_size.wde_qt4, &rtw89_mac_size.ple_qt13,
+                           &rtw89_mac_size.ple_qt13},
+       [RTW89_QTA_INVALID] = {RTW89_QTA_INVALID, NULL, NULL, NULL, NULL, NULL,
+                              NULL},
+};
+
 static const struct rtw89_reg2_def  rtw8852a_pmac_ht20_mcs7_tbl[] = {
        {0x44AC, 0x00000000},
        {0x44B0, 0x00000000},
@@ -2225,7 +2238,10 @@ const struct rtw89_chip_info rtw8852a_chip_info = {
        .dis_2g_40m_ul_ofdma    = true,
        .rsvd_ple_ofst          = 0x6f800,
        .hfc_param_ini          = {rtw8852a_hfc_param_ini_pcie, NULL, NULL},
-       .dle_mem                = {rtw8852a_dle_mem_pcie, NULL, NULL, NULL},
+       .dle_mem                = {rtw8852a_dle_mem_pcie,
+                                  rtw8852a_dle_mem_usb,
+                                  rtw8852a_dle_mem_usb,
+                                  NULL},
        .wde_qempty_acq_grpnum  = 16,
        .wde_qempty_mgq_grpsel  = 16,
        .rf_base_addr           = {0xc000, 0xd000},