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
This commit is contained in:
Lin Bai 2017-10-18 17:23:45 +08:00 • committed by snandini
commit aa7f8d772d
2 changed files with 10 additions and 3 deletions

View file

@ -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);

View file

@ -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");