Parcourir la source

qcacmn: Fix compile issues when some features are disabled

Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
Hangtian Zhu il y a 5 ans
Parent
commit
7788a89ccd

+ 31 - 0
os_if/linux/cp_stats/inc/wlan_cfg80211_mc_cp_stats.h

@@ -105,6 +105,37 @@ void wlan_cfg80211_mc_cp_stats_free_stats_event(struct stats_event *info);
 struct stats_event *
 wlan_cfg80211_mc_cp_stats_get_peer_rssi(struct wlan_objmgr_vdev *vdev,
 					uint8_t *macaddress, int *errno);
+#else
+static inline int wlan_cfg80211_mc_cp_stats_get_tx_power(
+				struct wlan_objmgr_vdev *vdev,
+				int *dbm)
+{
+	return 0;
+}
 
+static inline int wlan_cfg80211_mc_cp_stats_get_wakelock_stats(
+				struct wlan_objmgr_psoc *psoc,
+				struct wiphy *wiphy)
+{
+	return 0;
+}
+
+static inline struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_peer_rssi(struct wlan_objmgr_vdev *vdev,
+					uint8_t *macaddress, int *errno)
+{
+	return NULL;
+}
+
+static inline void wlan_cfg80211_mc_cp_stats_free_stats_event(
+			struct stats_event *info)
+{}
+
+static inline struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
+					    int *errno)
+{
+	return NULL;
+}
 #endif /* QCA_SUPPORT_CP_STATS */
 #endif /* __WLAN_CFG80211_MC_CP_STATS_H__ */

+ 1 - 1
qdf/inc/qdf_trace.h

@@ -574,7 +574,7 @@ void qdf_trace_dump_all(void *p_mac, uint8_t code, uint8_t session,
 static inline
 QDF_STATUS qdf_trace_spin_lock_init(void)
 {
-	return QDF_STATUS_E_INVAL;
+	return QDF_STATUS_SUCCESS;
 }
 #endif
 #endif

+ 13 - 3
qdf/linux/src/i_qdf_trace.h

@@ -63,9 +63,9 @@
 #define QDF_VTRACE qdf_vtrace_msg
 #define QDF_TRACE_HEX_DUMP qdf_trace_hex_dump
 #else
-#define QDF_TRACE(arg ...)
-#define QDF_VTRACE(arg ...)
-#define QDF_TRACE_HEX_DUMP(arg ...)
+#define QDF_TRACE(arg ...) __qdf_trace_dummy(arg)
+#define QDF_VTRACE(arg ...) __qdf_vtrace_dummy(arg)
+#define QDF_TRACE_HEX_DUMP(arg ...) __qdf_trace_hexdump_dummy(arg)
 #endif
 
 #if defined(WLAN_DEBUG) || defined(DEBUG) || defined(QDF_TRACE_PRINT_ENABLE)
@@ -108,6 +108,16 @@
 
 static inline void __qdf_trace_noop(QDF_MODULE_ID module,
 				    const char *format, ...) { }
+static inline void __qdf_trace_dummy(QDF_MODULE_ID module,
+				     QDF_TRACE_LEVEL level,
+				     const char *format, ...) { }
+static inline void __qdf_vtrace_dummy(QDF_MODULE_ID module,
+				      QDF_TRACE_LEVEL level,
+				      const char *str_format, va_list val) { }
+static inline void __qdf_trace_hexdump_dummy(QDF_MODULE_ID module,
+					     QDF_TRACE_LEVEL level,
+					     void *data, int buf_len) { }
+
 
 #ifdef WLAN_LOG_FATAL
 #define QDF_TRACE_FATAL(params...) \

+ 51 - 0
umac/cp_stats/dispatcher/inc/wlan_cp_stats_mc_ucfg_api.h

@@ -228,5 +228,56 @@ void static inline ucfg_mc_cp_stats_register_pmo_handler(void) { };
 #endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
 #else
 void static inline ucfg_mc_cp_stats_register_pmo_handler(void) { };
+static inline QDF_STATUS ucfg_mc_cp_stats_send_stats_request(
+				struct wlan_objmgr_vdev *vdev,
+				enum stats_req_type type,
+				struct request_info *info)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_set_rate_flags(
+				struct wlan_objmgr_vdev *vdev,
+				enum tx_rate_info flags)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_get_psoc_wake_lock_stats(
+						struct wlan_objmgr_psoc *psoc,
+						struct wake_lock_stats *stats)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_inc_wake_lock_stats_by_protocol(
+					struct wlan_objmgr_psoc *psoc,
+					uint8_t vdev_id,
+					enum qdf_proto_subtype protocol)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_inc_wake_lock_stats(
+				struct wlan_objmgr_psoc *psoc,
+				uint8_t vdev_id,
+				uint32_t reason)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_inc_wake_lock_stats_by_dst_addr(
+					struct wlan_objmgr_psoc *psoc,
+					uint8_t vdev_id, uint8_t *dest_mac)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_mc_cp_stats_get_vdev_wake_lock_stats(
+						struct wlan_objmgr_vdev *vdev,
+						struct wake_lock_stats *stats)
+{
+	return QDF_STATUS_SUCCESS;
+}
 #endif /* QCA_SUPPORT_CP_STATS */
 #endif /* __WLAN_CP_STATS_MC_UCFG_API_H__ */

+ 3 - 3
umac/regulatory/core/src/reg_opclass.h

@@ -196,9 +196,9 @@ reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
 
 #endif
 
-uint16_t reg_get_op_class_width(struct wlan_objmgr_pdev *pdev,
-				uint8_t op_class,
-				bool global_tbl_lookup)
+static inline uint16_t reg_get_op_class_width(struct wlan_objmgr_pdev *pdev,
+					      uint8_t op_class,
+					      bool global_tbl_lookup)
 {
 	return 0;
 }

+ 1 - 3
utils/fwlog/dbglog_host.c

@@ -54,12 +54,10 @@
 #include <a_debug.h>
 #define FWLOG_DEBUG   ATH_DEBUG_MAKE_MODULE_MASK(0)
 
-#ifdef WLAN_DEBUG
-
 static int get_version;
 static int gprint_limiter;
 static bool tgt_assert_enable;
-
+#ifdef WLAN_DEBUG
 static ATH_DEBUG_MASK_DESCRIPTION g_fwlog_debug_description[] = {
 	{FWLOG_DEBUG, "fwlog"},
 };

+ 9 - 1
utils/logging/inc/wlan_roam_debug.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -161,6 +161,14 @@ wlan_roam_debug_log(uint8_t vdev_id, uint8_t op,
 static inline void wlan_roam_debug_dump_table(void)
 {
 }
+
+static inline void wlan_roam_debug_init(void)
+{
+}
+
+static inline void wlan_roam_debug_deinit(void)
+{
+}
 #endif /* FEATURE_ROAM_DEBUG */
 
 #endif /* _WLAN_ROAM_DEBUG_H_ */