diff options
| author | Gupta, Kapil <kapgupta@qti.qualcomm.com> | 2016-03-03 12:25:11 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-03-22 18:03:00 +0530 |
| commit | 40a4fd1a716fb2abc9b31355688a02a1df9d7df4 (patch) | |
| tree | 25445e476471dd48218b65390dbce576020b5f0f /CORE/SVC/src | |
| parent | d3726e8408412f67d955987f8bea3624ceb294cc (diff) | |
qcacld-2.0: Add scenario based BUG report
prima to qcacld-2.0 propagation
Change to initiate BUG report in case of fatal event
Add INI support to Enable/Disable it.
The fatal event handled are as below:
- Roaming failed after successfull preauth.
- MC thread is Stucked for 15 sec.
- Sme command timeout.
- PE defer queue is full.
- VOS run out of message wrapper.
- Management tx timeout.
- HDD level wait for event timeout.
CRs-Fixed: 912560
Change-Id: I64dff8b7d0836340ce3bec5f5985d1919b600c23
Diffstat (limited to 'CORE/SVC/src')
| -rw-r--r-- | CORE/SVC/src/logging/wlan_logging_sock_svc.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c index 4d89f9c12fe8..4123d6fcce3b 100644 --- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c +++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c @@ -703,15 +703,18 @@ void wlan_report_log_completion(uint32_t is_fatal, */ void send_flush_completion_to_user(void) { - uint32_t is_fatal, indicator, reason_code; + uint32_t is_fatal, indicator, reason_code, is_ssr_needed; - vos_get_log_completion(&is_fatal, &indicator, &reason_code); + vos_get_log_and_reset_completion(&is_fatal, &indicator, &reason_code, + &is_ssr_needed); /* Error on purpose, so that it will get logged in the kmsg */ LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR, "%s: Sending flush done to userspace", __func__); wlan_report_log_completion(is_fatal, indicator, reason_code); + if (is_ssr_needed) + vos_wlanRestart(); } /** @@ -724,6 +727,7 @@ static int wlan_logging_thread(void *Arg) { int ret_wait_status = 0; int ret = 0; + unsigned long flags; set_user_nice(current, -2); @@ -759,6 +763,10 @@ static int wlan_logging_thread(void *Arg) if (-ENOMEM == ret) { msleep(200); } + if (WLAN_LOG_INDICATOR_HOST_ONLY == + vos_get_log_indicator()) { + send_flush_completion_to_user(); + } } if (test_and_clear_bit(HOST_LOG_PER_PKT_STATS, @@ -781,6 +789,12 @@ static int wlan_logging_thread(void *Arg) send_flush_completion_to_user(); } else { gwlan_logging.is_flush_complete = true; + /* Flush all current host logs*/ + spin_lock_irqsave(&gwlan_logging.spin_lock, + flags); + wlan_queue_logmsg_for_app(); + spin_unlock_irqrestore(&gwlan_logging.spin_lock, + flags); set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); set_bit(HOST_LOG_PER_PKT_STATS, @@ -1073,7 +1087,8 @@ void wlan_logging_set_log_level(void) */ void wlan_logging_set_fw_flush_complete(void) { - if (gwlan_logging.is_active == false) + if (gwlan_logging.is_active == false || + !vos_is_fatal_event_enabled()) return; set_bit(HOST_LOG_FW_FLUSH_COMPLETE, &gwlan_logging.eventFlag); @@ -1440,4 +1455,28 @@ void wlan_register_txrx_packetdump(void) gtx_count = 0; grx_count = 0; } + +/** + * wlan_flush_host_logs_for_fatal() - Flush host logs + * + * This function is used to send signal to the logger thread to + * Flush the host logs + * + * Return: None + */ +void wlan_flush_host_logs_for_fatal(void) +{ + unsigned long flags; + + if (vos_is_log_report_in_progress()) { + pr_info("%s:flush all host logs Setting HOST_LOG_POST_MASK\n", + __func__); + spin_lock_irqsave(&gwlan_logging.spin_lock, flags); + wlan_queue_logmsg_for_app(); + spin_unlock_irqrestore(&gwlan_logging.spin_lock, flags); + set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); + wake_up_interruptible(&gwlan_logging.wait_queue); + } +} + #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ |
