Commit d5b96a4a authored by Ping-Ke Shih's avatar Ping-Ke Shih

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: default avatarPing-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240517013639.11643-1-pkshih@realtek.com
parent 2c1fc7c2
......@@ -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,
......
......@@ -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;
}
}
......
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