diff options
author | Zong-Zhe Yang <kevin_yang@realtek.com> | 2021-08-30 15:20:11 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-21 17:51:56 +0300 |
commit | f8509c38ececde7fb0f0bc9959f79d2a34be577d (patch) | |
tree | 59631b795889771feb1a1db97808205cfc91d4e5 /drivers/net/wireless/realtek/rtw88/debug.c | |
parent | beca6bd94da5f9f4b80f19adce19a8a5f5ddf811 (diff) |
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
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/debug.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/debug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c index dfd52cff5d02..df0740e84f04 100644 --- a/drivers/net/wireless/realtek/rtw88/debug.c +++ b/drivers/net/wireless/realtek/rtw88/debug.c @@ -12,6 +12,7 @@ #include "phy.h" #include "reg.h" #include "ps.h" +#include "regd.h" #ifdef CONFIG_RTW88_DEBUGFS @@ -587,7 +588,7 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v) struct rtw_power_params pwr_param = {0}; u8 bw = hal->current_band_width; u8 ch = hal->current_channel; - u8 regd = rtwdev->regd.txpwr_regd; + u8 regd = rtw_regd_get(rtwdev); seq_printf(m, "regulatory: %s\n", rtw_get_regd_string(regd)); seq_printf(m, "%-4s %-10s %-3s%6s %-4s %4s (%-4s %-4s) %-4s\n", |