diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c index 29e453181c..a26e413709 100644 --- a/hif/src/ce/ce_service.c +++ b/hif/src/ce/ce_service.c @@ -1960,5 +1960,7 @@ uint8_t *hif_log_dump_ce(struct hif_softc *scn, uint8_t *buf_cur, return buf_cur; } + +qdf_export_symbol(hif_log_dump_ce); #endif /* OL_ATH_SMART_LOGGING */ diff --git a/utils/fwlog/fw_dbglog_api.c b/utils/fwlog/fw_dbglog_api.c index 388f9b43cb..387ef13406 100644 --- a/utils/fwlog/fw_dbglog_api.c +++ b/utils/fwlog/fw_dbglog_api.c @@ -47,12 +47,13 @@ int fwdbg_fw_handler(struct common_dbglog_handle *dbg_handle, ol_scn_t soc, } int fwdbg_parse_debug_logs(struct common_dbglog_handle *dbg_handle, - const char *name, uint8_t *datap, uint16_t len, void *context) + ol_scn_t soc, uint8_t *datap, + uint16_t len, void *context) { struct dbglog_info *dbg_info = handle2info(dbg_handle); if (dbg_info->ops->dbglog_parse_debug_logs) - return dbg_info->ops->dbglog_parse_debug_logs(name, + return dbg_info->ops->dbglog_parse_debug_logs(soc, datap, len, context); return 0; @@ -139,3 +140,32 @@ void fwdbg_set_report_size(struct common_dbglog_handle *dbg_handle, } +int fwdbg_smartlog_init(struct common_dbglog_handle *dbg_handle, void *soc) +{ + struct dbglog_info *dbg_info = handle2info(dbg_handle); + + if (dbg_info->ops->smartlog_init) + return dbg_info->ops->smartlog_init(soc); + + return 0; +} + +void fwdbg_smartlog_deinit(struct common_dbglog_handle *dbg_handle, void *sc) +{ + struct dbglog_info *dbg_info = handle2info(dbg_handle); + + if (dbg_info->ops->smartlog_deinit) + dbg_info->ops->smartlog_deinit(sc); +} + +ssize_t fwdbg_smartlog_dump(struct common_dbglog_handle *dbg_handle, + struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct dbglog_info *dbg_info = handle2info(dbg_handle); + + if (dbg_info->ops->smartlog_dump) + return dbg_info->ops->smartlog_dump(dev, attr, buf); + + return 0; +} diff --git a/utils/fwlog/inc/fw_dbglog_api.h b/utils/fwlog/inc/fw_dbglog_api.h index b649efeb35..35f8e9531d 100644 --- a/utils/fwlog/inc/fw_dbglog_api.h +++ b/utils/fwlog/inc/fw_dbglog_api.h @@ -49,7 +49,7 @@ int fwdbg_fw_handler(struct common_dbglog_handle *dbg_handle, ol_scn_t sc, /** * fwdbg_parse_debug_logs() - API to parse firmware debug logs * @dbg_handle: Debug module handle - * @name: device name + * @soc: soc handle * @datap: Reference to log data * @len: length of data * @context: log context @@ -59,7 +59,7 @@ int fwdbg_fw_handler(struct common_dbglog_handle *dbg_handle, ol_scn_t sc, * Return: 0 success */ int fwdbg_parse_debug_logs(struct common_dbglog_handle *dbg_handle, - const char *name, uint8_t *datap, + ol_scn_t soc, uint8_t *datap, uint16_t len, void *context); /** @@ -169,4 +169,35 @@ void fwdbg_free(struct common_dbglog_handle *dbg_handle, void *soc); void fwdbg_set_report_size(struct common_dbglog_handle *dbg_handle, ol_scn_t scn, uint16_t size); +/** + * fwdbg_smartlog_init() - initialize smart logging feature + * @dbg_handle: Debug module handle + * @soc: soc handler + * + * Return: 0 Success + */ +int fwdbg_smartlog_init(struct common_dbglog_handle *dbg_handle, void *soc); + +/** + * fwdbg_smartlog_deinit() - uninitializes smart logging feature + * @dbg_handle: Debug module handle + * @sc: sc handler + * + * Return: None + */ +void fwdbg_smartlog_deinit(struct common_dbglog_handle *dbg_handle, void *sc); + +/** + * fwdbg_smartlog_dump() - dumps smart logs + * @dev: dev handler + * @dbg_handle: Debug module handle + * @attr: dev handler attributes + * @buf: destination buffer to dump smart logs + * + * Return: 0 success + */ +ssize_t fwdbg_smartlog_dump(struct common_dbglog_handle *dbg_handle, + struct device *dev, + struct device_attribute *attr, char *buf); + #endif /* _FW_DBGLOG_API_H_ */ diff --git a/utils/fwlog/inc/fw_dbglog_priv.h b/utils/fwlog/inc/fw_dbglog_priv.h index 3820432b80..e07b1d4608 100644 --- a/utils/fwlog/inc/fw_dbglog_priv.h +++ b/utils/fwlog/inc/fw_dbglog_priv.h @@ -29,8 +29,8 @@ struct dbglog_ops { void (*dbglog_set_log_lvl)(ol_scn_t scn, uint32_t log_lvl); int (*dbglog_fw_handler)(ol_scn_t soc, uint8_t *data, uint32_t datalen); -int (*dbglog_parse_debug_logs)(const char *name, - u_int8_t *datap, uint16_t len, void *context); +int (*dbglog_parse_debug_logs)(ol_scn_t scn, + u_int8_t *datap, uint16_t len, void *context); void (*dbglog_ratelimit_set)(uint32_t burst_limit); void (*dbglog_vap_log_enable)(ol_scn_t soc, uint16_t vap_id, bool isenable); @@ -41,6 +41,10 @@ void (*dbglog_module_log_enable)(ol_scn_t scn, void (*dbglog_init)(void *scn); void (*dbglog_set_report_size)(ol_scn_t scn, uint16_t size); void (*dbglog_free)(void *soc); +int (*smartlog_init)(void *sc); +void (*smartlog_deinit)(void *sc); +ssize_t (*smartlog_dump)(struct device *dev, + struct device_attribute *attr, char *buf); }; diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 69da2d8a29..77be87031f 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -4420,6 +4420,8 @@ QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } + +qdf_export_symbol(wmi_extract_smartlog_ev); #endif /* OL_ATH_SMART_LOGGING */ QDF_STATUS