Commit 8592fd7c authored by Johannes Berg's avatar Johannes Berg

wifi: ieee80211/ath11k: remove IEEE80211_MAX_NUM_PWR_LEVEL

The define IEEE80211_MAX_NUM_PWR_LEVEL doesn't make much
sense. Yes, that table has a maximum value of 8, and the
table will actually remain that way, but EHT introduced
a way to encode more levels for 320 MHz channels.

Remove IEEE80211_MAX_NUM_PWR_LEVEL and, for ath11k being
the only user, add ATH11K_NUM_PWR_LEVELS, where it makes
sense since it cannot support 320 MHz channels.
Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240506214536.9818e5471055.Icece7e47e963d6b68e0d97ba13c102b37fbaa689@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e3bae9b2
...@@ -330,6 +330,9 @@ struct ath11k_chan_power_info { ...@@ -330,6 +330,9 @@ struct ath11k_chan_power_info {
s8 tx_power; s8 tx_power;
}; };
/* ath11k only deals with 160 MHz, so 8 subchannels */
#define ATH11K_NUM_PWR_LEVELS 8
/** /**
* struct ath11k_reg_tpc_power_info - regulatory TPC power info * struct ath11k_reg_tpc_power_info - regulatory TPC power info
* @is_psd_power: is PSD power or not * @is_psd_power: is PSD power or not
...@@ -346,10 +349,10 @@ struct ath11k_reg_tpc_power_info { ...@@ -346,10 +349,10 @@ struct ath11k_reg_tpc_power_info {
u8 eirp_power; u8 eirp_power;
enum wmi_reg_6ghz_ap_type ap_power_type; enum wmi_reg_6ghz_ap_type ap_power_type;
u8 num_pwr_levels; u8 num_pwr_levels;
u8 reg_max[IEEE80211_MAX_NUM_PWR_LEVEL]; u8 reg_max[ATH11K_NUM_PWR_LEVELS];
u8 ap_constraint_power; u8 ap_constraint_power;
s8 tpe[IEEE80211_MAX_NUM_PWR_LEVEL]; s8 tpe[ATH11K_NUM_PWR_LEVELS];
struct ath11k_chan_power_info chan_power_info[IEEE80211_MAX_NUM_PWR_LEVEL]; struct ath11k_chan_power_info chan_power_info[ATH11K_NUM_PWR_LEVELS];
}; };
struct ath11k_vif { struct ath11k_vif {
......
...@@ -7688,7 +7688,7 @@ void ath11k_mac_fill_reg_tpc_info(struct ath11k *ar, ...@@ -7688,7 +7688,7 @@ void ath11k_mac_fill_reg_tpc_info(struct ath11k *ar,
struct ieee80211_channel *chan, *temp_chan; struct ieee80211_channel *chan, *temp_chan;
u8 pwr_lvl_idx, num_pwr_levels, pwr_reduction; u8 pwr_lvl_idx, num_pwr_levels, pwr_reduction;
bool is_psd_power = false, is_tpe_present = false; bool is_psd_power = false, is_tpe_present = false;
s8 max_tx_power[IEEE80211_MAX_NUM_PWR_LEVEL], s8 max_tx_power[ATH11K_NUM_PWR_LEVELS],
psd_power, tx_power; psd_power, tx_power;
s8 eirp_power = 0; s8 eirp_power = 0;
u16 start_freq, center_freq; u16 start_freq, center_freq;
......
...@@ -2833,11 +2833,6 @@ struct ieee80211_he_6ghz_oper { ...@@ -2833,11 +2833,6 @@ struct ieee80211_he_6ghz_oper {
* So it it totally max 8 Transmit Power Envelope element. * So it it totally max 8 Transmit Power Envelope element.
*/ */
#define IEEE80211_TPE_MAX_IE_COUNT 8 #define IEEE80211_TPE_MAX_IE_COUNT 8
/*
* In "Table 9-277—Meaning of Maximum Transmit Power Count subfield"
* of "IEEE Std 802.11ax™‐2021", the max power level is 8.
*/
#define IEEE80211_MAX_NUM_PWR_LEVEL 8
#define IEEE80211_TPE_MAX_POWER_COUNT 8 #define IEEE80211_TPE_MAX_POWER_COUNT 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment