Commit 9e5c6c0d authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

wifi: rtw89: define hardware rate v1 for WiFi 7 chips

To support EHT rate, hardware rate v1 is introduced. The CCK and OFDM rates
are persistent. HT/VHT/HE rates use different rate code from original, and
add new code for EHT rates.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230728070252.66525-3-pkshih@realtek.com
parent f698afa7
......@@ -395,6 +395,194 @@ enum rtw89_hw_rate {
RTW89_HW_RATE_HE_NSS4_MCS9 = 0x1B9,
RTW89_HW_RATE_HE_NSS4_MCS10 = 0x1BA,
RTW89_HW_RATE_HE_NSS4_MCS11 = 0x1BB,
RTW89_HW_RATE_V1_MCS0 = 0x100,
RTW89_HW_RATE_V1_MCS1 = 0x101,
RTW89_HW_RATE_V1_MCS2 = 0x102,
RTW89_HW_RATE_V1_MCS3 = 0x103,
RTW89_HW_RATE_V1_MCS4 = 0x104,
RTW89_HW_RATE_V1_MCS5 = 0x105,
RTW89_HW_RATE_V1_MCS6 = 0x106,
RTW89_HW_RATE_V1_MCS7 = 0x107,
RTW89_HW_RATE_V1_MCS8 = 0x108,
RTW89_HW_RATE_V1_MCS9 = 0x109,
RTW89_HW_RATE_V1_MCS10 = 0x10A,
RTW89_HW_RATE_V1_MCS11 = 0x10B,
RTW89_HW_RATE_V1_MCS12 = 0x10C,
RTW89_HW_RATE_V1_MCS13 = 0x10D,
RTW89_HW_RATE_V1_MCS14 = 0x10E,
RTW89_HW_RATE_V1_MCS15 = 0x10F,
RTW89_HW_RATE_V1_MCS16 = 0x110,
RTW89_HW_RATE_V1_MCS17 = 0x111,
RTW89_HW_RATE_V1_MCS18 = 0x112,
RTW89_HW_RATE_V1_MCS19 = 0x113,
RTW89_HW_RATE_V1_MCS20 = 0x114,
RTW89_HW_RATE_V1_MCS21 = 0x115,
RTW89_HW_RATE_V1_MCS22 = 0x116,
RTW89_HW_RATE_V1_MCS23 = 0x117,
RTW89_HW_RATE_V1_MCS24 = 0x118,
RTW89_HW_RATE_V1_MCS25 = 0x119,
RTW89_HW_RATE_V1_MCS26 = 0x11A,
RTW89_HW_RATE_V1_MCS27 = 0x11B,
RTW89_HW_RATE_V1_MCS28 = 0x11C,
RTW89_HW_RATE_V1_MCS29 = 0x11D,
RTW89_HW_RATE_V1_MCS30 = 0x11E,
RTW89_HW_RATE_V1_MCS31 = 0x11F,
RTW89_HW_RATE_V1_VHT_NSS1_MCS0 = 0x200,
RTW89_HW_RATE_V1_VHT_NSS1_MCS1 = 0x201,
RTW89_HW_RATE_V1_VHT_NSS1_MCS2 = 0x202,
RTW89_HW_RATE_V1_VHT_NSS1_MCS3 = 0x203,
RTW89_HW_RATE_V1_VHT_NSS1_MCS4 = 0x204,
RTW89_HW_RATE_V1_VHT_NSS1_MCS5 = 0x205,
RTW89_HW_RATE_V1_VHT_NSS1_MCS6 = 0x206,
RTW89_HW_RATE_V1_VHT_NSS1_MCS7 = 0x207,
RTW89_HW_RATE_V1_VHT_NSS1_MCS8 = 0x208,
RTW89_HW_RATE_V1_VHT_NSS1_MCS9 = 0x209,
RTW89_HW_RATE_V1_VHT_NSS1_MCS10 = 0x20A,
RTW89_HW_RATE_V1_VHT_NSS1_MCS11 = 0x20B,
RTW89_HW_RATE_V1_VHT_NSS2_MCS0 = 0x220,
RTW89_HW_RATE_V1_VHT_NSS2_MCS1 = 0x221,
RTW89_HW_RATE_V1_VHT_NSS2_MCS2 = 0x222,
RTW89_HW_RATE_V1_VHT_NSS2_MCS3 = 0x223,
RTW89_HW_RATE_V1_VHT_NSS2_MCS4 = 0x224,
RTW89_HW_RATE_V1_VHT_NSS2_MCS5 = 0x225,
RTW89_HW_RATE_V1_VHT_NSS2_MCS6 = 0x226,
RTW89_HW_RATE_V1_VHT_NSS2_MCS7 = 0x227,
RTW89_HW_RATE_V1_VHT_NSS2_MCS8 = 0x228,
RTW89_HW_RATE_V1_VHT_NSS2_MCS9 = 0x229,
RTW89_HW_RATE_V1_VHT_NSS2_MCS10 = 0x22A,
RTW89_HW_RATE_V1_VHT_NSS2_MCS11 = 0x22B,
RTW89_HW_RATE_V1_VHT_NSS3_MCS0 = 0x240,
RTW89_HW_RATE_V1_VHT_NSS3_MCS1 = 0x241,
RTW89_HW_RATE_V1_VHT_NSS3_MCS2 = 0x242,
RTW89_HW_RATE_V1_VHT_NSS3_MCS3 = 0x243,
RTW89_HW_RATE_V1_VHT_NSS3_MCS4 = 0x244,
RTW89_HW_RATE_V1_VHT_NSS3_MCS5 = 0x245,
RTW89_HW_RATE_V1_VHT_NSS3_MCS6 = 0x246,
RTW89_HW_RATE_V1_VHT_NSS3_MCS7 = 0x247,
RTW89_HW_RATE_V1_VHT_NSS3_MCS8 = 0x248,
RTW89_HW_RATE_V1_VHT_NSS3_MCS9 = 0x249,
RTW89_HW_RATE_V1_VHT_NSS3_MCS10 = 0x24A,
RTW89_HW_RATE_V1_VHT_NSS3_MCS11 = 0x24B,
RTW89_HW_RATE_V1_VHT_NSS4_MCS0 = 0x260,
RTW89_HW_RATE_V1_VHT_NSS4_MCS1 = 0x261,
RTW89_HW_RATE_V1_VHT_NSS4_MCS2 = 0x262,
RTW89_HW_RATE_V1_VHT_NSS4_MCS3 = 0x263,
RTW89_HW_RATE_V1_VHT_NSS4_MCS4 = 0x264,
RTW89_HW_RATE_V1_VHT_NSS4_MCS5 = 0x265,
RTW89_HW_RATE_V1_VHT_NSS4_MCS6 = 0x266,
RTW89_HW_RATE_V1_VHT_NSS4_MCS7 = 0x267,
RTW89_HW_RATE_V1_VHT_NSS4_MCS8 = 0x268,
RTW89_HW_RATE_V1_VHT_NSS4_MCS9 = 0x269,
RTW89_HW_RATE_V1_VHT_NSS4_MCS10 = 0x26A,
RTW89_HW_RATE_V1_VHT_NSS4_MCS11 = 0x26B,
RTW89_HW_RATE_V1_HE_NSS1_MCS0 = 0x300,
RTW89_HW_RATE_V1_HE_NSS1_MCS1 = 0x301,
RTW89_HW_RATE_V1_HE_NSS1_MCS2 = 0x302,
RTW89_HW_RATE_V1_HE_NSS1_MCS3 = 0x303,
RTW89_HW_RATE_V1_HE_NSS1_MCS4 = 0x304,
RTW89_HW_RATE_V1_HE_NSS1_MCS5 = 0x305,
RTW89_HW_RATE_V1_HE_NSS1_MCS6 = 0x306,
RTW89_HW_RATE_V1_HE_NSS1_MCS7 = 0x307,
RTW89_HW_RATE_V1_HE_NSS1_MCS8 = 0x308,
RTW89_HW_RATE_V1_HE_NSS1_MCS9 = 0x309,
RTW89_HW_RATE_V1_HE_NSS1_MCS10 = 0x30A,
RTW89_HW_RATE_V1_HE_NSS1_MCS11 = 0x30B,
RTW89_HW_RATE_V1_HE_NSS2_MCS0 = 0x320,
RTW89_HW_RATE_V1_HE_NSS2_MCS1 = 0x321,
RTW89_HW_RATE_V1_HE_NSS2_MCS2 = 0x322,
RTW89_HW_RATE_V1_HE_NSS2_MCS3 = 0x323,
RTW89_HW_RATE_V1_HE_NSS2_MCS4 = 0x324,
RTW89_HW_RATE_V1_HE_NSS2_MCS5 = 0x325,
RTW89_HW_RATE_V1_HE_NSS2_MCS6 = 0x326,
RTW89_HW_RATE_V1_HE_NSS2_MCS7 = 0x327,
RTW89_HW_RATE_V1_HE_NSS2_MCS8 = 0x328,
RTW89_HW_RATE_V1_HE_NSS2_MCS9 = 0x329,
RTW89_HW_RATE_V1_HE_NSS2_MCS10 = 0x32A,
RTW89_HW_RATE_V1_HE_NSS2_MCS11 = 0x32B,
RTW89_HW_RATE_V1_HE_NSS3_MCS0 = 0x340,
RTW89_HW_RATE_V1_HE_NSS3_MCS1 = 0x341,
RTW89_HW_RATE_V1_HE_NSS3_MCS2 = 0x342,
RTW89_HW_RATE_V1_HE_NSS3_MCS3 = 0x343,
RTW89_HW_RATE_V1_HE_NSS3_MCS4 = 0x344,
RTW89_HW_RATE_V1_HE_NSS3_MCS5 = 0x345,
RTW89_HW_RATE_V1_HE_NSS3_MCS6 = 0x346,
RTW89_HW_RATE_V1_HE_NSS3_MCS7 = 0x347,
RTW89_HW_RATE_V1_HE_NSS3_MCS8 = 0x348,
RTW89_HW_RATE_V1_HE_NSS3_MCS9 = 0x349,
RTW89_HW_RATE_V1_HE_NSS3_MCS10 = 0x34A,
RTW89_HW_RATE_V1_HE_NSS3_MCS11 = 0x34B,
RTW89_HW_RATE_V1_HE_NSS4_MCS0 = 0x360,
RTW89_HW_RATE_V1_HE_NSS4_MCS1 = 0x361,
RTW89_HW_RATE_V1_HE_NSS4_MCS2 = 0x362,
RTW89_HW_RATE_V1_HE_NSS4_MCS3 = 0x363,
RTW89_HW_RATE_V1_HE_NSS4_MCS4 = 0x364,
RTW89_HW_RATE_V1_HE_NSS4_MCS5 = 0x365,
RTW89_HW_RATE_V1_HE_NSS4_MCS6 = 0x366,
RTW89_HW_RATE_V1_HE_NSS4_MCS7 = 0x367,
RTW89_HW_RATE_V1_HE_NSS4_MCS8 = 0x368,
RTW89_HW_RATE_V1_HE_NSS4_MCS9 = 0x369,
RTW89_HW_RATE_V1_HE_NSS4_MCS10 = 0x36A,
RTW89_HW_RATE_V1_HE_NSS4_MCS11 = 0x36B,
RTW89_HW_RATE_V1_EHT_NSS1_MCS0 = 0x400,
RTW89_HW_RATE_V1_EHT_NSS1_MCS1 = 0x401,
RTW89_HW_RATE_V1_EHT_NSS1_MCS2 = 0x402,
RTW89_HW_RATE_V1_EHT_NSS1_MCS3 = 0x403,
RTW89_HW_RATE_V1_EHT_NSS1_MCS4 = 0x404,
RTW89_HW_RATE_V1_EHT_NSS1_MCS5 = 0x405,
RTW89_HW_RATE_V1_EHT_NSS1_MCS6 = 0x406,
RTW89_HW_RATE_V1_EHT_NSS1_MCS7 = 0x407,
RTW89_HW_RATE_V1_EHT_NSS1_MCS8 = 0x408,
RTW89_HW_RATE_V1_EHT_NSS1_MCS9 = 0x409,
RTW89_HW_RATE_V1_EHT_NSS1_MCS10 = 0x40A,
RTW89_HW_RATE_V1_EHT_NSS1_MCS11 = 0x40B,
RTW89_HW_RATE_V1_EHT_NSS1_MCS12 = 0x40C,
RTW89_HW_RATE_V1_EHT_NSS1_MCS13 = 0x40D,
RTW89_HW_RATE_V1_EHT_NSS1_MCS14 = 0x40E,
RTW89_HW_RATE_V1_EHT_NSS1_MCS15 = 0x40F,
RTW89_HW_RATE_V1_EHT_NSS2_MCS0 = 0x420,
RTW89_HW_RATE_V1_EHT_NSS2_MCS1 = 0x421,
RTW89_HW_RATE_V1_EHT_NSS2_MCS2 = 0x422,
RTW89_HW_RATE_V1_EHT_NSS2_MCS3 = 0x423,
RTW89_HW_RATE_V1_EHT_NSS2_MCS4 = 0x424,
RTW89_HW_RATE_V1_EHT_NSS2_MCS5 = 0x425,
RTW89_HW_RATE_V1_EHT_NSS2_MCS6 = 0x426,
RTW89_HW_RATE_V1_EHT_NSS2_MCS7 = 0x427,
RTW89_HW_RATE_V1_EHT_NSS2_MCS8 = 0x428,
RTW89_HW_RATE_V1_EHT_NSS2_MCS9 = 0x429,
RTW89_HW_RATE_V1_EHT_NSS2_MCS10 = 0x42A,
RTW89_HW_RATE_V1_EHT_NSS2_MCS11 = 0x42B,
RTW89_HW_RATE_V1_EHT_NSS2_MCS12 = 0x42C,
RTW89_HW_RATE_V1_EHT_NSS2_MCS13 = 0x42D,
RTW89_HW_RATE_V1_EHT_NSS3_MCS0 = 0x440,
RTW89_HW_RATE_V1_EHT_NSS3_MCS1 = 0x441,
RTW89_HW_RATE_V1_EHT_NSS3_MCS2 = 0x442,
RTW89_HW_RATE_V1_EHT_NSS3_MCS3 = 0x443,
RTW89_HW_RATE_V1_EHT_NSS3_MCS4 = 0x444,
RTW89_HW_RATE_V1_EHT_NSS3_MCS5 = 0x445,
RTW89_HW_RATE_V1_EHT_NSS3_MCS6 = 0x446,
RTW89_HW_RATE_V1_EHT_NSS3_MCS7 = 0x447,
RTW89_HW_RATE_V1_EHT_NSS3_MCS8 = 0x448,
RTW89_HW_RATE_V1_EHT_NSS3_MCS9 = 0x449,
RTW89_HW_RATE_V1_EHT_NSS3_MCS10 = 0x44A,
RTW89_HW_RATE_V1_EHT_NSS3_MCS11 = 0x44B,
RTW89_HW_RATE_V1_EHT_NSS3_MCS12 = 0x44C,
RTW89_HW_RATE_V1_EHT_NSS3_MCS13 = 0x44D,
RTW89_HW_RATE_V1_EHT_NSS4_MCS0 = 0x460,
RTW89_HW_RATE_V1_EHT_NSS4_MCS1 = 0x461,
RTW89_HW_RATE_V1_EHT_NSS4_MCS2 = 0x462,
RTW89_HW_RATE_V1_EHT_NSS4_MCS3 = 0x463,
RTW89_HW_RATE_V1_EHT_NSS4_MCS4 = 0x464,
RTW89_HW_RATE_V1_EHT_NSS4_MCS5 = 0x465,
RTW89_HW_RATE_V1_EHT_NSS4_MCS6 = 0x466,
RTW89_HW_RATE_V1_EHT_NSS4_MCS7 = 0x467,
RTW89_HW_RATE_V1_EHT_NSS4_MCS8 = 0x468,
RTW89_HW_RATE_V1_EHT_NSS4_MCS9 = 0x469,
RTW89_HW_RATE_V1_EHT_NSS4_MCS10 = 0x46A,
RTW89_HW_RATE_V1_EHT_NSS4_MCS11 = 0x46B,
RTW89_HW_RATE_V1_EHT_NSS4_MCS12 = 0x46C,
RTW89_HW_RATE_V1_EHT_NSS4_MCS13 = 0x46D,
RTW89_HW_RATE_NR,
RTW89_HW_RATE_MASK_MOD = GENMASK(8, 7),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment