qcacmn: Add support to send connectivity logs from logging thread
Add support to send connectivity logs from g_wlan_logging thread. Add new HOST_LOG_DRIVER_CONNECTIVITY_MSG event flag which wakes up the gwlan_logging thread when set. Also register connection manager callbacks to send the logging event. Check if logging queue is empty whenever the gwlan_logging thread is woken up and send the logs to userspace if the count doesn't exceed the allowed threshold. Change-Id: I3fdb8358f9048a277e2f03894c0e6a17376b0da0 CRs-Fixed: 3029279
This commit is contained in:

کامیت شده توسط
Madan Koyyalamudi

والد
114c654e69
کامیت
b001e0e130
@@ -77,6 +77,14 @@ int wlan_logging_notifier_deinit(bool dump_at_kernel_enable);
|
||||
QDF_STATUS wlan_logging_wait_for_flush_log_completion(void);
|
||||
|
||||
void wlan_logging_set_per_pkt_stats(void);
|
||||
|
||||
/**
|
||||
* wlan_logging_set_connectivity_log() - INterrupt the gwlan_logging thread
|
||||
* to send the connectivity logs
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_logging_set_connectivity_log(void);
|
||||
void wlan_logging_set_fw_flush_complete(void);
|
||||
void wlan_flush_host_logs_for_fatal(void);
|
||||
void wlan_logging_set_active(bool active);
|
||||
|
@@ -36,6 +36,9 @@
|
||||
#include <qdf_event.h>
|
||||
#include <qdf_module.h>
|
||||
#include <qdf_str.h>
|
||||
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
|
||||
#include <wlan_connectivity_logging.h>
|
||||
#endif
|
||||
|
||||
#ifdef CNSS_GENL
|
||||
#ifdef CONFIG_CNSS_OUT_OF_TREE
|
||||
@@ -99,9 +102,11 @@
|
||||
#endif /* FEATURE_PKTLOG */
|
||||
|
||||
#define MAX_PKTSTATS_BUFF 16
|
||||
#define HOST_LOG_DRIVER_MSG 0x001
|
||||
#define HOST_LOG_PER_PKT_STATS 0x002
|
||||
#define HOST_LOG_FW_FLUSH_COMPLETE 0x003
|
||||
#define HOST_LOG_DRIVER_MSG 0x001
|
||||
#define HOST_LOG_PER_PKT_STATS 0x002
|
||||
#define HOST_LOG_FW_FLUSH_COMPLETE 0x003
|
||||
#define HOST_LOG_DRIVER_CONNECTIVITY_MSG 0x004
|
||||
|
||||
#define DIAG_TYPE_LOGS 1
|
||||
#define PTT_MSG_DIAG_CMDS_TYPE 0x5050
|
||||
#define MAX_LOG_LINE 500
|
||||
@@ -801,6 +806,20 @@ static void setup_flush_timer(void)
|
||||
qdf_spin_unlock(&gwlan_logging.flush_timer_lock);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
|
||||
static QDF_STATUS
|
||||
wlan_logging_send_connectivity_event(void)
|
||||
{
|
||||
return wlan_connectivity_log_dequeue();
|
||||
}
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_logging_send_connectivity_event(void)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_logging_thread() - The WLAN Logger thread
|
||||
* @Arg - pointer to the HDD context
|
||||
@@ -828,6 +847,9 @@ static int wlan_logging_thread(void *Arg)
|
||||
|| test_bit(
|
||||
HOST_LOG_FW_FLUSH_COMPLETE,
|
||||
&gwlan_logging.eventFlag)
|
||||
|| test_bit(
|
||||
HOST_LOG_DRIVER_CONNECTIVITY_MSG,
|
||||
&gwlan_logging.eventFlag)
|
||||
|| gwlan_logging.exit));
|
||||
|
||||
if (ret_wait_status == -ERESTARTSYS) {
|
||||
@@ -892,6 +914,11 @@ static int wlan_logging_thread(void *Arg)
|
||||
&gwlan_logging.wait_queue);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dequeue the connectivity_log */
|
||||
wlan_logging_send_connectivity_event();
|
||||
clear_bit(HOST_LOG_DRIVER_CONNECTIVITY_MSG,
|
||||
&gwlan_logging.eventFlag);
|
||||
}
|
||||
|
||||
complete_and_exit(&gwlan_logging.shutdown_comp, 0);
|
||||
@@ -1166,6 +1193,7 @@ int wlan_logging_sock_init_svc(void)
|
||||
clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_FW_FLUSH_COMPLETE, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_DRIVER_CONNECTIVITY_MSG, &gwlan_logging.eventFlag);
|
||||
init_completion(&gwlan_logging.shutdown_comp);
|
||||
gwlan_logging.thread = kthread_create(wlan_logging_thread, NULL,
|
||||
"wlan_logging_thread");
|
||||
@@ -1226,6 +1254,7 @@ int wlan_logging_sock_deinit_svc(void)
|
||||
clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_FW_FLUSH_COMPLETE, &gwlan_logging.eventFlag);
|
||||
clear_bit(HOST_LOG_DRIVER_CONNECTIVITY_MSG, &gwlan_logging.eventFlag);
|
||||
wake_up_interruptible(&gwlan_logging.wait_queue);
|
||||
wait_for_completion(&gwlan_logging.shutdown_comp);
|
||||
|
||||
@@ -1271,6 +1300,15 @@ void wlan_logging_set_per_pkt_stats(void)
|
||||
wake_up_interruptible(&gwlan_logging.wait_queue);
|
||||
}
|
||||
|
||||
void wlan_logging_set_connectivity_log(void)
|
||||
{
|
||||
if (gwlan_logging.is_active == false)
|
||||
return;
|
||||
|
||||
set_bit(HOST_LOG_DRIVER_CONNECTIVITY_MSG, &gwlan_logging.eventFlag);
|
||||
wake_up_interruptible(&gwlan_logging.wait_queue);
|
||||
}
|
||||
|
||||
/*
|
||||
* wlan_logging_set_fw_flush_complete() - FW log flush completion
|
||||
*
|
||||
|
مرجع در شماره جدید
Block a user