diff --git a/core/cds/inc/cds_utils.h b/core/cds/inc/cds_utils.h index eedcb4c4a306..4bc0ad6db363 100644 --- a/core/cds/inc/cds_utils.h +++ b/core/cds/inc/cds_utils.h @@ -160,7 +160,6 @@ bool cds_is_gmac_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t cds_get_gmac_mmie_size(void); #endif /* WLAN_FEATURE_11W */ -QDF_STATUS sme_send_flush_logs_cmd_to_fw(tpAniSirGlobal pMac); static inline void cds_host_diag_log_work(qdf_wake_lock_t *lock, uint32_t msec, uint32_t reason) { if (((cds_get_ring_log_level(RING_ID_WAKELOCK) >= WLAN_LOG_LEVEL_ACTIVE) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index ee8b2c824563..ed4ca88676d1 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -2343,7 +2343,6 @@ QDF_STATUS cds_flush_logs(uint32_t is_fatal, bool dump_mac_trace, bool recovery_needed) { - uint32_t ret; QDF_STATUS status; struct cds_context *p_cds_context; @@ -2387,8 +2386,8 @@ QDF_STATUS cds_flush_logs(uint32_t is_fatal, return QDF_STATUS_SUCCESS; } - ret = sme_send_flush_logs_cmd_to_fw(p_cds_context->mac_context); - if (0 != ret) { + status = sme_send_flush_logs_cmd_to_fw(); + if (QDF_IS_STATUS_ERROR(status)) { cds_err("Failed to send flush FW log"); cds_init_log_completion(); return QDF_STATUS_E_FAILURE; diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 9b95cca90bc0..a929323b3d48 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1368,16 +1368,28 @@ QDF_STATUS sme_wifi_start_logger(mac_handle_t mac_handle, bool sme_neighbor_middle_of_roaming(mac_handle_t mac_handle, uint8_t sessionId); -/* +/** * sme_is_any_session_in_middle_of_roaming() - check if roaming is in progress * @mac_handle: MAC Handle * * Checks if any SME session is in middle of roaming * - * Return : true if roaming is in progress else false + * Return: true if roaming is in progress else false */ bool sme_is_any_session_in_middle_of_roaming(mac_handle_t mac_handle); +/** + * sme_send_flush_logs_cmd_to_fw() - Initiate command to FW to flush logs + * + * This function will initiate a command to firmware to flush their logs. + * This should normally be done in response to an anomaly detected by the + * host. + * + * Return: QDF_STATUS_SUCCESS if the command was sent, otherwise an + * appropriate QDF_STATUS error + */ +QDF_STATUS sme_send_flush_logs_cmd_to_fw(void); + /** * sme_enable_uapsd_for_ac() - enable uapsd for access category request to WMA * @sta_id: station id diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 2e55c1d863ab..9df22c2a10fc 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -12759,14 +12759,13 @@ bool sme_is_any_session_in_middle_of_roaming(mac_handle_t mac_handle) /* * sme_send_flush_logs_cmd_to_fw() - Flush FW logs - * @mac: MAC handle * * This function is used to send the command that will * be used to flush the logs in the firmware * * Return: QDF_STATUS */ -QDF_STATUS sme_send_flush_logs_cmd_to_fw(tpAniSirGlobal mac) +QDF_STATUS sme_send_flush_logs_cmd_to_fw(void) { QDF_STATUS status; struct scheduler_msg message = {0};