Преглед на файлове

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
Lin Bai преди 7 години
родител
ревизия
aa7f8d772d
променени са 2 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 6 0
      core/hdd/inc/wlan_hdd_main.h
  2. 4 3
      core/hdd/src/wlan_hdd_main.c

+ 6 - 0
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);

+ 4 - 3
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");