diff options
| author | Agrawal Ashish <ashishka@codeaurora.org> | 2017-04-03 17:33:06 +0530 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-04 15:27:08 -0700 |
| commit | 4d7466e7be2543fd35d9583cb8e2a05242fc43c8 (patch) | |
| tree | c2cadc5b6f0802fe1fec43e6084fb3f878324170 | |
| parent | 2b53b6e6cb3418e6040124a5ab693fecee5fb71e (diff) | |
qcacld-3.0: Trigger copy of pktlogs to SD Card on basis of ring ID
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.
Change-Id: I0776775ab81fd2920ea440b773b146b6af61e434
CRs-Fixed: 2028068
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 2 | ||||
| -rw-r--r-- | core/utils/logging/inc/wlan_logging_sock_svc.h | 8 | ||||
| -rw-r--r-- | core/utils/logging/src/wlan_logging_sock_svc.c | 17 |
3 files changed, 17 insertions, 10 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index feca78fd33cb..32d379ae49d5 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -4689,7 +4689,7 @@ static int __wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy, } else { wlan_report_log_completion(WLAN_LOG_TYPE_NON_FATAL, WLAN_LOG_INDICATOR_FRAMEWORK, - WLAN_LOG_REASON_CODE_UNUSED); + WLAN_LOG_REASON_CODE_UNUSED, ring_id); } return 0; } diff --git a/core/utils/logging/inc/wlan_logging_sock_svc.h b/core/utils/logging/inc/wlan_logging_sock_svc.h index af85ab694352..06d0b6fe0f0e 100644 --- a/core/utils/logging/inc/wlan_logging_sock_svc.h +++ b/core/utils/logging/inc/wlan_logging_sock_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -67,11 +67,13 @@ static inline void wlan_logging_set_fw_flush_complete(void) #ifdef FEATURE_WLAN_DIAG_SUPPORT void wlan_report_log_completion(uint32_t is_fatal, uint32_t indicator, - uint32_t reason_code); + uint32_t reason_code, + uint8_t ring_id); #else static inline void wlan_report_log_completion(uint32_t is_fatal, uint32_t indicator, - uint32_t reason_code) + uint32_t reason_code, + unit8_t ring_id) { return; } diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c index b8bf6fb7fc10..3671431ea2b5 100644 --- a/core/utils/logging/src/wlan_logging_sock_svc.c +++ b/core/utils/logging/src/wlan_logging_sock_svc.c @@ -705,6 +705,7 @@ static int send_filled_buffers_to_user(void) * @is_fatal: Type of event, fatal or not * @indicator: Source of bug report, framework/host/firmware * @reason_code: Reason for triggering bug report + * @ring_id: Ring id of logging entities * * This function is used to report the bug report completion to userspace * @@ -712,7 +713,8 @@ static int send_filled_buffers_to_user(void) */ void wlan_report_log_completion(uint32_t is_fatal, uint32_t indicator, - uint32_t reason_code) + uint32_t reason_code, + uint8_t ring_id) { WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, struct host_event_wlan_log_complete); @@ -720,7 +722,7 @@ void wlan_report_log_completion(uint32_t is_fatal, wlan_diag_event.is_fatal = is_fatal; wlan_diag_event.indicator = indicator; wlan_diag_event.reason_code = reason_code; - wlan_diag_event.reserved = 0; + wlan_diag_event.reserved = ring_id; WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_LOG_COMPLETE); } @@ -728,12 +730,13 @@ void wlan_report_log_completion(uint32_t is_fatal, /** * send_flush_completion_to_user() - Indicate flush completion to the user + * @ring_id: Ring id of logging entities * * This function is used to send the flush completion message to user space * * Return: None */ -static void send_flush_completion_to_user(void) +static void send_flush_completion_to_user(uint8_t ring_id) { uint32_t is_fatal, indicator, reason_code; bool recovery_needed = false; @@ -746,7 +749,7 @@ static void send_flush_completion_to_user(void) "%s: Sending flush done to userspace, recovery: %d", __func__, recovery_needed); - wlan_report_log_completion(is_fatal, indicator, reason_code); + wlan_report_log_completion(is_fatal, indicator, reason_code, ring_id); if (!recovery_needed) return; @@ -805,7 +808,8 @@ static int wlan_logging_thread(void *Arg) msleep(200); if (WLAN_LOG_INDICATOR_HOST_ONLY == cds_get_log_indicator()) { - send_flush_completion_to_user(); + send_flush_completion_to_user( + RING_ID_DRIVER_DEBUG); } } @@ -825,7 +829,8 @@ static int wlan_logging_thread(void *Arg) */ if (gwlan_logging.is_flush_complete == true) { gwlan_logging.is_flush_complete = false; - send_flush_completion_to_user(); + send_flush_completion_to_user( + RING_ID_DRIVER_DEBUG); } else { gwlan_logging.is_flush_complete = true; /* Flush all current host logs*/ |
