diff options
| author | Chandrasekaran, Manishekar <cmshekar@qti.qualcomm.com> | 2015-04-24 00:47:17 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2015-04-27 09:38:25 -0700 |
| commit | 40f21e30c27ffb7635c3a0662c6ae3a29a3cd5c4 (patch) | |
| tree | 3791f9140461b1b072289320eda726b43de8c2fe | |
| parent | 6613130ae58bdce5206ee6daf7ffd699f3a53f0a (diff) | |
qcacld: Support logging of per packet statistics from the driver
Add change to log the per packet statistics from the driver. Add
new event flag to indicate which module triggered the logging
activity so that the logger thread can check the event flag and
call the corresponding functionality.
Change-Id: I30995ca5a4056b36aef4e724ff4eca025f907c36
CRs-Fixed: 811637
| -rw-r--r-- | CORE/SERVICES/COMMON/pktlog_ac_fmt.h | 12 | ||||
| -rw-r--r-- | CORE/SVC/inc/wlan_logging_sock_svc.h | 3 | ||||
| -rw-r--r-- | CORE/SVC/src/logging/wlan_logging_sock_svc.c | 59 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/include/pktlog_ac.h | 13 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/linux_ac.c | 249 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/pktlog_ac.c | 4 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/pktlog_internal.c | 31 | ||||
| -rw-r--r-- | CORE/VOSS/inc/log_codes.h | 6 | ||||
| -rw-r--r-- | CORE/VOSS/inc/vos_diag_core_log.h | 19 |
9 files changed, 382 insertions, 14 deletions
diff --git a/CORE/SERVICES/COMMON/pktlog_ac_fmt.h b/CORE/SERVICES/COMMON/pktlog_ac_fmt.h index 9f7551c1cb1a..622ce4175120 100644 --- a/CORE/SERVICES/COMMON/pktlog_ac_fmt.h +++ b/CORE/SERVICES/COMMON/pktlog_ac_fmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -333,7 +333,15 @@ struct ath_pktlog_bufhdr { struct ath_pktlog_buf { struct ath_pktlog_bufhdr bufhdr; int32_t rd_offset; - int32_t wr_offset; + volatile int32_t wr_offset; + /* Whenever this bytes written value croses 4K bytes, + * logging will be triggered + */ + int32_t bytes_written; + /* Index of the messages sent to userspace */ + uint32_t msg_index; + /* Offset for read */ + loff_t offset; char log_data[0]; }; diff --git a/CORE/SVC/inc/wlan_logging_sock_svc.h b/CORE/SVC/inc/wlan_logging_sock_svc.h index 71b2386d3374..205d7ac0b2af 100644 --- a/CORE/SVC/inc/wlan_logging_sock_svc.h +++ b/CORE/SVC/inc/wlan_logging_sock_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -44,5 +44,6 @@ int wlan_logging_sock_deinit_svc(void); int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf); int wlan_logging_sock_deactivate_svc(void); int wlan_log_to_user(VOS_TRACE_LEVEL log_level, char *to_be_sent, int length); +void wlan_logging_set_per_pkt_stats(void); #endif /* WLAN_LOGGING_SOCK_SVC_H */ diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c index 323f70e8eff7..45a9ef7bf745 100644 --- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c +++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -41,6 +41,7 @@ #include <vos_trace.h> #include <kthread.h> #include <adf_os_time.h> +#include "pktlog_ac.h" #define LOGGING_TRACE(level, args...) \ VOS_TRACE(VOS_MODULE_ID_HDD, level, ## args) @@ -51,6 +52,9 @@ #define ANI_NL_MSG_READY_IND_TYPE 90 #define MAX_LOGMSG_LENGTH 4096 +#define HOST_LOG_DRIVER_MSG 0x001 +#define HOST_LOG_PER_PKT_STATS 0x002 + struct log_msg { struct list_head node; unsigned int radio; @@ -88,6 +92,10 @@ struct wlan_logging { /* current logbuf to which the log will be filled to */ struct log_msg *pcur_node; bool is_buffer_free; + /* Event flag used for wakeup and post indication*/ + unsigned long eventFlag; + /* Indicates logger thread is activated */ + bool is_active; }; static struct wlan_logging gwlan_logging; @@ -308,8 +316,10 @@ int wlan_log_to_user(VOS_TRACE_LEVEL log_level, char *to_be_sent, int length) /* If there is logger app registered wakeup the logging * thread */ - if (gapp_pid != INVALID_PID) + if (gapp_pid != INVALID_PID) { + set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); wake_up_interruptible(&gwlan_logging.wait_queue); + } } if ((gapp_pid != INVALID_PID) @@ -429,6 +439,9 @@ static int wlan_logging_thread(void *Arg) ret_wait_status = wait_event_interruptible( gwlan_logging.wait_queue, (!list_empty(&gwlan_logging.filled_list) + || test_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag) + || test_bit(HOST_LOG_PER_PKT_STATS, + &gwlan_logging.eventFlag) || gwlan_logging.exit)); if (ret_wait_status == -ERESTARTSYS) { @@ -442,9 +455,20 @@ static int wlan_logging_thread(void *Arg) break; } - ret = send_filled_buffers_to_user(); - if (-ENOMEM == ret) { - msleep(200); + if (test_and_clear_bit(HOST_LOG_DRIVER_MSG, + &gwlan_logging.eventFlag)) { + ret = send_filled_buffers_to_user(); + if (-ENOMEM == ret) { + msleep(200); + } + } + + if (test_and_clear_bit(HOST_LOG_PER_PKT_STATS, + &gwlan_logging.eventFlag)) { + ret = pktlog_send_per_pkt_stats_to_user(); + if (-ENOMEM == ret) { + msleep(200); + } } } @@ -486,6 +510,7 @@ static int wlan_logging_proc_sock_rx_msg(struct sk_buff *skb) wlan_queue_logmsg_for_app(); } spin_unlock_bh(&gwlan_logging.spin_lock); + set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); wake_up_interruptible(&gwlan_logging.wait_queue); } else { /* This is to set the default levels (WLAN logging @@ -543,6 +568,8 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf) init_waitqueue_head(&gwlan_logging.wait_queue); gwlan_logging.exit = false; + clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); + clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag); init_completion(&gwlan_logging.shutdown_comp); gwlan_logging.thread = kthread_create(wlan_logging_thread, NULL, "wlan_logging_thread"); @@ -557,6 +584,7 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf) return -ENOMEM; } wake_up_process(gwlan_logging.thread); + gwlan_logging.is_active = true; nl_srv_register(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg); @@ -577,6 +605,9 @@ int wlan_logging_sock_deactivate_svc(void) INIT_COMPLETION(gwlan_logging.shutdown_comp); gwlan_logging.exit = true; + gwlan_logging.is_active = false; + clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag); + clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag); wake_up_interruptible(&gwlan_logging.wait_queue); wait_for_completion(&gwlan_logging.shutdown_comp); @@ -606,4 +637,22 @@ int wlan_logging_sock_deinit_svc(void) return 0; } + +/** + * wlan_logging_set_per_pkt_stats() - This function triggers per packet logging + * + * This function is used to send signal to the logger thread for logging per + * packet stats + * + * Return: None + * + */ +void wlan_logging_set_per_pkt_stats(void) +{ + if (gwlan_logging.is_active == false) + return; + + set_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag); + wake_up_interruptible(&gwlan_logging.wait_queue); +} #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ diff --git a/CORE/UTILS/PKTLOG/include/pktlog_ac.h b/CORE/UTILS/PKTLOG/include/pktlog_ac.h index ce34f517bf7e..dc7f3f6f575b 100644 --- a/CORE/UTILS/PKTLOG/include/pktlog_ac.h +++ b/CORE/UTILS/PKTLOG/include/pktlog_ac.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -48,6 +48,13 @@ #define PKTLOG_MODE_SYSTEM 1 #define PKTLOG_MODE_ADAPTER 2 +/* + * The proc entry starts with magic number and version field which will be + * used by post processing scripts. These fields are not needed by applications + * that do not use these scripts. This is skipped using the offset value. + */ +#define PKTLOG_READ_OFFSET 8 + /* Opaque softc */ struct ol_ath_generic_softc_t; typedef struct ol_ath_generic_softc_t* ol_ath_generic_softc_handle; @@ -55,6 +62,10 @@ extern void pktlog_disable_adapter_logging(struct ol_softc *scn); extern int pktlog_alloc_buf(struct ol_softc *scn); extern void pktlog_release_buf(struct ol_softc *scn); +ssize_t pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, + struct ath_pktlog_info *pl_info); +int pktlog_send_per_pkt_stats_to_user(void); + struct ol_pl_arch_dep_funcs { void (*pktlog_init) (struct ol_softc *scn); int (*pktlog_enable) (struct ol_softc *scn, diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c index ae321a177c85..8e148f16aff5 100644 --- a/CORE/UTILS/PKTLOG/linux_ac.c +++ b/CORE/UTILS/PKTLOG/linux_ac.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -43,6 +43,8 @@ #include <pktlog_ac_i.h> #include <pktlog_ac_fmt.h> #include <pktlog_ac.h> +#include "i_vos_diag_core_log.h" +#include "vos_diag_core_log.h" #define PKTLOG_TAG "ATH_PKTLOG" #define PKTLOG_DEVNAME_SIZE 32 @@ -568,6 +570,251 @@ static int pktlog_release(struct inode *i, struct file *f) #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif +/** + * pktlog_send_per_pkt_stats_to_user() - This function is used to send the per + * packet statistics to the user + * + * This function is used to send the per packet statistics to the user + * + * Return: Success if the message is posted to user + * + */ +int pktlog_send_per_pkt_stats_to_user(void) +{ + ssize_t ret_val; + struct vos_log_pktlog_info *pktlog = NULL; + void *vos = vos_get_global_context(VOS_MODULE_ID_HIF, NULL); + ol_txrx_pdev_handle txrx_pdev = + vos_get_context(VOS_MODULE_ID_TXRX, vos); + struct ath_pktlog_info *pl_info; + + if (!txrx_pdev) { + printk(PKTLOG_TAG "%s: Invalid TxRx handle \n", __func__); + return -EINVAL; + } + + pl_info = txrx_pdev->pl_dev->pl_info; + + if (!pl_info || !pl_info->buf) { + printk(PKTLOG_TAG "%s: Shouldnt happen. pl_info is invalid \n", + __func__); + return -EINVAL; + } + + if (pl_info->buf->rd_offset == -1) { + return -EINVAL; + } + + do { + pktlog = (struct vos_log_pktlog_info *) + vos_mem_malloc(sizeof(struct vos_log_pktlog_info) + + VOS_LOG_PKT_LOG_SIZE); + if (!pktlog) { + printk(PKTLOG_TAG "%s: Memory allocation failed \n", __func__); + return -ENOMEM; + } + + vos_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE); + vos_log_set_code(pktlog, LOG_WLAN_PKT_LOG_INFO_C); + + pktlog->buf_len = 0; + + /* + * @ret_val: ret_val gives the actual data read from the buffer. + * When there is no more data to read, this value will be zero + * @offset: offset in the ring buffer. Initially it is zero and + * is incremented during every read based on number of bytes + * read + */ + ret_val = pktlog_read_proc_entry(pktlog->buf, + VOS_LOG_PKT_LOG_SIZE, + &pl_info->buf->offset, + pl_info); + if (ret_val) { + int index = 0; + struct ath_pktlog_hdr *temp; + while (1) { + if ((ret_val - index) < + sizeof(struct ath_pktlog_hdr)) { + /* Partial header */ + pl_info->buf->offset -= (ret_val - index); + ret_val = index; + break; + } + temp = (struct ath_pktlog_hdr *) + (pktlog->buf + index); + if ((ret_val - index) < (temp->size + + sizeof(struct ath_pktlog_hdr))) { + /* Partial record payload */ + pl_info->buf->offset -= (ret_val - index); + ret_val = index; + break; + } + index += temp->size + + sizeof(struct ath_pktlog_hdr); + } + } + + /* Data will include message index/seq number and buf length */ + pktlog->buf_len = ret_val; + if (ret_val) { + vos_log_set_length(pktlog, ret_val + + sizeof(struct vos_log_pktlog_info)); + pktlog->seq_no = pl_info->buf->msg_index++; + WLAN_VOS_DIAG_LOG_REPORT(pktlog); + } else { + vos_mem_free(pktlog); + } + } while (ret_val); + + return 0; +} + +/** + * pktlog_read_proc_entry() - This function is used to read data from the + * proc entry into the readers buffer + * @buf: Readers buffer + * @nbytes: Number of bytes to read + * @ppos: Offset within the drivers buffer + * @pl_info: Packet log information pointer + * + * This function is used to read data from the proc entry into the readers + * buffer. Its functionality is similar to 'pktlog_read' which does + * copy to user to the user space buffer + * + * Return: Number of bytes read from the buffer + * + */ +ssize_t +pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, + struct ath_pktlog_info *pl_info) +{ + size_t bufhdr_size; + size_t count = 0, ret_val = 0; + int rem_len; + int start_offset, end_offset; + int fold_offset, ppos_data, cur_rd_offset, cur_wr_offset; + struct ath_pktlog_buf *log_buf = pl_info->buf; + + if (log_buf == NULL) + return 0; + + if (*ppos == 0 && pl_info->log_state) { + pl_info->saved_state = pl_info->log_state; + pl_info->log_state = 0; + } + + bufhdr_size = sizeof(log_buf->bufhdr); + + /* copy valid log entries from circular buffer into user space */ + rem_len = nbytes; + count = 0; + + if (*ppos < bufhdr_size) { + count = MIN((bufhdr_size - *ppos), rem_len); + vos_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos, + count); + rem_len -= count; + ret_val += count; + } + + start_offset = log_buf->rd_offset; + cur_wr_offset = log_buf->wr_offset; + + if ((rem_len == 0) || (start_offset < 0)) + goto rd_done; + + fold_offset = -1; + cur_rd_offset = start_offset; + + /* Find the last offset and fold-offset if the buffer is folded */ + do { + struct ath_pktlog_hdr *log_hdr; + int log_data_offset; + + log_hdr = (struct ath_pktlog_hdr *) (log_buf->log_data + + cur_rd_offset); + + log_data_offset = cur_rd_offset + sizeof(struct ath_pktlog_hdr); + + if ((fold_offset == -1) + && ((pl_info->buf_size - log_data_offset) + <= log_hdr->size)) + fold_offset = log_data_offset - 1; + + PKTLOG_MOV_RD_IDX(cur_rd_offset, log_buf, pl_info->buf_size); + + if ((fold_offset == -1) && (cur_rd_offset == 0) + && (cur_rd_offset != cur_wr_offset)) + fold_offset = log_data_offset + log_hdr->size - 1; + + end_offset = log_data_offset + log_hdr->size - 1; + } while (cur_rd_offset != cur_wr_offset); + + ppos_data = *ppos + ret_val - bufhdr_size + start_offset; + + if (fold_offset == -1) { + if (ppos_data > end_offset) + goto rd_done; + + count = MIN(rem_len, (end_offset - ppos_data + 1)); + vos_mem_copy(buf + ret_val, + log_buf->log_data + ppos_data, + count); + ret_val += count; + rem_len -= count; + } else { + if (ppos_data <= fold_offset) { + count = MIN(rem_len, (fold_offset - ppos_data + 1)); + vos_mem_copy(buf + ret_val, + log_buf->log_data + ppos_data, + count); + ret_val += count; + rem_len -= count; + } + + if (rem_len == 0) + goto rd_done; + + ppos_data = + *ppos + ret_val - (bufhdr_size + + (fold_offset - start_offset + 1)); + + if (ppos_data <= end_offset) { + count = MIN(rem_len, (end_offset - ppos_data + 1)); + vos_mem_copy(buf + ret_val, + log_buf->log_data + ppos_data, + count); + ret_val += count; + rem_len -= count; + } + } + +rd_done: + if ((ret_val < nbytes) && pl_info->saved_state) { + pl_info->log_state = pl_info->saved_state; + pl_info->saved_state = 0; + } + *ppos += ret_val; + + if (ret_val == 0) { + PKTLOG_LOCK(pl_info); + /* Write pointer might have been updated during the read. + * So, if some data is written into, lets not reset the pointers. + * We can continue to read from the offset position + */ + if (cur_wr_offset == log_buf->wr_offset) { + pl_info->buf->rd_offset = -1; + pl_info->buf->wr_offset = 0; + pl_info->buf->bytes_written = 0; + pl_info->buf->offset = PKTLOG_READ_OFFSET; + } + PKTLOG_UNLOCK(pl_info); + } + + return ret_val; +} + static ssize_t pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos) { diff --git a/CORE/UTILS/PKTLOG/pktlog_ac.c b/CORE/UTILS/PKTLOG/pktlog_ac.c index bad9c83e256e..3bc0ae1f4222 100644 --- a/CORE/UTILS/PKTLOG/pktlog_ac.c +++ b/CORE/UTILS/PKTLOG/pktlog_ac.c @@ -353,6 +353,10 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state) pl_info->buf->bufhdr.magic_num = PKTLOG_MAGIC_NUM; pl_info->buf->wr_offset = 0; pl_info->buf->rd_offset = -1; + /* These below variables are used by per packet stats*/ + pl_info->buf->bytes_written = 0; + pl_info->buf->msg_index = 1; + pl_info->buf->offset = PKTLOG_READ_OFFSET; pl_info->start_time_thruput = OS_GET_TIMESTAMP(); pl_info->start_time_per = pl_info->start_time_thruput; diff --git a/CORE/UTILS/PKTLOG/pktlog_internal.c b/CORE/UTILS/PKTLOG/pktlog_internal.c index bc6248de8aca..c22c7f474e7a 100644 --- a/CORE/UTILS/PKTLOG/pktlog_internal.c +++ b/CORE/UTILS/PKTLOG/pktlog_internal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -34,12 +34,15 @@ #include "htt_internal.h" #include "pktlog_ac_i.h" #include "wma_api.h" +#include "wlan_logging_sock_svc.h" #define TX_DESC_ID_LOW_MASK 0xffff #define TX_DESC_ID_LOW_SHIFT 0 #define TX_DESC_ID_HIGH_MASK 0xffff0000 #define TX_DESC_ID_HIGH_SHIFT 16 +#define PER_PACKET_STATS_THRESHOLD 4096 + void pktlog_getbuf_intsafe(struct ath_pktlog_arg *plarg) { @@ -115,6 +118,31 @@ pktlog_getbuf_intsafe(struct ath_pktlog_arg *plarg) plarg->buf = log_ptr; } +/** + * pktlog_check_threshold() - This function checks threshold for triggering + * packet stats + * @pl_info: Packet log information pointer + * @log_size: Size of current packet log information + * + * This function internally triggers logging of per packet stats when the + * incoming data crosses threshold limit + * + * Return: None + * + */ +void pktlog_check_threshold(struct ath_pktlog_info *pl_info, + size_t log_size) +{ + PKTLOG_LOCK(pl_info); + pl_info->buf->bytes_written += log_size + sizeof(struct ath_pktlog_hdr); + + if (pl_info->buf->bytes_written >= PER_PACKET_STATS_THRESHOLD) { + wlan_logging_set_per_pkt_stats(); + pl_info->buf->bytes_written = 0; + } + PKTLOG_UNLOCK(pl_info); +} + char * pktlog_getbuf(struct ol_pktlog_dev_t *pl_dev, struct ath_pktlog_info *pl_info, @@ -143,6 +171,7 @@ pktlog_getbuf(struct ol_pktlog_dev_t *pl_dev, PKTLOG_UNLOCK(pl_info); } + pktlog_check_threshold(pl_info, log_size); return plarg.buf; } diff --git a/CORE/VOSS/inc/log_codes.h b/CORE/VOSS/inc/log_codes.h index 8b351db03538..b10d779f0ec0 100644 --- a/CORE/VOSS/inc/log_codes.h +++ b/CORE/VOSS/inc/log_codes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2009,8 +2009,10 @@ when who what, where, why #define LOG_TRSP_DATA_STALL_C ((0x801) + LOG_1X_BASE_C) +#define LOG_WLAN_PKT_LOG_INFO_C ((0x8E0) + LOG_1X_BASE_C) + /* The last defined DMSS log code */ -#define LOG_1X_LAST_C ((0x801) + LOG_1X_BASE_C) +#define LOG_1X_LAST_C ((0x8E0) + LOG_1X_BASE_C) /* This is only here for old (pre equipment ID update) logging code */ diff --git a/CORE/VOSS/inc/vos_diag_core_log.h b/CORE/VOSS/inc/vos_diag_core_log.h index af887f34c92d..10ece90b4bc1 100644 --- a/CORE/VOSS/inc/vos_diag_core_log.h +++ b/CORE/VOSS/inc/vos_diag_core_log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -64,6 +64,7 @@ extern "C" { #define VOS_LOG_MAX_NUM_HO_CANDIDATE_APS 20 #define VOS_LOG_MAX_WOW_PTRN_SIZE 128 #define VOS_LOG_MAX_WOW_PTRN_MASK_SIZE 16 +#define VOS_LOG_PKT_LOG_SIZE 2048 /*--------------------------------------------------------------------------- This packet contains the scan results of the recent scan operation @@ -366,6 +367,22 @@ typedef struct v_S7_t rssi; } vos_log_rssi_pkt_type; +/** + * struct vos_log_pktlog_info - Packet log info + * @log_hdr: Log header + * @buf_len: Length of the buffer that follows + * @buf: Buffer containing the packet log info + * + * Structure containing the packet log information + * LOG_WLAN_PKT_LOG_INFO_C 0x18E0 + */ +struct vos_log_pktlog_info { + log_hdr_type log_hdr; + uint32_t seq_no; + uint32_t buf_len; + uint8_t buf[]; +}; + /*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ |
