wifi: rtw89: support U-NII-4 channels on 5GHz band
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 8 May 2023 08:12:11 +0000 (16:12 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 11 May 2023 13:19:17 +0000 (16:19 +0300)
commite3b77c06c8863a53a0d80f7dcaff923c590e3edd
treebb22a7eabf42d93ff4e6bc0468be2917a3060243
parenta002f98123dd5e6b6d66c1b42a37dfd6e25ade4c
wifi: rtw89: support U-NII-4 channels on 5GHz band

U-NII-4 band, i.e 5.9GHz channels, can be supported by chip 8852C, 8852B
and 8851B. But, it is not supported by chip 8852A. Flag support_unii4 is
added in chip info and defined by chip accordingly to indicate that.
We reference this flag of runtime chip to decide whether to register
5.9GHz channels.

After that, we consider if U-NII-4 band is allowed by our regulatory
rule of U-NII-4. If chip::support_unii4 but not regd::allow_unii4,
we stll do not register 5.9GHz channels.

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/20230508081211.38760-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/regd.c