summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/wma/inc/wma_internal.h5
-rw-r--r--core/wma/inc/wma_tgt_cfg.h4
-rw-r--r--core/wma/src/wma_main.c10
-rw-r--r--core/wma/src/wma_sar_public_structs.h5
4 files changed, 19 insertions, 5 deletions
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 4af334a2100c..23c60673ed19 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -122,11 +122,6 @@
#define MAX_NUM_HW_MODE 0xff
#define MAX_NUM_PHY 0xff
-enum sar_version {
- SAR_VERSION_1,
- SAR_VERSION_2
-};
-
/**
* struct index_data_rate_type - non vht data rate type
* @mcs_index: mcs rate index
diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h
index cda306b551f5..30d4a8211f22 100644
--- a/core/wma/inc/wma_tgt_cfg.h
+++ b/core/wma/inc/wma_tgt_cfg.h
@@ -19,6 +19,8 @@
#ifndef WMA_TGT_CFG_H
#define WMA_TGT_CFG_H
+#include "wma_sar_public_structs.h"
+
/**
* struct wma_tgt_services - target services
* @sta_power_save: sta power save
@@ -169,6 +171,7 @@ struct board_info {
* @bool is_ra_rate_limit_enabled: RA filter support
* @tx_bfee_8ss_enabled: Tx Beamformee support for 8x8
* @rcpi_enabled: for checking rcpi support
+ * @sar_version: Version of SAR supported by firmware
*/
struct wma_tgt_cfg {
uint32_t target_fw_version;
@@ -202,5 +205,6 @@ struct wma_tgt_cfg {
bool rcpi_enabled;
uint32_t hw_bd_id;
struct board_info hw_bd_info;
+ enum sar_version sar_version;
};
#endif /* WMA_TGT_CFG_H */
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 898d3ebea0c3..24652057d687 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -4806,6 +4806,15 @@ static void wma_update_ra_rate_limit(tp_wma_handle wma_handle,
}
#endif
+static void wma_update_sar_version(tp_wma_handle wma_handle,
+ struct wma_tgt_cfg *cfg)
+{
+ struct extended_caps *phy_caps;
+
+ phy_caps = &wma_handle->phy_caps;
+ cfg->sar_version = phy_caps->sar_capability.active_version;
+}
+
/**
* wma_update_hdd_cfg() - update HDD config
* @wma_handle: wma handle
@@ -4873,6 +4882,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
tgt_cfg.apf_enabled = wma_handle->apf_enabled;
tgt_cfg.rcpi_enabled = wma_handle->rcpi_enabled;
wma_update_ra_rate_limit(wma_handle, &tgt_cfg);
+ wma_update_sar_version(wma_handle, &tgt_cfg);
tgt_cfg.fine_time_measurement_cap =
wma_handle->fine_time_measurement_cap;
tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle)
diff --git a/core/wma/src/wma_sar_public_structs.h b/core/wma/src/wma_sar_public_structs.h
index 00b9e06d243b..f2b330ba3f8e 100644
--- a/core/wma/src/wma_sar_public_structs.h
+++ b/core/wma/src/wma_sar_public_structs.h
@@ -21,6 +21,11 @@
struct sar_limit_event;
+enum sar_version {
+ SAR_VERSION_1,
+ SAR_VERSION_2
+};
+
/**
* typedef wma_sar_cb() - SAR callback function
* @context: Opaque context provided by caller in the original request