qcacmn: Add flag CONNECTIVITY_PKTLOG

Add new flag CONNECTIVITY_PKTLOG to make independent of
FEATURE_PKTLOG and REMOVE_PKT_LOG for packet logging.

This is because 32 tx/rx pkt logging is connection related
and this feature is independent of pkt log feature. Here
driver will send first 32 tx/rx pkts consisting of mgmt
and data pkts to userspace which can be used for debugging

Change-Id: I006a040546c9709f46e76dcd8630da8569c691c6
CRs-Fixed: 3222971
This commit is contained in:
Vinod Kumar Myadam
2022-06-16 13:26:14 +05:30
committed by Madan Koyyalamudi
parent 9f75a857b7
commit b721690039
4 changed files with 14 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -102,7 +103,7 @@ static inline void wlan_set_console_log_levels(uint32_t console_log_levels) {}
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
#if defined(WLAN_LOGGING_SOCK_SVC_ENABLE) && \
defined(FEATURE_PKTLOG) && !defined(REMOVE_PKT_LOG)
defined(CONNECTIVITY_PKTLOG)
/**
* wlan_deregister_txrx_packetdump() - tx/rx packet dump
* deregistration
@@ -150,7 +151,7 @@ static inline void wlan_report_log_completion(uint32_t is_fatal,
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
#if defined(WLAN_LOGGING_SOCK_SVC_ENABLE) && \
defined(FEATURE_PKTLOG) && !defined(REMOVE_PKT_LOG)
defined(CONNECTIVITY_PKTLOG)
void wlan_pkt_stats_to_logger_thread(void *pl_hdr, void *pkt_dump, void *data);
#else
static inline

View File

@@ -53,18 +53,16 @@
#endif
#if defined(FEATURE_FW_LOG_PARSING) || defined(FEATURE_WLAN_DIAG_SUPPORT) || \
defined(FEATURE_PKTLOG)
defined(CONNECTIVITY_PKTLOG)
#include <cds_api.h>
#include "ani_global.h"
#endif
#ifdef FEATURE_PKTLOG
#ifndef REMOVE_PKT_LOG
#ifdef CONNECTIVITY_PKTLOG
#include "wma.h"
#include "pktlog_ac.h"
#include <cdp_txrx_misc.h>
#endif
#endif
#define MAX_NUM_PKT_LOG 32
@@ -82,7 +80,7 @@
#define MAX_SKBMSG_LENGTH 4096
#define WLAN_LOG_BUFFER_SIZE 2048
#if defined(FEATURE_PKTLOG) && !defined(REMOVE_PKT_LOG)
#ifdef CONNECTIVITY_PKTLOG
/**
* Buffer to accommodate -
* pktlog buffer (2048 bytes)
@@ -103,7 +101,7 @@
(PKT_DUMP_HDR_SIZE) + (EXTRA_PADDING))
#else
#define MAX_PKTSTATS_LENGTH WLAN_LOG_BUFFER_SIZE
#endif /* FEATURE_PKTLOG */
#endif /* CONNECTIVITY_PKTLOG */
#define MAX_PKTSTATS_BUFF 16
#define HOST_LOG_DRIVER_MSG 0x001
@@ -483,7 +481,7 @@ static int nl_srv_bcast_host_logs(struct sk_buff *skb)
}
#endif
#ifndef REMOVE_PKT_LOG
#ifdef CONNECTIVITY_PKTLOG
/**
* pkt_stats_fill_headers() - This function adds headers to skb
* @skb: skb to which headers need to be added
@@ -1352,8 +1350,7 @@ void wlan_flush_host_logs_for_fatal(void)
wake_up_interruptible(&gwlan_logging.wait_queue);
}
#ifdef FEATURE_PKTLOG
#ifndef REMOVE_PKT_LOG
#ifdef CONNECTIVITY_PKTLOG
static uint8_t gtx_count;
static uint8_t grx_count;
@@ -1588,9 +1585,7 @@ static void send_packetdump(ol_txrx_soc_handle soc,
if (wlan_op_mode_sta != cdp_get_opmode(soc, vdev_id))
return;
#if defined(HELIUMPLUS)
pktlog_hdr.flags |= PKTLOG_HDR_SIZE_16;
#endif
pktlog_hdr.log_type = PKTLOG_TYPE_PKT_DUMP;
pktlog_hdr.size = sizeof(pd_hdr) + netbuf->len;
@@ -1623,9 +1618,7 @@ static void send_packetdump_monitor(uint8_t type)
struct ath_pktlog_hdr pktlog_hdr = {0};
struct packet_dump pd_hdr = {0};
#if defined(HELIUMPLUS)
pktlog_hdr.flags |= PKTLOG_HDR_SIZE_16;
#endif
pktlog_hdr.log_type = PKTLOG_TYPE_PKT_DUMP;
pktlog_hdr.size = sizeof(pd_hdr);
@@ -1772,6 +1765,5 @@ void wlan_register_txrx_packetdump(uint8_t pdev_id)
csr_packetdump_timer_start();
}
#endif /* REMOVE_PKT_LOG */
#endif /* FEATURE_PKTLOG */
#endif /* CONNECTIVITY_PKTLOG */
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */