diff options
| author | Kaushik, Sushant <skaushik@qti.qualcomm.com> | 2014-06-02 14:01:50 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-07-14 17:43:40 -0700 |
| commit | 3adb2e33e26ec7e28d3065d2e243387c47a1e175 (patch) | |
| tree | 3112a19d766f8b971d41708d91d3b5823f8febc0 | |
| parent | 0a0315c9d54c4200d582e312aa88e9e3a23f0680 (diff) | |
wlan: Watchdog bite due to excessive logging.
Sometime due to excessive logging watchdog is not reset
which cause system crash. As a part of fix, limited
excessive logging.
Change-Id: I720751d474ce4572f1a2b526cb4928bf44e1ff4d
CRs-Fixed: 677152
| -rw-r--r-- | CORE/SVC/src/logging/wlan_logging_sock_svc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c index a9927e6b3a18..73031c8192a9 100644 --- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c +++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c @@ -67,6 +67,7 @@ struct wlan_logging { unsigned int drop_count; /* current logbuf to which the log will be filled to */ struct log_msg *pcur_node; + bool is_buffer_free; }; static struct wlan_logging gwlan_logging; @@ -163,7 +164,6 @@ static int wlan_queue_logmsg_for_app(void) { char *ptr; int ret = 0; - ptr = &gwlan_logging.pcur_node->logbuf[sizeof(tAniHdr)]; ptr[gwlan_logging.pcur_node->filled_length] = '\0'; @@ -179,6 +179,8 @@ static int wlan_queue_logmsg_for_app(void) gwlan_logging.pcur_node = (struct log_msg *)(gwlan_logging.free_list.next); list_del_init(gwlan_logging.free_list.next); + /* reset when free list is available. */ + gwlan_logging.is_buffer_free = FALSE; } else if (!list_empty(&gwlan_logging.filled_list)) { /* Get buffer from filled list */ /* This condition will drop the packet from being @@ -186,11 +188,13 @@ static int wlan_queue_logmsg_for_app(void) */ gwlan_logging.pcur_node = (struct log_msg *)(gwlan_logging.filled_list.next); - if (gapp_pid != INVALID_PID) { + if (gapp_pid != INVALID_PID && !gwlan_logging.is_buffer_free) { pr_err("%s: drop_count = %u index = %d filled_length = %d\n", __func__, ++gwlan_logging.drop_count, gwlan_logging.pcur_node->index, gwlan_logging.pcur_node->filled_length); + /* print above logs only 1st time. */ + gwlan_logging.is_buffer_free = TRUE; } list_del_init(gwlan_logging.filled_list.next); ret = 1; |
