]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: mac: add dle_mem and ple_{min,max}_qt quota for RTL8922D
authorPing-Ke Shih <pkshih@realtek.com>
Thu, 8 Jan 2026 12:03:12 +0000 (20:03 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 13 Jan 2026 02:22:43 +0000 (10:22 +0800)
The quota of DLE and PLE depends on hardware design and consideration of
performance and application. Define them accordingly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260108120320.2217402-6-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/mac.h

index 4c39c4dbaf567d447505510ef22ec136ff0d4b0e..a59fba681e85e790cd759ca31a2066d8bf9db2ef 100644 (file)
@@ -4024,13 +4024,14 @@ struct rtw89_dle_size {
        u16 pge_size;
        u16 lnk_pge_num;
        u16 unlnk_pge_num;
-       /* for WiFi 7 chips below */
+       /* for WiFi 7 chips below (suffix v1) */
        u32 srt_ofst;
 };
 
 struct rtw89_wde_quota {
        u16 hif;
        u16 wcpu;
+       /* unused dcpu isn't listed */
        u16 pkt_in;
        u16 cpu_io;
 };
@@ -4048,8 +4049,10 @@ struct rtw89_ple_quota {
        u16 wd_rel;
        u16 cpu_io;
        u16 tx_rpt;
-       /* for WiFi 7 chips below */
+       /* for WiFi 7 chips below (suffix v1) */
        u16 h2d;
+       /* for WiFi 7 chips after 8922D (suffix v2) */
+       u16 snrpt;
 };
 
 struct rtw89_rsvd_quota {
@@ -4070,6 +4073,17 @@ struct rtw89_dle_rsvd_size {
        u32 size;
 };
 
+struct rtw89_dle_input {
+       u32 tx_ampdu_num_b0;
+       u32 tx_ampdu_num_b1;
+       u32 tx_amsdu_size; /* unit: KB */
+       u32 h2c_max_size;
+       u32 rx_amsdu_size; /* unit: KB */
+       u32 c2h_max_size;
+       u32 mpdu_info_tbl_b0;
+       u32 mpdu_info_tbl_b1;
+};
+
 struct rtw89_dle_mem {
        enum rtw89_qta_mode mode;
        const struct rtw89_dle_size *wde_size;
@@ -4082,6 +4096,8 @@ struct rtw89_dle_mem {
        const struct rtw89_rsvd_quota *rsvd_qt;
        const struct rtw89_dle_rsvd_size *rsvd0_size;
        const struct rtw89_dle_rsvd_size *rsvd1_size;
+       /* for WiFi 7 chips after 8922D */
+       const struct rtw89_dle_input *dle_input;
 };
 
 struct rtw89_reg_def {
index be478540f742ab9530d942ac3048c14bf285a162..b1f313f738b81aa14cd7d1a43776612c94d99348 100644 (file)
@@ -1717,10 +1717,12 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .wde_size7 = {RTW89_WDE_PG_64, 510, 2,},
        /* DLFW */
        .wde_size9 = {RTW89_WDE_PG_64, 0, 1024,},
+       .wde_size16_v1 = {RTW89_WDE_PG_64, 639, 1, 0,},
        /* 8852C USB3.0 */
        .wde_size17 = {RTW89_WDE_PG_64, 354, 30,},
        /* 8852C DLFW */
        .wde_size18 = {RTW89_WDE_PG_64, 0, 2048,},
+       .wde_size18_v1 = {RTW89_WDE_PG_64, 0, 640, 0,},
        /* 8852C PCIE SCC */
        .wde_size19 = {RTW89_WDE_PG_64, 3328, 0,},
        .wde_size23 = {RTW89_WDE_PG_64, 1022, 2,},
@@ -1747,6 +1749,8 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .ple_size18 = {RTW89_PLE_PG_128, 2544, 16,},
        /* 8852C PCIE SCC */
        .ple_size19 = {RTW89_PLE_PG_128, 1904, 16,},
+       .ple_size20_v1 = {RTW89_PLE_PG_128, 2554, 182, 40960,},
+       .ple_size22_v1 = {RTW89_PLE_PG_128, 2736, 0, 40960,},
        /* 8852B USB2.0 SCC */
        .ple_size32 = {RTW89_PLE_PG_128, 620, 20,},
        /* 8852B USB3.0 SCC */
@@ -1758,6 +1762,7 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .wde_qt0_v1 = {3302, 6, 0, 20,},
        /* 8852A USB */
        .wde_qt1 = {512, 196, 0, 60,},
+       .wde_qt3 = {0, 0, 0, 0,},
        /* DLFW */
        .wde_qt4 = {0, 0, 0, 0,},
        /* PCIE 64 */
@@ -1770,6 +1775,7 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .wde_qt17 = {0, 0, 0,  0,},
        /* 8852C PCIE SCC */
        .wde_qt18 = {3228, 60, 0, 40,},
+       .wde_qt19_v1 = {613, 6, 0, 20,},
        .wde_qt23 = {958, 48, 0, 16,},
        /* 8852B USB2.0/USB3.0 SCC */
        .wde_qt25 = {152, 2, 0, 8,},
@@ -1781,6 +1787,7 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .ple_qt4 = {264, 0, 16, 20, 26, 13, 356, 0, 32, 40, 8,},
        /* PCIE SCC */
        .ple_qt5 = {264, 0, 32, 20, 64, 13, 1101, 0, 64, 128, 120,},
+       .ple_qt5_v2 = {0, 0, 32, 256, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,},
        .ple_qt9 = {0, 0, 32, 256, 0, 0, 0, 0, 0, 0, 1, 0, 0,},
        /* DLFW */
        .ple_qt13 = {0, 0, 16, 48, 0, 0, 0, 0, 0, 0, 0,},
@@ -1791,8 +1798,10 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .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,},
+       .ple_qt42_v2 = {91, 91, 32, 16, 19, 13, 91, 91, 44, 18, 1, 4, 0, 0,},
        /* USB 52C USB3.0 */
        .ple_qt43 = {3068, 0, 32, 48, 4, 13, 178, 0, 16, 1, 8, 16, 0,},
+       .ple_qt43_v2 = {645, 645, 32, 16, 2062, 2056, 2134, 2134, 2087, 2061, 1, 2047, 0, 0,},
        /* DLFW 52C */
        .ple_qt44 = {0, 0, 16, 256, 0, 0, 0, 0, 0, 0, 0, 0,},
        /* DLFW 52C */
@@ -1826,8 +1835,13 @@ const struct rtw89_mac_size_set rtw89_mac_size = {
        .ple_qt_51b_wow = {147, 0, 16, 20, 157, 13, 133, 0, 172, 14, 24, 0,},
        .ple_rsvd_qt0 = {2, 107, 107, 6, 6, 6, 6, 0, 0, 0,},
        .ple_rsvd_qt1 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
+       .ple_rsvd_qt9 = {1, 44, 44, 6, 6, 6, 6, 69, 0, 0,},
        .rsvd0_size0 = {212992, 0,},
+       .rsvd0_size6 = {40960, 0,},
        .rsvd1_size0 = {587776, 2048,},
+       .rsvd1_size2 = {391168, 2048,},
+       .dle_input3 = {0, 0, 0, 16384, 0, 2048, 0, 0,},
+       .dle_input18 = {128, 128, 11454, 2048, 0, 2048, 24, 24,},
 };
 EXPORT_SYMBOL(rtw89_mac_size);
 
index 5a62bbb2cc468400638440676194e6422d0712e4..8ecb15f335eb8a4a2e697b91300f194927034970 100644 (file)
@@ -932,8 +932,10 @@ struct rtw89_mac_size_set {
        const struct rtw89_dle_size wde_size6;
        const struct rtw89_dle_size wde_size7;
        const struct rtw89_dle_size wde_size9;
+       const struct rtw89_dle_size wde_size16_v1;
        const struct rtw89_dle_size wde_size17;
        const struct rtw89_dle_size wde_size18;
+       const struct rtw89_dle_size wde_size18_v1;
        const struct rtw89_dle_size wde_size19;
        const struct rtw89_dle_size wde_size23;
        const struct rtw89_dle_size wde_size25;
@@ -949,18 +951,22 @@ struct rtw89_mac_size_set {
        const struct rtw89_dle_size ple_size17;
        const struct rtw89_dle_size ple_size18;
        const struct rtw89_dle_size ple_size19;
+       const struct rtw89_dle_size ple_size20_v1;
+       const struct rtw89_dle_size ple_size22_v1;
        const struct rtw89_dle_size ple_size32;
        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_qt3;
        const struct rtw89_wde_quota wde_qt4;
        const struct rtw89_wde_quota wde_qt6;
        const struct rtw89_wde_quota wde_qt7;
        const struct rtw89_wde_quota wde_qt16;
        const struct rtw89_wde_quota wde_qt17;
        const struct rtw89_wde_quota wde_qt18;
+       const struct rtw89_wde_quota wde_qt19_v1;
        const struct rtw89_wde_quota wde_qt23;
        const struct rtw89_wde_quota wde_qt25;
        const struct rtw89_wde_quota wde_qt31;
@@ -968,13 +974,16 @@ struct rtw89_mac_size_set {
        const struct rtw89_ple_quota ple_qt1;
        const struct rtw89_ple_quota ple_qt4;
        const struct rtw89_ple_quota ple_qt5;
+       const struct rtw89_ple_quota ple_qt5_v2;
        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_qt42_v2;
        const struct rtw89_ple_quota ple_qt43;
+       const struct rtw89_ple_quota ple_qt43_v2;
        const struct rtw89_ple_quota ple_qt44;
        const struct rtw89_ple_quota ple_qt45;
        const struct rtw89_ple_quota ple_qt46;
@@ -994,8 +1003,14 @@ struct rtw89_mac_size_set {
        const struct rtw89_ple_quota ple_qt_51b_wow;
        const struct rtw89_rsvd_quota ple_rsvd_qt0;
        const struct rtw89_rsvd_quota ple_rsvd_qt1;
+       const struct rtw89_rsvd_quota ple_rsvd_qt1_v1;
+       const struct rtw89_rsvd_quota ple_rsvd_qt9;
        const struct rtw89_dle_rsvd_size rsvd0_size0;
+       const struct rtw89_dle_rsvd_size rsvd0_size6;
        const struct rtw89_dle_rsvd_size rsvd1_size0;
+       const struct rtw89_dle_rsvd_size rsvd1_size2;
+       const struct rtw89_dle_input dle_input3;
+       const struct rtw89_dle_input dle_input18;
 };
 
 extern const struct rtw89_mac_size_set rtw89_mac_size;