mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 02:15:20 +02:00
wifi: rtw88: 8822c: Fix reported RX band width
commita71ed5898d
upstream. "iw dev wlp2s0 station dump" shows incorrect rx bitrate: tx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2 rx bitrate: 86.7 MBit/s VHT-MCS 9 VHT-NSS 1 This is because the RX band width is calculated incorrectly. Fix the calculation according to the phydm_rxsc_2_bw() function from the official drivers. After: tx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2 rx bitrate: 390.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 1 It also works correctly with the AP configured for 20 MHz and 40 MHz. Tested with RTL8822CE. Cc: stable@vger.kernel.org Fixes:e3037485c6
("rtw88: new Realtek 802.11ac driver") Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/bca8949b-e2bd-4515-98fd-70d3049a0097@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
de0cb07dc2
commit
eed8db8203
|
@ -2611,12 +2611,14 @@ static void query_phy_status_page1(struct rtw_dev *rtwdev, u8 *phy_status,
|
|||
else
|
||||
rxsc = GET_PHY_STAT_P1_HT_RXSC(phy_status);
|
||||
|
||||
if (rxsc >= 9 && rxsc <= 12)
|
||||
bw = RTW_CHANNEL_WIDTH_40;
|
||||
else if (rxsc >= 13)
|
||||
bw = RTW_CHANNEL_WIDTH_80;
|
||||
else
|
||||
if (rxsc == 0)
|
||||
bw = rtwdev->hal.current_band_width;
|
||||
else if (rxsc >= 1 && rxsc <= 8)
|
||||
bw = RTW_CHANNEL_WIDTH_20;
|
||||
else if (rxsc >= 9 && rxsc <= 12)
|
||||
bw = RTW_CHANNEL_WIDTH_40;
|
||||
else
|
||||
bw = RTW_CHANNEL_WIDTH_80;
|
||||
|
||||
channel = GET_PHY_STAT_P1_CHANNEL(phy_status);
|
||||
rtw_set_rx_freq_band(pkt_stat, channel);
|
||||
|
|
Loading…
Reference in New Issue
Block a user