qcacmn: Add support to retrieve SAR power limits
Recently change "qcacmn: Add SAR power limit configuration"
(Change-Id: I0a214a2af780e9dd8c381c4e9eaa7d8cab6ef853) added the
ability to dynamically configure Specific Absorption Rate (SAR) power
limits. Now add the ability to retrieve the current active power
limits.
Change-Id: I7a6071dee71300daa3a217780ff3523604a11795
CRs-Fixed: 2161451
diff --git a/wmi_unified_param.h b/wmi_unified_param.h
index bd628a2..5cbcd8e 100644
--- a/wmi_unified_param.h
+++ b/wmi_unified_param.h
@@ -5664,6 +5664,7 @@
wmi_dma_buf_release_event_id,
wmi_sap_obss_detection_report_event_id,
wmi_host_swfda_event_id,
+ wmi_sar_get_limits_event_id,
wmi_events_max,
} wmi_conv_event_id;
@@ -7768,12 +7769,15 @@
#define MAX_SAR_LIMIT_ROWS_SUPPORTED 64
/**
- * struct sar_limit_cmd_row - sar limts row
+ * struct sar_limit_cmd_row - sar limits row
* @band_id: Optional param for frequency band
+ * See %enum wmi_sar_band_id_flags for possible values
* @chain_id: Optional param for antenna chain id
* @mod_id: Optional param for modulation scheme
+ * See %enum wmi_sar_mod_id_flags for possible values
* @limit_value: Mandatory param providing power limits in steps of 0.5 dbm
* @validity_bitmap: bitmap of valid optional params in sar_limit_cmd_row struct
+ * See WMI_SAR_*_VALID_MASK for possible values
*/
struct sar_limit_cmd_row {
uint32_t band_id;
@@ -7784,8 +7788,9 @@
};
/**
- * struct sar_limit_cmd_params - sar limts params
+ * struct sar_limit_cmd_params - sar limits params
* @sar_enable: flag to enable SAR
+ * See %enum wmi_sar_feature_state_flags for possible values
* @num_limit_rows: number of items in sar_limits
* @commit_limits: indicates firmware to start apply new SAR values
* @sar_limit_row_list: pointer to array of sar limit rows
@@ -7797,6 +7802,38 @@
struct sar_limit_cmd_row *sar_limit_row_list;
};
+/**
+ * struct sar_limit_event_row - sar limits row
+ * @band_id: Frequency band.
+ * See %enum wmi_sar_band_id_flags for possible values
+ * @chain_id: Chain id
+ * @mod_id: Modulation scheme
+ * See %enum wmi_sar_mod_id_flags for possible values
+ * @limit_value: Power limits in steps of 0.5 dbm that is currently active for
+ * the given @band_id, @chain_id, and @mod_id
+ */
+struct sar_limit_event_row {
+ uint32_t band_id;
+ uint32_t chain_id;
+ uint32_t mod_id;
+ uint32_t limit_value;
+};
+
+/**
+ * struct sar_limit_event - sar limits params
+ * @sar_enable: Current status of SAR enablement.
+ * See %enum wmi_sar_feature_state_flags for possible values
+ * @num_limit_rows: number of items in sar_limits
+ * @sar_limit_row: array of sar limit rows. Only @num_limit_rows
+ * should be considered valid.
+ */
+struct sar_limit_event {
+ uint32_t sar_enable;
+ uint32_t num_limit_rows;
+ struct sar_limit_event_row
+ sar_limit_row[MAX_SAR_LIMIT_ROWS_SUPPORTED];
+};
+
/*
* struct wmi_peer_gid_userpos_list_event
* @usr_list - User list