mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 12:13:51 -04:00
wifi: rtw89: add tx shape v0 to keep built-in arrays compatible during transitions
TX shape parameters can come from (old way) built-in arrays or (new way) FW elements. The built-in arrays will no longer be updated, but will be retained during a certain transition period. However, the format of newer TX shape parameters are going to be expanded. It will only be applied to FW elements. To keep built-in arrays compatible during transition period, add tx shape v0 for old format. The v0 fields can be removed along with built-in arrays once transition period ends. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260712034506.53209-6-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
ed74acea83
commit
7054b03136
@@ -4923,6 +4923,9 @@ struct rtw89_txpwr_rule_6ghz {
|
||||
struct rtw89_tx_shape {
|
||||
const u8 (*lmt)[RTW89_BAND_NUM][RTW89_RS_TX_SHAPE_NUM][RTW89_REGD_NUM];
|
||||
const u8 (*lmt_ru)[RTW89_BAND_NUM][RTW89_REGD_NUM];
|
||||
|
||||
const u8 (*lmt_v0)[RTW89_BAND_NUM][RTW89_RS_TX_SHAPE_NUM][RTW89_REGD_NUM];
|
||||
const u8 (*lmt_ru_v0)[RTW89_BAND_NUM][RTW89_REGD_NUM];
|
||||
};
|
||||
|
||||
struct rtw89_rfe_parms {
|
||||
@@ -8458,7 +8461,13 @@ static inline u8 rtw89_get_tx_shape_idx(struct rtw89_dev *rtwdev, u8 band,
|
||||
if (unlikely(rs >= RTW89_RS_TX_SHAPE_NUM))
|
||||
rs = RTW89_RS_OFDM;
|
||||
|
||||
if (!tx_shape->lmt)
|
||||
goto v0;
|
||||
|
||||
return (*tx_shape->lmt)[band][rs][regd];
|
||||
|
||||
v0:
|
||||
return (*tx_shape->lmt_v0)[band][rs][regd];
|
||||
}
|
||||
|
||||
static inline void rtw89_ctrl_btg_bt_rx(struct rtw89_dev *rtwdev, bool en,
|
||||
|
||||
@@ -14887,8 +14887,8 @@ const struct rtw89_rfe_parms rtw89_8851b_dflt_parms = {
|
||||
.lmt_ru = &rtw89_8851b_txpwr_lmt_ru_5g,
|
||||
},
|
||||
.tx_shape = {
|
||||
.lmt = &rtw89_8851b_tx_shape_lmt,
|
||||
.lmt_ru = &rtw89_8851b_tx_shape_lmt_ru,
|
||||
.lmt_v0 = &rtw89_8851b_tx_shape_lmt,
|
||||
.lmt_ru_v0 = &rtw89_8851b_tx_shape_lmt_ru,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -14903,8 +14903,8 @@ static const struct rtw89_rfe_parms rtw89_8851b_rfe_parms_type2 = {
|
||||
.lmt_ru = &rtw89_8851b_txpwr_lmt_ru_5g_type2,
|
||||
},
|
||||
.tx_shape = {
|
||||
.lmt = &rtw89_8851b_tx_shape_lmt,
|
||||
.lmt_ru = &rtw89_8851b_tx_shape_lmt_ru,
|
||||
.lmt_v0 = &rtw89_8851b_tx_shape_lmt,
|
||||
.lmt_ru_v0 = &rtw89_8851b_tx_shape_lmt_ru,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -22922,7 +22922,7 @@ const struct rtw89_rfe_parms rtw89_8852b_dflt_parms = {
|
||||
.lmt_ru = &rtw89_8852b_txpwr_lmt_ru_5g,
|
||||
},
|
||||
.tx_shape = {
|
||||
.lmt = &rtw89_8852b_tx_shape_lmt,
|
||||
.lmt_ru = &rtw89_8852b_tx_shape_lmt_ru,
|
||||
.lmt_v0 = &rtw89_8852b_tx_shape_lmt,
|
||||
.lmt_ru_v0 = &rtw89_8852b_tx_shape_lmt_ru,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -57154,7 +57154,7 @@ const struct rtw89_rfe_parms rtw89_8852c_dflt_parms = {
|
||||
.lmt_ru = &rtw89_8852c_txpwr_lmt_ru_6g,
|
||||
},
|
||||
.tx_shape = {
|
||||
.lmt = &rtw89_8852c_tx_shape_lmt,
|
||||
.lmt_ru = &rtw89_8852c_tx_shape_lmt_ru,
|
||||
.lmt_v0 = &rtw89_8852c_tx_shape_lmt,
|
||||
.lmt_ru_v0 = &rtw89_8852c_tx_shape_lmt_ru,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user