From 583a3b1b18e0db1b25b5f6be382c108baa08ac07 Mon Sep 17 00:00:00 2001 From: Wen Gong Date: Fri, 20 Apr 2018 16:56:28 +0800 Subject: [PATCH] qcacmn: Featurize dbglog_host Featurize parsing support for WLAN firmware logs in WLAN host driver Change-Id: I94a75a0ab09f086209298bdd4870df78e9733a3f CRs-Fixed: 2228370 --- utils/fwlog/dbglog_host.h | 59 +++++++++++++++++++++++++++++++++++++++ wmi/inc/wmi_unified_api.h | 11 +++++++- wmi/src/wmi_unified_api.c | 2 ++ wmi/src/wmi_unified_tlv.c | 4 +++ 4 files changed, 75 insertions(+), 1 deletion(-) diff --git a/utils/fwlog/dbglog_host.h b/utils/fwlog/dbglog_host.h index fe647501ac..70899348ab 100644 --- a/utils/fwlog/dbglog_host.h +++ b/utils/fwlog/dbglog_host.h @@ -69,6 +69,7 @@ extern "C" { #define DIAG_GET_PAYLEN16(arg) \ ((arg & DIAG_PAYLEN_MASK16) >> DIAG_PAYLEN_OFFSET16) +#ifdef FEATURE_FW_LOG_PARSING /* * set the dbglog parser type */int @@ -166,6 +167,64 @@ dbglog_parse_debug_logs(ol_scn_t scn, u_int8_t *datap, /** Register the cnss_diag activate with the wlan driver */ int cnss_diag_activate_service(void); +#else +static inline int +dbglog_parser_type_init(wmi_unified_t wmi_handle, int type) +{ + return A_OK; +} + +static inline int +dbglog_init(wmi_unified_t wmi_handle) +{ + return A_OK; +} + +static inline int +dbglog_deinit(wmi_unified_t wmi_handle) +{ + return A_OK; +} + +static inline int +dbglog_report_enable(wmi_unified_t wmi_handle, A_BOOL isenable) +{ + return A_OK; +} + +#ifdef CONFIG_MCL +static inline int +dbglog_set_log_lvl(wmi_unified_t wmi_handle, DBGLOG_LOG_LVL log_lvl) +{ + return A_OK; +} +#endif + +static inline int cnss_diag_activate_service(void) +{ + return A_OK; +} + +static inline int +dbglog_module_log_enable(wmi_unified_t wmi_handle, uint32_t mod_id, + A_BOOL isenable) +{ + return A_OK; +} + +static inline int +dbglog_vap_log_enable(wmi_unified_t wmi_handle, uint16_t vap_id, + A_BOOL isenable) +{ + return A_OK; +} + +static inline int +dbglog_set_mod_log_lvl(wmi_unified_t wmi_handle, uint32_t mod_id_lvl) +{ + return A_OK; +} +#endif /* FEATURE_FW_LOG_PARSING */ #ifdef __cplusplus } diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index d8784e011b..38683acd17 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -535,8 +535,17 @@ QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, struct pdev_utf_params *param, uint8_t mac_id); +#ifdef FEATURE_FW_LOG_PARSING QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl, - struct dbglog_params *param); + struct dbglog_params *param); +#else +static inline QDF_STATUS +wmi_unified_dbglog_cmd_send(void *wmi_hdl, + struct dbglog_params *param) +{ + return QDF_STATUS_SUCCESS; +} +#endif QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, struct wmi_mgmt_params *param); diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 8f9df7f683..e2f09a13bc 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -634,6 +634,7 @@ QDF_STATUS wmi_crash_inject(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } +#ifdef FEATURE_FW_LOG_PARSING /** * wmi_unified_dbglog_cmd_send() - set debug log level * @param wmi_handle : handle to WMI. @@ -654,6 +655,7 @@ wmi_unified_dbglog_cmd_send(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } qdf_export_symbol(wmi_unified_dbglog_cmd_send); +#endif /** * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 6972d090f6..2211dd6667 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1574,6 +1574,7 @@ static QDF_STATUS send_crash_inject_cmd_tlv(wmi_unified_t wmi_handle, return ret; } +#ifdef FEATURE_FW_LOG_PARSING /** * send_dbglog_cmd_tlv() - set debug log level * @param wmi_handle : handle to WMI. @@ -1635,6 +1636,7 @@ send_dbglog_cmd_tlv(wmi_unified_t wmi_handle, return status; } +#endif #ifdef CONFIG_MCL static inline uint32_t convert_host_vdev_param_tlv(wmi_unified_t wmi_handle, @@ -22598,7 +22600,9 @@ struct wmi_ops tlv_ops = { .send_set_ap_ps_param_cmd = send_set_ap_ps_param_cmd_tlv, .send_set_sta_ps_param_cmd = send_set_sta_ps_param_cmd_tlv, .send_crash_inject_cmd = send_crash_inject_cmd_tlv, +#ifdef FEATURE_FW_LOG_PARSING .send_dbglog_cmd = send_dbglog_cmd_tlv, +#endif .send_vdev_set_param_cmd = send_vdev_set_param_cmd_tlv, .send_stats_request_cmd = send_stats_request_cmd_tlv, .send_packet_log_enable_cmd = send_packet_log_enable_cmd_tlv,