rtw89: sar: adjust and support SAR on 6GHz band
authorZong-Zhe Yang <kevin_yang@realtek.com>
Fri, 20 May 2022 07:17:30 +0000 (15:17 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 30 May 2022 09:35:58 +0000 (12:35 +0300)
commit425671f03b4e3fb62bcb588c50f776342d667371
tree1f61e49ddd4f0a4bb95e2fec538e6aaad172b378
parente3d365ff0b6cc4edfb4f44f55767de69077b204d
rtw89: sar: adjust and support SAR on 6GHz band

Since SAR is more expected to follow U-NII bands to plan subbands,
division of 6GHz band is quite different from defined enum of subbands
which is used by PHY in most cases. It's hard and painful if we want to
keep using the same enum on SAR. So, we introduce another enum for SAR
subbands and adjust SAR flow to use it.

Besides, since 6GHz SAR subbands won't be divided with edge alignment,
some cases will span two SAR subbands. For these cases, we describe them
within an array of rtw89_sar_span and take the smaller one between SAR
settings of the two subbands.

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/20220520071731.38563-6-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/debug.h
drivers/net/wireless/realtek/rtw89/sar.c