diff options
| author | Chandrasekaran, Manishekar <cmshekar@qti.qualcomm.com> | 2015-04-29 16:40:12 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-04-30 19:08:22 +0530 |
| commit | 9b2ed36047c36de13ec95bcdf9d22f03ba7709cc (patch) | |
| tree | e9d36656c4b9295a63954445733b5f2f1803886a | |
| parent | b47b5353f7aec472857752e7755d770781e6ef42 (diff) | |
qcacld: Avoid packet stats related processing when packet log tool is run
Ensure that packet stats related processing is not run when packet log
tool is getting executed. Invoke the packet stats related processing only
when start logging is initiated and verbose level is active.
Change-Id: I7a507b6c91aa6a9bea3be88d86a402a99bab5d4e
CRs-Fixed: 830252
| -rw-r--r-- | CORE/UTILS/PKTLOG/linux_ac.c | 13 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/pktlog_internal.c | 10 |
2 files changed, 22 insertions, 1 deletions
diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c index 91b1b9e383f9..4db49fb2de0d 100644 --- a/CORE/UTILS/PKTLOG/linux_ac.c +++ b/CORE/UTILS/PKTLOG/linux_ac.c @@ -45,6 +45,7 @@ #include <pktlog_ac.h> #include "i_vos_diag_core_log.h" #include "vos_diag_core_log.h" +#include "aniGlobal.h" #define PKTLOG_TAG "ATH_PKTLOG" #define PKTLOG_DEVNAME_SIZE 32 @@ -589,6 +590,18 @@ int pktlog_send_per_pkt_stats_to_user(void) struct ath_pktlog_info *pl_info; bool read_complete; + /* + * We do not want to do this packet stats related processing when + * packet log tool is run. i.e., we want this processing to be + * done only when start logging command of packet stats is initiated. + */ + if ((vos_get_ring_log_level(RING_ID_PER_PACKET_STATS) < + WLAN_LOG_LEVEL_ACTIVE)) { + printk(PKTLOG_TAG " %s: Shouldnt happen. Logging not started\n", + __func__); + return -EINVAL; + } + if (!txrx_pdev) { printk(PKTLOG_TAG " %s: Invalid TxRx handle\n", __func__); return -EINVAL; diff --git a/CORE/UTILS/PKTLOG/pktlog_internal.c b/CORE/UTILS/PKTLOG/pktlog_internal.c index 7560da0a7609..47b100f2f121 100644 --- a/CORE/UTILS/PKTLOG/pktlog_internal.c +++ b/CORE/UTILS/PKTLOG/pktlog_internal.c @@ -172,7 +172,15 @@ pktlog_getbuf(struct ol_pktlog_dev_t *pl_dev, PKTLOG_UNLOCK(pl_info); } - pktlog_check_threshold(pl_info, log_size); + /* + * We do not want to do this packet stats related processing when + * packet log tool is run. i.e., we want this processing to be + * done only when start logging command of packet stats is initiated. + */ + if (vos_get_ring_log_level(RING_ID_PER_PACKET_STATS) == + WLAN_LOG_LEVEL_ACTIVE) + pktlog_check_threshold(pl_info, log_size); + return plarg.buf; } |
