summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/phy.h
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2019-07-13 04:32:32 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-08-06 15:24:53 +0300
commit3457f86da60de73705bce8fe32a36651441e639e (patch)
tree8a42b4a6ba99d0909eac466ce9a1b8f3416864a2 /drivers/net/wireless/realtek/rtw88/phy.h
parent15e830e90fde81b32c96490fb9ff1a26097609eb (diff)
downloadlinux-3457f86da60de73705bce8fe32a36651441e639e.tar.xz
rtw88: use txpwr_lmt_cfg_pair struct, not arrays
We're just trusting that these tables are of the right dimensions, when we could do better by just using the struct directly. Let's expose the struct txpwr_lmt_cfg_pair instead. The table changes were made by using some Vim macros, so that should help prevent any translation mistakes along the way. Remaining work: get the 'void *data' out of the generic struct rtw_table; all of these tables really deserve to be their own data structure, with proper type fields. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/phy.h')
-rw-r--r--drivers/net/wireless/realtek/rtw88/phy.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/phy.h b/drivers/net/wireless/realtek/rtw88/phy.h
index 7c8eb732b13c..cc87b157f23e 100644
--- a/drivers/net/wireless/realtek/rtw88/phy.h
+++ b/drivers/net/wireless/realtek/rtw88/phy.h
@@ -45,6 +45,15 @@ void rtw_phy_set_tx_power_level(struct rtw_dev *rtwdev, u8 channel);
void rtw_phy_tx_power_by_rate_config(struct rtw_hal *hal);
void rtw_phy_tx_power_limit_config(struct rtw_hal *hal);
+struct rtw_txpwr_lmt_cfg_pair {
+ u8 regd;
+ u8 band;
+ u8 bw;
+ u8 rs;
+ u8 ch;
+ s8 txpwr_lmt;
+};
+
#define RTW_DECL_TABLE_PHY_COND_CORE(name, cfg, path) \
const struct rtw_table name ## _tbl = { \
.data = name, \