wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (2 of 3)

Update TX power tables to RF version R63.

TX power tables' changes:
* TX power byrate:
	tweak a bit
* TX power limit, TX power limit RU, TX power shape:
	configure values for MEXICO, UKRAINE, CHILE, QATAR
	tweak a bit on other configured values
* 6 GHz TX power limit, 6 GHz TX power limit RU:
	add an extra dimension for 6 GHz regulatory power type, i.e.
	STD (standard power), LPI (low power indoor), VLP (very low power)

Besides, we adjust TX power handling at 6 GHz in phy to consider 6 GHz
regulatory power type.

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/20230602150556.36777-7-pkshih@realtek.com
This commit is contained in:
Zong-Zhe Yang 2023-06-02 23:05:54 +08:00 committed by Kalle Valo
parent b742394cfe
commit 2a8ec45f4d
3 changed files with 9282 additions and 1956 deletions

View File

@ -3046,7 +3046,8 @@ struct rtw89_txpwr_rule_5ghz {
struct rtw89_txpwr_rule_6ghz {
const s8 (*lmt)[RTW89_6G_BW_NUM][RTW89_NTX_NUM]
[RTW89_RS_LMT_NUM][RTW89_BF_NUM]
[RTW89_REGD_NUM][RTW89_6G_CH_NUM];
[RTW89_REGD_NUM][NUM_OF_RTW89_REG_6GHZ_POWER]
[RTW89_6G_CH_NUM];
const s8 (*lmt_ru)[RTW89_RU_NUM][RTW89_NTX_NUM]
[RTW89_REGD_NUM][RTW89_6G_CH_NUM];
};

View File

@ -1626,8 +1626,10 @@ s8 rtw89_phy_read_txpwr_limit(struct rtw89_dev *rtwdev, u8 band,
const struct rtw89_txpwr_rule_2ghz *rule_2ghz = &rfe_parms->rule_2ghz;
const struct rtw89_txpwr_rule_5ghz *rule_5ghz = &rfe_parms->rule_5ghz;
const struct rtw89_txpwr_rule_6ghz *rule_6ghz = &rfe_parms->rule_6ghz;
struct rtw89_regulatory_info *regulatory = &rtwdev->regulatory;
u8 ch_idx = rtw89_channel_to_idx(rtwdev, band, ch);
u8 regd = rtw89_regd_get(rtwdev, band);
u8 reg6 = regulatory->reg_6ghz_power;
s8 lmt = 0, sar;
switch (band) {
@ -1646,11 +1648,13 @@ s8 rtw89_phy_read_txpwr_limit(struct rtw89_dev *rtwdev, u8 band,
lmt = (*rule_5ghz->lmt)[bw][ntx][rs][bf][RTW89_WW][ch_idx];
break;
case RTW89_BAND_6G:
lmt = (*rule_6ghz->lmt)[bw][ntx][rs][bf][regd][ch_idx];
lmt = (*rule_6ghz->lmt)[bw][ntx][rs][bf][regd][reg6][ch_idx];
if (lmt)
break;
lmt = (*rule_6ghz->lmt)[bw][ntx][rs][bf][RTW89_WW][ch_idx];
lmt = (*rule_6ghz->lmt)[bw][ntx][rs][bf][RTW89_WW]
[RTW89_REG_6GHZ_POWER_DFLT]
[ch_idx];
break;
default:
rtw89_warn(rtwdev, "unknown band type: %d\n", band);

File diff suppressed because it is too large Load Diff