diff options
| -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; } |
