]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: upgrade rtw_regulatory mechanism and mapping
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 30 Aug 2021 07:20:11 +0000 (15:20 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Sep 2021 14:51:56 +0000 (17:51 +0300)
commita40405942c7b50497bd452b2ec00380ac2c1611c
tree59631b795889771feb1a1db97808205cfc91d4e5
parent65332b45692d4a6b8f3459855e69bcee288ceafa
rtw88: upgrade rtw_regulatory mechanism and mapping

Mapping table from country code to rtw_regulatory, which manages tx power
limit according to countries, is updated. And mapping architecture is also
upgraded. For more precise control on tx power limit, it allows different
rtw_regulatory for different bands logically. Besides, a helper function
to query rtw_regulatory for current band under current country is provided.

For older chips, some newly added rtw_regulatory may not be configured.
To avoid that those chips have no limit on some countries mapping to a
newer rtw_regulatory after table update, a backward selection mechanism
of rtw_regulatory is introduced. It can help chips use a rtw_regulatory
which has been configured as an alternative of a newer one which is not
configured.

In addition, rtw88 actually doesn't manage channel plans by itself.
Instead, it follows them from stack. So, correct some naming about
chplan with regd, and remove the unnecessary channel control for now.

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@codeaurora.org>
Link: https://lore.kernel.org/r/20210830072014.12250-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/debug.c
drivers/net/wireless/realtek/rtw88/main.h
drivers/net/wireless/realtek/rtw88/phy.c
drivers/net/wireless/realtek/rtw88/regd.c
drivers/net/wireless/realtek/rtw88/regd.h
drivers/net/wireless/realtek/rtw88/rtw8821c.c
drivers/net/wireless/realtek/rtw88/rtw8822b.c