rtw89: handle TX power limit of 6G and 160M
Ping-Ke Shih
maintainercover rtw89: handle TX power limit of 6G and 160M
Add TX power limit of 6G and 160M support to framework, so the new chip can work based on this.
Zong-Zhe Yang (2):
rtw89: phy: handle txpwr lmt/lmt_ru of 6G band
rtw89: phy: handle txpwr lmt/lmt_ru of 160M bandwidth
drivers/net/wireless/realtek/rtw89/core.h | 27 +++- drivers/net/wireless/realtek/rtw89/phy.c | 161 ++++++++++++++++++++-- 2 files changed, 178 insertions(+), 10 deletions(-)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/2 rtw89: phy: handle txpwr lmt/lmt_ru of 6G band
From: Zong-Zhe Yang <[email protected]>
Add declarations of 6G stuff and extend rtw89_channel_to_idx() to map 6G's channels to 6G channel indexes. While 6G, correspondingly read 6G's entry for tx power limit and limit_ru.
After this, we should pay attention to chip_info::support_bands. If a chip declares 6G support, it must configure txpwr_lmt_6g and txpwr_lmt_ru_6g in case accessing NULL pointer while setting tx power limit/limit_ru on 6G band.
--- drivers/net/wireless/realtek/rtw89/core.h | 25 ++++++++++++ drivers/net/wireless/realtek/rtw89/phy.c | 46 +++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/core.h +25 -0
@@ -371,6 +371,25 @@ enum rtw89_hw_rate {*/ #define RTW89_5G_CH_NUM 53 +/* 6G channels, +* 1, 3, 5, 7, 9, 11, 13, 15, +* 17, 19, 21, 23, 25, 27, 29, 33, +* 35, 37, 39, 41, 43, 45, 47, 49, +* 51, 53, 55, 57, 59, 61, 65, 67, +* 69, 71, 73, 75, 77, 79, 81, 83, +* 85, 87, 89, 91, 93, 97, 99, 101, +* 103, 105, 107, 109, 111, 113, 115, 117, +* 119, 121, 123, 125, 129, 131, 133, 135, +* 137, 139, 141, 143, 145, 147, 149, 151, +* 153, 155, 157, 161, 163, 165, 167, 169, +* 171, 173, 175, 177, 179, 181, 183, 185, +* 187, 189, 193, 195, 197, 199, 201, 203, +* 205, 207, 209, 211, 213, 215, 217, 219, +* 221, 225, 227, 229, 231, 233, 235, 237, +* 239, 241, 243, 245, 247, 249, 251, 253, +*/ +#define RTW89_6G_CH_NUM 120 +enum rtw89_rate_section {RTW89_RS_CCK ,RTW89_RS_OFDM ,
@@ -554,6 +573,7 @@ enum rtw89_ps_mode {#define RTW89_2G_BW_NUM (RTW89_CHANNEL_WIDTH_40 + 1)#define RTW89_5G_BW_NUM (RTW89_CHANNEL_WIDTH_80 + 1) +#define RTW89_6G_BW_NUM (RTW89_CHANNEL_WIDTH_160 + 1)#define RTW89_PPE_BW_NUM (RTW89_CHANNEL_WIDTH_80 + 1)enum rtw89_ru_bandwidth {
@@ -2246,10 +2266,15 @@ struct rtw89_chip_info {const s8 (*txpwr_lmt_5g)[RTW89_5G_BW_NUM ][RTW89_NTX_NUM ] [RTW89_RS_LMT_NUM ][RTW89_BF_NUM ] [RTW89_REGD_NUM ][RTW89_5G_CH_NUM ]; +const s8 (*txpwr_lmt_6g)[RTW89_6G_BW_NUM ][RTW89_NTX_NUM ] + [RTW89_RS_LMT_NUM ][RTW89_BF_NUM ] + [RTW89_REGD_NUM ][RTW89_6G_CH_NUM ];const s8 (*txpwr_lmt_ru_2g)[RTW89_RU_NUM ][RTW89_NTX_NUM ] [RTW89_REGD_NUM ][RTW89_2G_CH_NUM ];const s8 (*txpwr_lmt_ru_5g)[RTW89_RU_NUM ][RTW89_NTX_NUM ] [RTW89_REGD_NUM ][RTW89_5G_CH_NUM ]; +const s8 (*txpwr_lmt_ru_6g)[RTW89_RU_NUM ][RTW89_NTX_NUM ] + [RTW89_REGD_NUM ][RTW89_6G_CH_NUM ];u8 txpwr_factor_rf;u8 txpwr_factor_mac;
drivers/net/wireless/realtek/rtw89/phy.c +43 -3
79 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 1/2] rtw89: phy: handle txpwr lmt/lmt_ru of 6G band
Quoted 6 lines · Ping-Ke Shih
From: Zong-Zhe Yang <[email protected]>
Add declarations of 6G stuff and extend
rtw89_channel_to_idx()to map 6G's channels to 6G channel indexes. While 6G, correspondingly read 6G's entry for tx power limit andlimit_ru.
Quoted 7 lines
After this, we should pay attention to
chip_info::support_bands. If a chip declares 6G support, it must configuretxpwr_lmt_6gandtxpwr_lmt_ru_6gin case accessing NULL pointer while setting tx power limit/limit_ru on 6G band.Signed-off-by Zong-Zhe Yang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
2 patches applied to wireless-next.git, thanks.
ac74f016f035 rtw89: phy: handle txpwr lmt/lmt_ru of 6G band 94b70cafc661 rtw89: phy: handle txpwr lmt/lmt_ru of 160M bandwidth
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches