OSDN Git Service

rtw89: phy: handle txpwr lmt/lmt_ru of 160M bandwidth
authorZong-Zhe Yang <kevin_yang@realtek.com>
Fri, 18 Feb 2022 03:40:42 +0000 (11:40 +0800)
committerKalle Valo <kvalo@kernel.org>
Tue, 22 Feb 2022 15:29:14 +0000 (17:29 +0200)
commit94b70cafc661739ae8fec40a9ec35bdccf883d8b
treebf07dadd7e9db3d6efb13d8613cc27961ba89177
parentac74f016f035eeb62b8b40db74040d32a03c4307
rtw89: phy: handle txpwr lmt/lmt_ru of 160M bandwidth

Add handling to fill struct rtw89_txpwr_limit and rtw89_txpwr_limit_ru
for 160Mhz bandwidth case. And enlarge RTW89_5G_BW_NUM because the chip
under planning can support 160Mhz bandwidth on 5G band.

Moreover, refine the filling of OFDM entry of struct rtw89_txpwr_limit
by using the value corresponding to primary channel.

E.g. center channel 38 (40Mhz bandwidth case)
Originally OFDM entry was filled by value corresponding to 'ch - 2' (36)
Now, we consider that it could be 36 or 40.

E.g. cneter channel 42 (80Mhz bandwidth case)
Originally OFDM entry was filled by value corresponding to 'ch - 6' (36)
Now, we consider that it could be 36, 40, 44, or 48.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220218034042.9218-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/phy.c