wifi: rtw89: regd: handle policy of 6 GHz according to BIOS
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 14 Nov 2023 09:13:58 +0000 (17:13 +0800)
committerKalle Valo <kvalo@kernel.org>
Wed, 22 Nov 2023 15:48:00 +0000 (17:48 +0200)
commitb2774a916ab95f678c2a365b276870bb68bf3b01
tree31497d65efb2ba321604d579d104a574ad7620b1
parent665ecff7dd1481c97d36d7761c0eab3b1dde3d22
wifi: rtw89: regd: handle policy of 6 GHz according to BIOS

According to BIOS configuration of Realtek ACPI DSM function 4,
RTW89_ACPI_DSM_FUNC_6G_BP, we handle the regd policy of 6 GHz.

Policy defines two modes as below.
1. `BLOCK` mode:
    The countries in configured list are blocked.
2. `ALLOW` mode:
    _Only_ the countries in configured list are allowed.
    (i.e. others are all blocked.)

Then, when receiving regulatory notification at runtime, if 6 GHz
is blocked on the country, 6 GHz channels will be disabled.

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