From aa7f8d772d748c9473d5049da8fa8627dd2f4f85 Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Wed, 18 Oct 2017 17:23:45 +0800 Subject: [PATCH] qcacld-3.0: Fix build error without MSM_PLATFORM Compiler is throwing error - undefined variable 'busBandwidthComputeInterval' after MSM_PLATFORM disabled. Wrap the related code within MSM_PLATFORM. CRs-Fixed: 2135338 Change-Id: Iad1b7a4deefec0d454d12c257d885f0fa256d33f --- core/hdd/inc/wlan_hdd_main.h | 6 ++++++ core/hdd/src/wlan_hdd_main.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 9fc7a1de21f3..e3e339945772 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1981,6 +1981,9 @@ void hdd_bus_bw_cancel_work(struct hdd_context *hdd_ctx); * Return: None. */ void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx); + +#define GET_BW_COMPUTE_INTV(config) ((config)->busBandwidthComputeInterval) + #else static inline @@ -2023,6 +2026,9 @@ static inline void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx) { } + +#define GET_BW_COMPUTE_INTV(config) 0 + #endif int hdd_qdf_trace_enable(QDF_MODULE_ID module_id, uint32_t bitmask); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7cb87ecdb906..d9971dd9be93 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9793,14 +9793,15 @@ void hdd_dp_trace_init(struct hdd_config *config) uint8_t proto_bitmap = DP_TRACE_CONFIG_DEFAULT_BITMAP; uint8_t config_params[DP_TRACE_CONFIG_NUM_PARAMS]; uint8_t num_entries = 0; + uint32_t bw_compute_interval; hdd_string_to_u8_array(config->dp_trace_config, config_params, &num_entries, sizeof(config_params)); /* calculating, num bw timer intervals in a second (1000ms) */ - if (config->busBandwidthComputeInterval) - thresh_time_limit = - (1000 / config->busBandwidthComputeInterval); + bw_compute_interval = GET_BW_COMPUTE_INTV(config); + if (bw_compute_interval) + thresh_time_limit = 1000 / bw_compute_interval; else hdd_err("busBandwidthComputeInterval is 0, using defaults");