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
orang tua 9f75a857b7
melakukan b721690039
4 mengubah file dengan 14 tambahan dan 19 penghapusan

Melihat File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * 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 */ #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
#if defined(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 * wlan_deregister_txrx_packetdump() - tx/rx packet dump
* deregistration * deregistration
@@ -150,7 +151,7 @@ static inline void wlan_report_log_completion(uint32_t is_fatal,
#endif /* FEATURE_WLAN_DIAG_SUPPORT */ #endif /* FEATURE_WLAN_DIAG_SUPPORT */
#if defined(WLAN_LOGGING_SOCK_SVC_ENABLE) && \ #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); void wlan_pkt_stats_to_logger_thread(void *pl_hdr, void *pkt_dump, void *data);
#else #else
static inline static inline

Melihat File

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

Melihat File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2020 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -20,7 +21,7 @@
#define _PKTLOG_AC_H_ #define _PKTLOG_AC_H_
#include "hif.h" #include "hif.h"
#ifndef REMOVE_PKT_LOG #if defined(CONNECTIVITY_PKTLOG) || !defined(REMOVE_PKT_LOG)
#include "ol_if_athvar.h" #include "ol_if_athvar.h"
#include "osdep.h" #include "osdep.h"
#include <wmi_unified.h> #include <wmi_unified.h>

Melihat File

@@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2012-2014, 2016-2018, 2020 The Linux Foundation. * Copyright (c) 2012-2014, 2016-2018, 2020 The Linux Foundation.
* All rights reserved. * All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -24,7 +25,7 @@
#ifndef _PKTLOG_AC_API_ #ifndef _PKTLOG_AC_API_
#define _PKTLOG_AC_API_ #define _PKTLOG_AC_API_
#ifndef REMOVE_PKT_LOG #if defined(CONNECTIVITY_PKTLOG) || !defined(REMOVE_PKT_LOG)
/** /**
* @typedef ol_pktlog_dev_handle * @typedef ol_pktlog_dev_handle