qcacmn: Add synchronization for flush log completion

Currently there is no synchronization for flush log completion
between fw and userspace. When host driver receives command to
flush logs, it sends the command to fw and releases the control
of the userspace thread, it does not wait for the flush log
completion event from the fw and because of which user space
does not know when the host and fw completes the log flush.

To address above issue add a logic to wait for fw event of
flush log completion before host returns control to userspace.

Change-Id: I04fa0aead146d2b7b8627e4101c6dcd99d3947e9
CRs-Fixed: 2983387
This commit is contained in:
Ashish Kumar Dhanotiya
2021-06-28 19:54:44 +05:30
committed by Madan Koyyalamudi
parent 6deea68417
commit fdac28ef95
2 changed files with 40 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2021 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
@@ -69,12 +69,23 @@ int wlan_logging_notifier_init(bool dump_at_kernel_enable);
int wlan_logging_notifier_deinit(bool dump_at_kernel_enable);
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
/**
* wlan_logging_wait_for_flush_log_completion() - Wait for flush log completion
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_logging_wait_for_flush_log_completion(void);
void wlan_logging_set_per_pkt_stats(void);
void wlan_logging_set_fw_flush_complete(void);
void wlan_flush_host_logs_for_fatal(void);
void wlan_logging_set_active(bool active);
void wlan_set_console_log_levels(uint32_t console_log_levels);
#else
static inline QDF_STATUS wlan_logging_wait_for_flush_log_completion(void)
{
return QDF_STATUS_SUCCESS;
}
static inline void wlan_flush_host_logs_for_fatal(void) {}
static inline void wlan_logging_set_per_pkt_stats(void) {}
static inline void wlan_logging_set_fw_flush_complete(void) {}