wifi: rtw89: indicate TX power by rate table inside RFE parameter
For next-generation chips, TX power by rate table comes from RFE (RF front end) parameter. It can be different according to RFE type. So, we indicate TX power by rate table inside RFE parameter ahead. For current chips, even with different RFE types, a chip is configured with a single TX power by rate table. So, this commit doesn't really affect these currently supported chips. 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/20230920074322.42898-4-pkshih@realtek.com
This commit is contained in:
parent
1bf24172cc
commit
4cc05e3156
@ -3355,6 +3355,7 @@ struct rtw89_txpwr_rule_6ghz {
|
||||
};
|
||||
|
||||
struct rtw89_rfe_parms {
|
||||
const struct rtw89_txpwr_table *byr_tbl;
|
||||
struct rtw89_txpwr_rule_2ghz rule_2ghz;
|
||||
struct rtw89_txpwr_rule_5ghz rule_5ghz;
|
||||
struct rtw89_txpwr_rule_6ghz rule_6ghz;
|
||||
@ -3553,7 +3554,6 @@ struct rtw89_chip_info {
|
||||
const struct rtw89_phy_table *rf_table[RF_PATH_MAX];
|
||||
const struct rtw89_phy_table *nctl_table;
|
||||
const struct rtw89_rfk_tbl *nctl_post_table;
|
||||
const struct rtw89_txpwr_table *byr_table;
|
||||
const struct rtw89_phy_dig_gain_table *dig_table;
|
||||
const struct rtw89_dig_regs *dig_regs;
|
||||
const struct rtw89_phy_tssi_dbw_table *tssi_dbw_table;
|
||||
|
@ -4474,7 +4474,7 @@ static void rtw89_phy_env_monitor_init(struct rtw89_dev *rtwdev)
|
||||
|
||||
void rtw89_phy_dm_init(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
const struct rtw89_chip_info *chip = rtwdev->chip;
|
||||
const struct rtw89_rfe_parms *rfe_parms = rtwdev->rfe_parms;
|
||||
|
||||
rtw89_phy_stat_init(rtwdev);
|
||||
|
||||
@ -4491,7 +4491,7 @@ void rtw89_phy_dm_init(struct rtw89_dev *rtwdev)
|
||||
|
||||
rtw89_phy_init_rf_nctl(rtwdev);
|
||||
rtw89_chip_rfk_init(rtwdev);
|
||||
rtw89_load_txpwr_table(rtwdev, chip->byr_table);
|
||||
rtw89_load_txpwr_table(rtwdev, rfe_parms->byr_tbl);
|
||||
rtw89_chip_set_txpwr_ctrl(rtwdev);
|
||||
rtw89_chip_power_trim(rtwdev);
|
||||
rtw89_chip_cfg_txrx_path(rtwdev);
|
||||
|
@ -2367,7 +2367,6 @@ const struct rtw89_chip_info rtw8851b_chip_info = {
|
||||
.rf_table = {&rtw89_8851b_phy_radioa_table,},
|
||||
.nctl_table = &rtw89_8851b_phy_nctl_table,
|
||||
.nctl_post_table = &rtw8851b_nctl_post_defs_tbl,
|
||||
.byr_table = &rtw89_8851b_byr_table,
|
||||
.dflt_parms = &rtw89_8851b_dflt_parms,
|
||||
.rfe_parms_conf = rtw89_8851b_rfe_parms_conf,
|
||||
.txpwr_factor_rf = 2,
|
||||
|
@ -14795,6 +14795,7 @@ const struct rtw89_phy_table rtw89_8851b_phy_nctl_table = {
|
||||
.rf_path = 0, /* don't care */
|
||||
};
|
||||
|
||||
static
|
||||
const struct rtw89_txpwr_table rtw89_8851b_byr_table = {
|
||||
.data = rtw89_8851b_txpwr_byrate,
|
||||
.size = ARRAY_SIZE(rtw89_8851b_txpwr_byrate),
|
||||
@ -14811,6 +14812,7 @@ const struct rtw89_txpwr_track_cfg rtw89_8851b_trk_cfg = {
|
||||
};
|
||||
|
||||
const struct rtw89_rfe_parms rtw89_8851b_dflt_parms = {
|
||||
.byr_tbl = &rtw89_8851b_byr_table,
|
||||
.rule_2ghz = {
|
||||
.lmt = &rtw89_8851b_txpwr_lmt_2g,
|
||||
.lmt_ru = &rtw89_8851b_txpwr_lmt_ru_2g,
|
||||
@ -14823,6 +14825,7 @@ const struct rtw89_rfe_parms rtw89_8851b_dflt_parms = {
|
||||
};
|
||||
|
||||
static const struct rtw89_rfe_parms rtw89_8851b_rfe_parms_type2 = {
|
||||
.byr_tbl = &rtw89_8851b_byr_table,
|
||||
.rule_2ghz = {
|
||||
.lmt = &rtw89_8851b_txpwr_lmt_2g_type2,
|
||||
.lmt_ru = &rtw89_8851b_txpwr_lmt_ru_2g_type2,
|
||||
|
@ -11,7 +11,6 @@ extern const struct rtw89_phy_table rtw89_8851b_phy_bb_table;
|
||||
extern const struct rtw89_phy_table rtw89_8851b_phy_bb_gain_table;
|
||||
extern const struct rtw89_phy_table rtw89_8851b_phy_radioa_table;
|
||||
extern const struct rtw89_phy_table rtw89_8851b_phy_nctl_table;
|
||||
extern const struct rtw89_txpwr_table rtw89_8851b_byr_table;
|
||||
extern const struct rtw89_txpwr_track_cfg rtw89_8851b_trk_cfg;
|
||||
extern const struct rtw89_rfe_parms rtw89_8851b_dflt_parms;
|
||||
extern const struct rtw89_rfe_parms_conf rtw89_8851b_rfe_parms_conf[];
|
||||
|
@ -2103,7 +2103,6 @@ const struct rtw89_chip_info rtw8852a_chip_info = {
|
||||
&rtw89_8852a_phy_radiob_table,},
|
||||
.nctl_table = &rtw89_8852a_phy_nctl_table,
|
||||
.nctl_post_table = NULL,
|
||||
.byr_table = &rtw89_8852a_byr_table,
|
||||
.dflt_parms = &rtw89_8852a_dflt_parms,
|
||||
.rfe_parms_conf = NULL,
|
||||
.txpwr_factor_rf = 2,
|
||||
|
@ -51020,6 +51020,7 @@ const struct rtw89_phy_table rtw89_8852a_phy_nctl_table = {
|
||||
.rf_path = 0, /* don't care */
|
||||
};
|
||||
|
||||
static
|
||||
const struct rtw89_txpwr_table rtw89_8852a_byr_table = {
|
||||
.data = rtw89_8852a_txpwr_byrate,
|
||||
.size = ARRAY_SIZE(rtw89_8852a_txpwr_byrate),
|
||||
@ -51049,6 +51050,7 @@ const struct rtw89_phy_dig_gain_table rtw89_8852a_phy_dig_table = {
|
||||
};
|
||||
|
||||
const struct rtw89_rfe_parms rtw89_8852a_dflt_parms = {
|
||||
.byr_tbl = &rtw89_8852a_byr_table,
|
||||
.rule_2ghz = {
|
||||
.lmt = &rtw89_8852a_txpwr_lmt_2g,
|
||||
.lmt_ru = &rtw89_8852a_txpwr_lmt_ru_2g,
|
||||
|
@ -11,7 +11,6 @@ extern const struct rtw89_phy_table rtw89_8852a_phy_bb_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852a_phy_radioa_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852a_phy_radiob_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852a_phy_nctl_table;
|
||||
extern const struct rtw89_txpwr_table rtw89_8852a_byr_table;
|
||||
extern const struct rtw89_phy_dig_gain_table rtw89_8852a_phy_dig_table;
|
||||
extern const struct rtw89_txpwr_track_cfg rtw89_8852a_trk_cfg;
|
||||
extern const struct rtw89_rfe_parms rtw89_8852a_dflt_parms;
|
||||
|
@ -2537,7 +2537,6 @@ const struct rtw89_chip_info rtw8852b_chip_info = {
|
||||
&rtw89_8852b_phy_radiob_table,},
|
||||
.nctl_table = &rtw89_8852b_phy_nctl_table,
|
||||
.nctl_post_table = NULL,
|
||||
.byr_table = &rtw89_8852b_byr_table,
|
||||
.dflt_parms = &rtw89_8852b_dflt_parms,
|
||||
.rfe_parms_conf = NULL,
|
||||
.txpwr_factor_rf = 2,
|
||||
|
@ -22860,6 +22860,7 @@ const struct rtw89_phy_table rtw89_8852b_phy_nctl_table = {
|
||||
.rf_path = 0, /* don't care */
|
||||
};
|
||||
|
||||
static
|
||||
const struct rtw89_txpwr_table rtw89_8852b_byr_table = {
|
||||
.data = rtw89_8852b_txpwr_byrate,
|
||||
.size = ARRAY_SIZE(rtw89_8852b_txpwr_byrate),
|
||||
@ -22882,6 +22883,7 @@ const struct rtw89_txpwr_track_cfg rtw89_8852b_trk_cfg = {
|
||||
};
|
||||
|
||||
const struct rtw89_rfe_parms rtw89_8852b_dflt_parms = {
|
||||
.byr_tbl = &rtw89_8852b_byr_table,
|
||||
.rule_2ghz = {
|
||||
.lmt = &rtw89_8852b_txpwr_lmt_2g,
|
||||
.lmt_ru = &rtw89_8852b_txpwr_lmt_ru_2g,
|
||||
|
@ -12,7 +12,6 @@ extern const struct rtw89_phy_table rtw89_8852b_phy_bb_gain_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852b_phy_radioa_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852b_phy_radiob_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852b_phy_nctl_table;
|
||||
extern const struct rtw89_txpwr_table rtw89_8852b_byr_table;
|
||||
extern const struct rtw89_txpwr_track_cfg rtw89_8852b_trk_cfg;
|
||||
extern const struct rtw89_rfe_parms rtw89_8852b_dflt_parms;
|
||||
|
||||
|
@ -2845,7 +2845,6 @@ const struct rtw89_chip_info rtw8852c_chip_info = {
|
||||
&rtw89_8852c_phy_radioa_table,},
|
||||
.nctl_table = &rtw89_8852c_phy_nctl_table,
|
||||
.nctl_post_table = NULL,
|
||||
.byr_table = &rtw89_8852c_byr_table,
|
||||
.dflt_parms = &rtw89_8852c_dflt_parms,
|
||||
.rfe_parms_conf = NULL,
|
||||
.chanctx_listener = &rtw8852c_chanctx_listener,
|
||||
|
@ -56426,6 +56426,7 @@ const struct rtw89_phy_table rtw89_8852c_phy_nctl_table = {
|
||||
.rf_path = 0, /* don't care */
|
||||
};
|
||||
|
||||
static
|
||||
const struct rtw89_txpwr_table rtw89_8852c_byr_table = {
|
||||
.data = rtw89_8852c_txpwr_byrate,
|
||||
.size = ARRAY_SIZE(rtw89_8852c_txpwr_byrate),
|
||||
@ -56462,6 +56463,7 @@ const struct rtw89_phy_tssi_dbw_table rtw89_8852c_tssi_dbw_table = {
|
||||
};
|
||||
|
||||
const struct rtw89_rfe_parms rtw89_8852c_dflt_parms = {
|
||||
.byr_tbl = &rtw89_8852c_byr_table,
|
||||
.rule_2ghz = {
|
||||
.lmt = &rtw89_8852c_txpwr_lmt_2g,
|
||||
.lmt_ru = &rtw89_8852c_txpwr_lmt_ru_2g,
|
||||
|
@ -12,7 +12,6 @@ extern const struct rtw89_phy_table rtw89_8852c_phy_bb_gain_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852c_phy_radioa_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852c_phy_radiob_table;
|
||||
extern const struct rtw89_phy_table rtw89_8852c_phy_nctl_table;
|
||||
extern const struct rtw89_txpwr_table rtw89_8852c_byr_table;
|
||||
extern const struct rtw89_phy_tssi_dbw_table rtw89_8852c_tssi_dbw_table;
|
||||
extern const struct rtw89_txpwr_track_cfg rtw89_8852c_trk_cfg;
|
||||
extern const struct rtw89_rfe_parms rtw89_8852c_dflt_parms;
|
||||
|
Loading…
Reference in New Issue
Block a user