Merge tag 'ath-next-20240130' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath
[sfrench/cifs-2.6.git] / drivers / net / wireless / ath / ath11k / core.h
index 02e160d831bed13f3358034048ce5b03d36dc090..0b2d4a93d706e129f8eae67168a665daf63880eb 100644 (file)
@@ -314,6 +314,43 @@ struct ath11k_rekey_data {
        bool enable_offload;
 };
 
+/**
+ * struct ath11k_chan_power_info - TPE containing power info per channel chunk
+ * @chan_cfreq: channel center freq (MHz)
+ * e.g.
+ * channel 37/20 MHz,  it is 6135
+ * channel 37/40 MHz,  it is 6125
+ * channel 37/80 MHz,  it is 6145
+ * channel 37/160 MHz, it is 6185
+ * @tx_power: transmit power (dBm)
+ */
+struct ath11k_chan_power_info {
+       u16 chan_cfreq;
+       s8 tx_power;
+};
+
+/**
+ * struct ath11k_reg_tpc_power_info - regulatory TPC power info
+ * @is_psd_power: is PSD power or not
+ * @eirp_power: Maximum EIRP power (dBm), valid only if power is PSD
+ * @ap_power_type: type of power (SP/LPI/VLP)
+ * @num_pwr_levels: number of power levels
+ * @reg_max: Array of maximum TX power (dBm) per PSD value
+ * @ap_constraint_power: AP constraint power (dBm)
+ * @tpe: TPE values processed from TPE IE
+ * @chan_power_info: power info to send to firmware
+ */
+struct ath11k_reg_tpc_power_info {
+       bool is_psd_power;
+       u8 eirp_power;
+       enum wmi_reg_6ghz_ap_type ap_power_type;
+       u8 num_pwr_levels;
+       u8 reg_max[IEEE80211_MAX_NUM_PWR_LEVEL];
+       u8 ap_constraint_power;
+       s8 tpe[IEEE80211_MAX_NUM_PWR_LEVEL];
+       struct ath11k_chan_power_info chan_power_info[IEEE80211_MAX_NUM_PWR_LEVEL];
+};
+
 struct ath11k_vif {
        u32 vdev_id;
        enum wmi_vdev_type vdev_type;
@@ -368,6 +405,8 @@ struct ath11k_vif {
        struct ieee80211_chanctx_conf chanctx;
        struct ath11k_arp_ns_offload arp_ns_offload;
        struct ath11k_rekey_data rekey_data;
+
+       struct ath11k_reg_tpc_power_info reg_tpc_info;
 };
 
 struct ath11k_vif_iter {
@@ -735,6 +774,7 @@ struct ath11k {
        /* protected by conf_mutex */
        bool ps_state_enable;
        bool ps_timekeeper_enable;
+       s8 max_allowed_tx_power;
 };
 
 struct ath11k_band_cap {
@@ -918,6 +958,7 @@ struct ath11k_base {
         * This may or may not be used during the runtime
         */
        struct ieee80211_regdomain *new_regd[MAX_RADIOS];
+       struct cur_regulatory_info *reg_info_store;
 
        /* Current DFS Regulatory */
        enum ath11k_dfs_region dfs_region;