Browse Source

qcacld-3.0: Fix compile issue when CONFIG_CP_STATS is not enabled

Fix compile issue when CONFIG_CP_STATS is not enabled.

Change-Id: Ib5dd1e7107a5bd49ee3d187e283b5580d19c6adf
CRs-Fixed: 2516551
Hangtian Zhu 5 years ago
parent
commit
cf89c86e62
2 changed files with 6 additions and 0 deletions
  1. 2 0
      core/hdd/src/wlan_hdd_stats.c
  2. 4 0
      core/hdd/src/wlan_hdd_stats.h

+ 2 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -5831,6 +5831,7 @@ void wlan_hdd_display_txrx_stats(struct hdd_context *ctx)
 	}
 }
 
+#ifdef QCA_SUPPORT_CP_STATS
 /**
  * hdd_lost_link_cp_stats_info_cb() - callback function to get lost
  * link information
@@ -5880,4 +5881,5 @@ void wlan_hdd_register_cp_stats_cb(struct hdd_context *hdd_ctx)
 					hdd_ctx->psoc,
 					hdd_lost_link_cp_stats_info_cb);
 }
+#endif
 

+ 4 - 0
core/hdd/src/wlan_hdd_stats.h

@@ -461,6 +461,7 @@ bool hdd_report_max_rate(mac_handle_t mac_handle,
 			 uint8_t mcs_index,
 			 uint16_t fw_rate, uint8_t nss);
 
+#ifdef QCA_SUPPORT_CP_STATS
 /**
  * wlan_hdd_register_cp_stats_cb() - Register hdd stats specific
  * callbacks to the cp stats component
@@ -470,5 +471,8 @@ bool hdd_report_max_rate(mac_handle_t mac_handle,
  */
 
 void wlan_hdd_register_cp_stats_cb(struct hdd_context *hdd_ctx);
+#else
+static inline void wlan_hdd_register_cp_stats_cb(struct hdd_context *hdd_ctx) {}
+#endif
 
 #endif /* end #if !defined(WLAN_HDD_STATS_H) */