From 0918f242d1a25b1504caa4be810c820ec2d11bac Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 17 Jul 2018 18:52:17 -0700 Subject: [PATCH] qcacld-3.0: Add SAR version to struct wma_tgt_cfg HDD needs to know the SAR version running in firmware so add that information to struct wma_tgt_cfg. Change-Id: Idcb79921cb417a923ced8b6cfed2672bee03eaf1 CRs-Fixed: 2282071 --- core/wma/inc/wma_internal.h | 5 ----- core/wma/inc/wma_tgt_cfg.h | 4 ++++ core/wma/src/wma_main.c | 8 ++++++++ core/wma/src/wma_sar_public_structs.h | 5 +++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h index 93b2b8c5b46c..2b5eaf464b28 100644 --- a/core/wma/inc/wma_internal.h +++ b/core/wma/inc/wma_internal.h @@ -114,11 +114,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 e18f3a342495..e6033f1ea3e6 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 @@ -178,6 +180,7 @@ struct board_info { * @rcpi_enabled: for checking rcpi support * @obss_detection_offloaded: obss detection offloaded to firmware * @obss_color_collision_offloaded: obss color collision offloaded to firmware + * @sar_version: Version of SAR supported by firmware */ struct wma_tgt_cfg { uint32_t target_fw_version; @@ -218,5 +221,6 @@ struct wma_tgt_cfg { bool obss_color_collision_offloaded; 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 735f2debd678..21decf74dec6 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -5328,6 +5328,13 @@ static void wma_update_ra_rate_limit(tp_wma_handle wma_handle, } #endif +static void +wma_update_sar_version(struct wlan_psoc_host_service_ext_param *param, + struct wma_tgt_cfg *cfg) +{ + cfg->sar_version = param ? param->sar_version : SAR_VERSION_1; +} + /** * wma_update_hdd_band_cap() - update band cap which hdd understands * @supported_band: supported band which has been given by FW @@ -5493,6 +5500,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) wma_update_ra_rate_limit(wma_handle, &tgt_cfg); wma_update_hdd_band_cap(target_if_get_phy_capability(tgt_hdl), &tgt_cfg); + wma_update_sar_version(service_ext_param, &tgt_cfg); tgt_cfg.fine_time_measurement_cap = target_if_get_wmi_fw_sub_feat_caps(tgt_hdl); 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