wifi: rtw89: Correct EHT TX rate on 20MHz connection
authorDian-Syuan Yang <dian_syuan0116@realtek.com>
Tue, 5 Mar 2024 00:45:02 +0000 (08:45 +0800)
committerKalle Valo <kvalo@kernel.org>
Tue, 12 Mar 2024 15:30:42 +0000 (17:30 +0200)
commitf1dfcee2eae98abbdb677b872f091b1589a9cfed
treef1534d527bc3af76cc93711c449cf24271ac7d2d
parentc2b25092864a16c7865e406badedece5cc25fc2b
wifi: rtw89: Correct EHT TX rate on 20MHz connection

We used EHT capability of 20MHz-only as rate mask to RA (rate adaptive)
H2C command when connecting with AP set EHT 20MHz. It would get the
wrong rate mask and the MCS rate can only reach MCS11.

According to the description of 802.11be spec, if all supported channel
bandwidth field of HE PHY capabilities are zero, then the EHT capability
of 20MHz-only is valid. As a result, we adjust the code to set correct
rate mask based on HE PHY bandwidth capability.

Signed-off-by: Dian-Syuan Yang <dian_syuan0116@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240305004502.6655-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/phy.c