wifi: rtw89: correct hardware value of nominal packet padding for WiFi 7 chips
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw89: correct hardware value of nominal packet padding for WiFi 7 chips
The hardware value of 3 for WiFi 7 chips is padding 16 or 20us selected by hardware automatically. Correct the value to resolve interoperability problem. Also define enum to be more readable.
Signed-off-by Ping-Ke Shih <[email protected]>
--- drivers/net/wireless/realtek/rtw89/core.h | 7 +++++++ drivers/net/wireless/realtek/rtw89/fw.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-)
drivers/net/wireless/realtek/rtw89/core.h +7 -0
@@ -884,6 +884,13 @@ enum rtw89_ps_mode {#define RTW89_BYR_BW_NUM (RTW89_CHANNEL_WIDTH_320 + 1)#define RTW89_PPE_BW_NUM (RTW89_CHANNEL_WIDTH_320 + 1) +enum rtw89_pe_duration { +RTW89_PE_DURATION_0 =0 , +RTW89_PE_DURATION_8 =1 , +RTW89_PE_DURATION_16 =2 , +RTW89_PE_DURATION_16_20 =3 , +}; +enum rtw89_ru_bandwidth {RTW89_RU26 =0 ,RTW89_RU52 =1 ,
drivers/net/wireless/realtek/rtw89/fw.c +6 -6
@@ -2752,11 +2752,11 @@ static void __get_sta_he_pkt_padding(struct rtw89_dev *rtwdev, ppe8 = (ppe >> sh) &IEEE80211_PPE_THRES_NSS_MASK ;if (ppe16 !=7 && ppe8 ==7 ) - pads[i] =2 ; + pads[i] =RTW89_PE_DURATION_16 ;else if (ppe8 !=7 ) - pads[i] =1 ; + pads[i] =RTW89_PE_DURATION_8 ;else - pads[i] =0 ; + pads[i] =RTW89_PE_DURATION_0 ; } }
@@ -2889,11 +2889,11 @@ static void __get_sta_eht_pkt_padding(struct rtw89_dev *rtwdev, ppe8 = (ppe >> sh) &IEEE80211_PPE_THRES_NSS_MASK ;if (ppe16 !=7 && ppe8 ==7 ) - pads[i] =2 ; + pads[i] =RTW89_PE_DURATION_16_20 ;else if (ppe8 !=7 ) - pads[i] =1 ; + pads[i] =RTW89_PE_DURATION_8 ;else - pads[i] =0 ; + pads[i] =RTW89_PE_DURATION_0 ; } }
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerQuoted 5 lines · Ping-Ke Shih
The hardware value of 3 for WiFi 7 chips is padding 16 or 20us selected by hardware automatically. Correct the value to resolve interoperability problem. Also define enum to be more readable.
Signed-off-by Ping-Ke Shih <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
d5b96a4a3159 wifi: rtw89: correct hardware value of nominal packet padding for WiFi 7 chips