diff --git a/Kbuild b/Kbuild index 7088d07d71ac..d57faa88bf0e 100755 --- a/Kbuild +++ b/Kbuild @@ -58,11 +58,9 @@ ifeq ($(KERNEL_BUILD), 0) # config. ifneq ($(TARGET_BUILD_VARIANT),user) ifeq ($(CONFIG_SLUB_DEBUG_ON),y) - CONFIG_PKT_PROTO_TRACE := y CONFIG_FEATURE_DP_TRACE := y else ifeq ($(findstring perf,$(KERNEL_DEFCONFIG)),) - CONFIG_PKT_PROTO_TRACE := y CONFIG_FEATURE_DP_TRACE := y endif endif @@ -1044,10 +1042,6 @@ CDEFINES += -DQCA_LL_LEGACY_TX_FLOW_CONTROL endif endif -ifeq ($(CONFIG_PKT_PROTO_TRACE), y) -CDEFINES += -DQCA_PKT_PROTO_TRACE -endif - ifneq ($(CONFIG_QCA_CLD_WLAN),) CDEFINES += -DWCN_PRONTO CDEFINES += -DWCN_PRONTO_V1 diff --git a/Kconfig b/Kconfig index 0190bdafd70b..4ba957084bcd 100644 --- a/Kconfig +++ b/Kconfig @@ -123,10 +123,6 @@ config QCACLD_WLAN_LFR2 bool "Enable the WLAN Legacy Fast Roaming feature Version 2" default n -config PKT_PROTO_TRACE - bool "Enable packet trace feature" - default n - config FEATURE_DP_TRACE bool "Enable data path trace feature" default n diff --git a/core/cds/inc/cds_packet.h b/core/cds/inc/cds_packet.h index e85ebb3d34a6..87a2a7b3941a 100644 --- a/core/cds/inc/cds_packet.h +++ b/core/cds/inc/cds_packet.h @@ -56,59 +56,6 @@ typedef struct cds_pkt_t cds_pkt_t; #include "qdf_nbuf.h" -#define CDS_PKT_TRAC_TYPE_EAPOL QDF_NBUF_PKT_TRAC_TYPE_EAPOL -#define CDS_PKT_TRAC_TYPE_DHCP QDF_NBUF_PKT_TRAC_TYPE_DHCP -#define CDS_PKT_TRAC_TYPE_MGMT_ACTION QDF_NBUF_PKT_TRAC_TYPE_MGMT_ACTION - -#define CDS_PKT_TRAC_DUMP_CMD 9999 - -/*--------------------------------------------------------------------------- - -* brief cds_pkt_get_proto_type() - - Find protoco type from packet contents - -* skb Packet Pointer -* tracking_map packet type want to track -* dot11_type, frame type when the frame is in dot11 format - - ---------------------------------------------------------------------------*/ -uint8_t cds_pkt_get_proto_type - (struct sk_buff *skb, uint8_t tracking_map, uint8_t dot11_type); - -#ifdef QCA_PKT_PROTO_TRACE -/** - * cds_pkt_trace_buf_update() - Update storage buffer with interest event string - * @event_string: string may be a packet type or an outstanding event - * - * Return: none - */ -void cds_pkt_trace_buf_update(char *event_string); - -/** - * cds_pkt_trace_buf_dump() - Dump stored information into kernel log - * - * Return: none - */ -void cds_pkt_trace_buf_dump(void); - -/** - * cds_pkt_proto_trace_init() - Initialize protocol trace functionality - * - * Return: none - */ -void cds_pkt_proto_trace_init(void); - -/** - * cds_pkt_proto_trace_deinit() - Free protocol trace buffer resource - * - * Return: none - */ -void cds_pkt_proto_trace_deinit(void); -#else -static inline void cds_pkt_proto_trace_init(void) { } -static inline void cds_pkt_proto_trace_deinit(void) {} -#endif /* QCA_PKT_PROTO_TRACE */ - /** * cds_pkt_return_packet Free the cds Packet * @ cds Packet diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 5465cc41d75c..116936fe83cd 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -221,9 +221,6 @@ QDF_STATUS cds_open(void) /* Initialize bug reporting structure */ cds_init_log_completion(); - /* Initialize protocol trace functionality */ - cds_pkt_proto_trace_init(); - /* Initialize the probe event */ if (qdf_event_create(&gp_cds_context->ProbeEvent) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, @@ -859,9 +856,6 @@ QDF_STATUS cds_close(v_CONTEXT_t cds_context) QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status)); } - /* De-Initialize protocol trace functionality */ - cds_pkt_proto_trace_deinit(); - cds_deinit_log_completion(); gp_cds_context->pHDDContext = NULL; diff --git a/core/cds/src/cds_packet.c b/core/cds/src/cds_packet.c index f8f610459f4e..b1d1191e513f 100644 --- a/core/cds/src/cds_packet.c +++ b/core/cds/src/cds_packet.c @@ -55,22 +55,6 @@ #define CDS_PKT_TRAC_DHCP_SRV_PORT (67) #define CDS_PKT_TRAC_DHCP_CLI_PORT (68) #define CDS_PKT_TRAC_EAPOL_ETH_TYPE (0x888E) -#ifdef QCA_PKT_PROTO_TRACE -#define CDS_PKT_TRAC_MAX_STRING_LEN (12) -#define CDS_PKT_TRAC_MAX_TRACE_BUF (50) -#define CDS_PKT_TRAC_MAX_STRING_BUF (64) - -/* protocol Storage Structure */ -typedef struct { - uint32_t order; - unsigned long event_time; - char event_string[CDS_PKT_TRAC_MAX_STRING_LEN]; -} cds_pkt_proto_trace_t; - -cds_pkt_proto_trace_t *trace_buffer = NULL; -unsigned int trace_buffer_order = 0; -qdf_spinlock_t trace_buffer_lock; -#endif /* QCA_PKT_PROTO_TRACE */ /** * cds_pkt_return_packet Free the cds Packet @@ -124,180 +108,6 @@ cds_pkt_get_packet_length(cds_pkt_t *pPacket, uint16_t *pPacketSize) return QDF_STATUS_SUCCESS; } -/*--------------------------------------------------------------------------- -* @brief cds_pkt_get_proto_type() - - Find protoco type from packet contents - -* skb Packet Pointer -* tracking_map packet type want to track -* dot11_type, type of dot11 frame - ---------------------------------------------------------------------------*/ -uint8_t cds_pkt_get_proto_type(struct sk_buff *skb, uint8_t tracking_map, - uint8_t dot11_type) -{ - uint8_t pkt_proto_type = 0; - uint16_t ether_type; - uint16_t SPort; - uint16_t DPort; - - if (dot11_type) { - if (dot11_type == - (CDS_PKT_TRAC_TYPE_MGMT_ACTION & tracking_map)) - pkt_proto_type |= CDS_PKT_TRAC_TYPE_MGMT_ACTION; - - /* Protocol type map */ - return pkt_proto_type; - } - - /* EAPOL Tracking enabled */ - if (CDS_PKT_TRAC_TYPE_EAPOL & tracking_map) { - ether_type = (uint16_t) (*(uint16_t *) - (skb->data + - CDS_PKT_TRAC_ETH_TYPE_OFFSET)); - if (CDS_PKT_TRAC_EAPOL_ETH_TYPE == QDF_SWAP_U16(ether_type)) { - pkt_proto_type |= CDS_PKT_TRAC_TYPE_EAPOL; - } - } - - /* DHCP Tracking enabled */ - if (CDS_PKT_TRAC_TYPE_DHCP & tracking_map) { - SPort = (uint16_t) (*(uint16_t *) - (skb->data + CDS_PKT_TRAC_IP_OFFSET + - CDS_PKT_TRAC_IP_HEADER_SIZE)); - DPort = (uint16_t) (*(uint16_t *) - (skb->data + CDS_PKT_TRAC_IP_OFFSET + - CDS_PKT_TRAC_IP_HEADER_SIZE + - sizeof(uint16_t))); - if (((CDS_PKT_TRAC_DHCP_SRV_PORT == QDF_SWAP_U16(SPort)) - && (CDS_PKT_TRAC_DHCP_CLI_PORT == QDF_SWAP_U16(DPort))) - || ((CDS_PKT_TRAC_DHCP_CLI_PORT == QDF_SWAP_U16(SPort)) - && (CDS_PKT_TRAC_DHCP_SRV_PORT == QDF_SWAP_U16(DPort)))) { - pkt_proto_type |= CDS_PKT_TRAC_TYPE_DHCP; - } - } - - /* Protocol type map */ - return pkt_proto_type; -} - -#ifdef QCA_PKT_PROTO_TRACE -/** - * cds_pkt_trace_buf_update() - Update storage buffer with interest event string - * @event_string: string may be a packet type or an outstanding event - * - * Return: none - */ -void cds_pkt_trace_buf_update(char *event_string) -{ - uint32_t slot; - - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, - "%s %d, %s", __func__, __LINE__, event_string); - qdf_spinlock_acquire(&trace_buffer_lock); - if (!trace_buffer) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "trace_buffer is null"); - goto release_lock; - } - slot = trace_buffer_order % CDS_PKT_TRAC_MAX_TRACE_BUF; - trace_buffer[slot].order = trace_buffer_order; - trace_buffer[slot].event_time = qdf_mc_timer_get_system_time(); - qdf_mem_zero(trace_buffer[slot].event_string, - sizeof(trace_buffer[slot].event_string)); - qdf_mem_copy(trace_buffer[slot].event_string, - event_string, - (CDS_PKT_TRAC_MAX_STRING_LEN < strlen(event_string)) ? - CDS_PKT_TRAC_MAX_STRING_LEN : strlen(event_string)); - trace_buffer_order++; - -release_lock: - qdf_spinlock_release(&trace_buffer_lock); - return; -} - -/** - * cds_pkt_trace_buf_dump() - Dump stored information into kernel log - * - * Return: none - */ -void cds_pkt_trace_buf_dump(void) -{ - uint32_t slot, idx; - - qdf_spinlock_acquire(&trace_buffer_lock); - if (!trace_buffer) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "trace_buffer is null"); - goto release_lock; - } - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "PACKET TRACE DUMP START Current Timestamp %u", - (unsigned int)qdf_mc_timer_get_system_time()); - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "ORDER : TIME : EVT"); - if (CDS_PKT_TRAC_MAX_TRACE_BUF > trace_buffer_order) { - for (slot = 0; slot < trace_buffer_order; slot++) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%5d :%12u : %s", - trace_buffer[slot].order, - (unsigned int)trace_buffer[slot].event_time, - trace_buffer[slot].event_string); - } - } else { - for (idx = 0; idx < CDS_PKT_TRAC_MAX_TRACE_BUF; idx++) { - slot = - (trace_buffer_order + - idx) % CDS_PKT_TRAC_MAX_TRACE_BUF; - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%5d :%12u : %s", trace_buffer[slot].order, - (unsigned int)trace_buffer[slot].event_time, - trace_buffer[slot].event_string); - } - } - - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "PACKET TRACE DUMP END"); -release_lock: - qdf_spinlock_release(&trace_buffer_lock); - return; -} - -/** - * cds_pkt_proto_trace_init() - Initialize protocol trace functionality - * - * Return: none - */ -void cds_pkt_proto_trace_init(void) -{ - /* Init spin lock to protect global memory */ - qdf_spinlock_create(&trace_buffer_lock); - trace_buffer_order = 0; - - trace_buffer = qdf_mem_malloc(CDS_PKT_TRAC_MAX_TRACE_BUF * - sizeof(cds_pkt_proto_trace_t)); - - /* Register callback function to NBUF - * Lower layer event also will be reported to here */ - qdf_nbuf_reg_trace_cb(cds_pkt_trace_buf_update); - return; -} - -/** - * cds_pkt_proto_trace_deinit() - Free trace_buffer resource - * - * Return: none - */ -void cds_pkt_proto_trace_deinit(void) -{ - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s %d", __func__, __LINE__); - qdf_mem_free(trace_buffer); - trace_buffer = NULL; - qdf_spinlock_destroy(&trace_buffer_lock); - return; -} -#endif /* QCA_PKT_PROTO_TRACE */ - #ifdef MEMORY_DEBUG /*--------------------------------------------------------------------------- * @brief cds_packet_alloc_debug() - diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 1f7724ef7143..eb011a7ecbde 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -615,7 +615,6 @@ int htt_tx_send_std(htt_pdev_handle pdev, qdf_nbuf_t msdu, uint16_t msdu_id) return 0; } - qdf_nbuf_trace_update(msdu, "HT:T:"); if (htc_send_data_pkt(pdev->htc_pdev, msdu, pdev->htc_tx_endpoint, download_len)) { HTT_TX_NBUF_QUEUE_ADD(pdev, msdu); @@ -746,7 +745,6 @@ htt_tx_send_base(htt_pdev_handle pdev, SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msdu); - qdf_nbuf_trace_update(msdu, "HT:T:"); QDF_NBUF_UPDATE_TX_PKT_COUNT(msdu, QDF_NBUF_TX_PKT_HTT); DPTRACE(qdf_dp_trace(msdu, QDF_DP_TRACE_HTT_PACKET_PTR_RECORD, qdf_nbuf_data_addr(msdu), diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c index 152beec4467b..a1d71ba61b4c 100644 --- a/core/dp/txrx/ol_tx_desc.c +++ b/core/dp/txrx/ol_tx_desc.c @@ -466,15 +466,12 @@ void ol_tx_desc_frame_free_nonstd(struct ol_txrx_pdev_t *pdev, { int mgmt_type; ol_txrx_mgmt_tx_cb ota_ack_cb; - char *trace_str; qdf_atomic_init(&tx_desc->ref_cnt); /* clear the ref cnt */ #ifdef QCA_SUPPORT_SW_TXRX_ENCAP /* restore original hdr offset */ OL_TX_RESTORE_HDR(tx_desc, (tx_desc->netbuf)); #endif - trace_str = (had_error) ? "OT:C:F:" : "OT:C:S:"; - qdf_nbuf_trace_update(tx_desc->netbuf, trace_str); if (tx_desc->pkt_type == OL_TX_FRM_NO_FREE) { /* free the tx desc but don't unmap or free the frame */ if (pdev->tx_data_callback.func) { diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c index 60c08a51f5d9..b381d1f4f196 100644 --- a/core/dp/txrx/ol_tx_send.c +++ b/core/dp/txrx/ol_tx_send.c @@ -487,8 +487,6 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev, uint16_t *desc_ids = (uint16_t *) tx_desc_id_iterator; uint16_t tx_desc_id; struct ol_tx_desc_t *tx_desc; - char *trace_str; - uint32_t byte_cnt = 0; qdf_nbuf_t netbuf; @@ -499,7 +497,6 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev, OL_TX_DELAY_COMPUTE(pdev, status, desc_ids, num_msdus); - trace_str = (status) ? "OT:C:F:" : "OT:C:S:"; for (i = 0; i < num_msdus; i++) { tx_desc_id = desc_ids[i]; tx_desc = ol_tx_desc_find(pdev, tx_desc_id); @@ -510,7 +507,6 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev, qdf_nbuf_data_addr(netbuf), sizeof(qdf_nbuf_data(netbuf)), tx_desc->id, status)); qdf_runtime_pm_put(); - qdf_nbuf_trace_update(netbuf, trace_str); /* Per SDU update of byte count */ byte_cnt += qdf_nbuf_len(netbuf); if (OL_TX_DESC_NO_REFS(tx_desc)) { diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h index 232a1d1c6f6e..33dd11d68278 100644 --- a/core/hdd/inc/qc_sap_ioctl.h +++ b/core/hdd/inc/qc_sap_ioctl.h @@ -221,9 +221,6 @@ enum { QCSAP_GTX_STEP, QCSAP_GTX_MINTPC, QCSAP_GTX_BWMASK, -#ifdef QCA_PKT_PROTO_TRACE - QCASAP_SET_DEBUG_LOG, -#endif QCASAP_SET_TM_LEVEL, QCASAP_SET_DFS_IGNORE_CAC, QCASAP_GET_DFS_NOL, diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 32ad8a18d60d..c0ce86421805 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -3114,7 +3114,7 @@ enum dot11p_mode { #define CFG_ENABLE_DP_TRACE "enable_dp_trace" #define CFG_ENABLE_DP_TRACE_MIN (0) #define CFG_ENABLE_DP_TRACE_MAX (1) -#define CFG_ENABLE_DP_TRACE_DEFAULT (0) +#define CFG_ENABLE_DP_TRACE_DEFAULT (1) /*--------------------------------------------------------------------------- Type declarations diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index a7d4cf5d04b5..fa2c758622df 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1058,11 +1058,9 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, wlan_hdd_auto_shutdown_enable(pHddCtx, true); #endif -#ifdef QCA_PKT_PROTO_TRACE - /* STA disconnected, update into trace buffer */ - if (pHddCtx->config->gEnableDebugLog) - cds_pkt_trace_buf_update("ST:DISASC"); -#endif /* QCA_PKT_PROTO_TRACE */ + DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD, + pAdapter->sessionId, + QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_DISASSOC)); /* HDD has initiated disconnect, do not send disconnect indication * to kernel. Sending disconnected event to kernel for userspace @@ -1932,11 +1930,10 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, wlan_hdd_tdls_connection_callback(pAdapter); #endif -#ifdef QCA_PKT_PROTO_TRACE - /* STA Associated, update into trace buffer */ - if (pHddCtx->config->gEnableDebugLog) - cds_pkt_trace_buf_update("ST:ASSOC"); -#endif /* QCA_PKT_PROTO_TRACE */ + DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD, + pAdapter->sessionId, + QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_ASSOC)); + /* * For reassoc, the station is already registered, all we need * is to change the state of the STA in TL. diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 65fe87e15c0b..4bd65bc858d5 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1305,12 +1305,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, } } -#ifdef QCA_PKT_PROTO_TRACE - /* Peer associated, update into trace buffer */ - if (pHddCtx->config->gEnableDebugLog) { - cds_pkt_trace_buf_update("HA:ASSOC"); - } -#endif /* QCA_PKT_PROTO_TRACE */ + DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD, + pHostapdAdapter->sessionId, + QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_ASSOC)); #ifdef MSM_PLATFORM /* start timer in sap/p2p_go */ @@ -1442,12 +1439,10 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, } } #endif -#ifdef QCA_PKT_PROTO_TRACE - /* Peer dis-associated, update into trace buffer */ - if (pHddCtx->config->gEnableDebugLog) { - cds_pkt_trace_buf_update("HA:DISASC"); - } -#endif /* QCA_PKT_PROTO_TRACE */ + DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD, + pHostapdAdapter->sessionId, + QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_DISASSOC)); + hdd_softap_deregister_sta(pHostapdAdapter, staId); pHddApCtx->bApActive = false; @@ -2789,23 +2784,6 @@ static __iw_softap_setparam(struct net_device *dev, break; } -#ifdef QCA_PKT_PROTO_TRACE - case QCASAP_SET_DEBUG_LOG: - { - hdd_context_t *pHddCtx = - WLAN_HDD_GET_CTX(pHostapdAdapter); - - hddLog(LOG1, "QCASAP_SET_DEBUG_LOG val %d", set_value); - /* Trace buffer dump only */ - if (CDS_PKT_TRAC_DUMP_CMD == set_value) { - cds_pkt_trace_buf_dump(); - break; - } - pHddCtx->config->gEnableDebugLog = set_value; - break; - } -#endif /* QCA_PKT_PROTO_TRACE */ - case QCASAP_SET_TM_LEVEL: { hddLog(LOG1, "Set Thermal Mitigation Level %d", set_value); @@ -5731,12 +5709,6 @@ static const struct iw_priv_args hostapd_private_args[] = { QCSAP_PARAM_ACL_MODE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "setAclMode" }, -#ifdef QCA_PKT_PROTO_TRACE - { - QCASAP_SET_DEBUG_LOG, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "setDbgLvl" - }, -#endif /* QCA_PKT_PROTO_TRACE */ { QCASAP_SET_TM_LEVEL, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 066031d6600f..1f8bf40c360d 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -172,10 +172,6 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter); struct qdf_mac_addr *pDestMacAddress; uint8_t STAId; -#ifdef QCA_PKT_PROTO_TRACE - uint8_t proto_type = 0; - hdd_context_t *hddCtxt = (hdd_context_t *) pAdapter->pHddCtx; -#endif /* QCA_PKT_PROTO_TRACE */ ++pAdapter->hdd_stats.hddTxRxStats.txXmitCalled; /* Prevent this function from being called during SSR since TL @@ -289,20 +285,6 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) } #endif -#ifdef QCA_PKT_PROTO_TRACE - if ((hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) || - (hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) { - /* Proto Trace enabled */ - proto_type = cds_pkt_get_proto_type(skb, - hddCtxt->config-> - gEnableDebugLog, 0); - if (CDS_PKT_TRAC_TYPE_EAPOL & proto_type) { - cds_pkt_trace_buf_update("HA:T:EPL"); - } else if (CDS_PKT_TRAC_TYPE_DHCP & proto_type) { - cds_pkt_trace_buf_update("HA:T:DHC"); - } - } -#endif /* QCA_PKT_PROTO_TRACE */ pAdapter->stats.tx_bytes += skb->len; ++pAdapter->stats.tx_packets; @@ -322,9 +304,6 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) (uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE], (qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX)); -#ifdef QCA_PKT_PROTO_TRACE - qdf_nbuf_trace_set_proto_type(skb, proto_type); -#endif if (pAdapter->tx_fn(ol_txrx_get_vdev_by_sta_id(STAId), (qdf_nbuf_t) skb) != NULL) { QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_WARN, @@ -537,9 +516,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) unsigned int cpu_index; struct sk_buff *skb = NULL; hdd_context_t *pHddCtx = NULL; -#ifdef QCA_PKT_PROTO_TRACE - uint8_t proto_type; -#endif /* QCA_PKT_PROTO_TRACE */ /* Sanity check on inputs */ if (unlikely((NULL == context) || (NULL == rxBuf))) { @@ -581,20 +557,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) ++pAdapter->stats.rx_packets; pAdapter->stats.rx_bytes += skb->len; -#ifdef QCA_PKT_PROTO_TRACE - if ((pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) || - (pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) { - proto_type = cds_pkt_get_proto_type(skb, - pHddCtx->config-> - gEnableDebugLog, 0); - if (CDS_PKT_TRAC_TYPE_EAPOL & proto_type) { - cds_pkt_trace_buf_update("HA:R:EPL"); - } else if (CDS_PKT_TRAC_TYPE_DHCP & proto_type) { - cds_pkt_trace_buf_update("HA:R:DHC"); - } - } -#endif /* QCA_PKT_PROTO_TRACE */ - DPTRACE(qdf_dp_trace(rxBuf, QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD, qdf_nbuf_data_addr(rxBuf), diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index a2085b9b683d..d3d8d712cd8c 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -266,10 +266,6 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) bool granted; uint8_t STAId = WLAN_MAX_STA_COUNT; hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station; -#ifdef QCA_PKT_PROTO_TRACE - uint8_t proto_type = 0; - hdd_context_t *hddCtxt = WLAN_HDD_GET_CTX(pAdapter); -#endif /* QCA_PKT_PROTO_TRACE */ #ifdef QCA_WIFI_FTM if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) { @@ -421,20 +417,6 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) skb->queue_mapping = hdd_linux_up_to_ac_map[up]; } -#ifdef QCA_PKT_PROTO_TRACE - if ((hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) || - (hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) { - proto_type = cds_pkt_get_proto_type(skb, - hddCtxt->config-> - gEnableDebugLog, 0); - if (CDS_PKT_TRAC_TYPE_EAPOL & proto_type) { - cds_pkt_trace_buf_update("ST:T:EPL"); - } else if (CDS_PKT_TRAC_TYPE_DHCP & proto_type) { - cds_pkt_trace_buf_update("ST:T:DHC"); - } - } -#endif /* QCA_PKT_PROTO_TRACE */ - pAdapter->stats.tx_bytes += skb->len; ++pAdapter->stats.tx_packets; @@ -465,10 +447,6 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) goto drop_pkt; } -#ifdef QCA_PKT_PROTO_TRACE - qdf_nbuf_trace_set_proto_type(skb, proto_type); -#endif - /* * If a transmit function is not registered, drop packet */ @@ -730,9 +708,6 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) hdd_context_t *pHddCtx = NULL; int rxstat; struct sk_buff *skb = NULL; -#ifdef QCA_PKT_PROTO_TRACE - uint8_t proto_type; -#endif /* QCA_PKT_PROTO_TRACE */ hdd_station_ctx_t *pHddStaCtx = NULL; unsigned int cpu_index; @@ -781,20 +756,6 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) qdf_nbuf_data_addr(rxBuf), sizeof(qdf_nbuf_data(rxBuf)), QDF_RX)); -#ifdef QCA_PKT_PROTO_TRACE - if ((pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) || - (pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) { - proto_type = cds_pkt_get_proto_type(skb, - pHddCtx->config-> - gEnableDebugLog, 0); - if (CDS_PKT_TRAC_TYPE_EAPOL & proto_type) { - cds_pkt_trace_buf_update("ST:R:EPL"); - } else if (CDS_PKT_TRAC_TYPE_DHCP & proto_type) { - cds_pkt_trace_buf_update("ST:R:DHC"); - } - } -#endif /* QCA_PKT_PROTO_TRACE */ - skb->dev = pAdapter->dev; skb->protocol = eth_type_trans(skb, skb->dev); ++pAdapter->hdd_stats.hddTxRxStats.rxPackets[cpu_index]; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 2d849c5c9a3a..a85866498b58 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -85,10 +85,6 @@ #include "wlan_hdd_napi.h" #include "cdp_txrx_flow_ctrl_legacy.h" -#ifdef QCA_PKT_PROTO_TRACE -#include "cds_packet.h" -#endif /* QCA_PKT_PROTO_TRACE */ - #define HDD_FINISH_ULA_TIME_OUT 800 #define HDD_SET_MCBC_FILTERS_TO_FW 1 #define HDD_DELETE_MCBC_FILTERS_FROM_FW 0 @@ -6156,13 +6152,7 @@ static int __iw_setint_getnone(struct net_device *dev, case WE_SET_DEBUG_LOG: { hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter); -#ifdef QCA_PKT_PROTO_TRACE - /* Trace buffer dump only */ - if (CDS_PKT_TRAC_DUMP_CMD == set_value) { - cds_pkt_trace_buf_dump(); - break; - } -#endif /* QCA_PKT_PROTO_TRACE */ + hdd_ctx->config->gEnableDebugLog = set_value; sme_update_connect_debug(hdd_ctx->hHal, set_value); break; diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index ec39b5355c74..f077249bd408 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -2381,9 +2381,6 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, struct wma_txrx_node *iface; tpAniSirGlobal pMac; tpSirMacMgmtHdr mHdr; -#ifdef QCA_PKT_PROTO_TRACE - uint8_t proto_type = 0; -#endif /* QCA_PKT_PROTO_TRACE */ struct wmi_mgmt_params mgmt_param = {0}; struct wmi_desc_t *wmi_desc = NULL; ol_pdev_handle ctrl_pdev; @@ -2640,15 +2637,6 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, wma_handle->umac_ota_ack_cb[pFc->subType] = tx_frm_ota_comp_cb; } -#ifdef QCA_PKT_PROTO_TRACE - if (pFc->subType == SIR_MAC_MGMT_ACTION) - proto_type = cds_pkt_get_proto_type(tx_frame, - pMac->fEnableDebugLog, - CDS_PKT_TRAC_TYPE_MGMT_ACTION); - if (proto_type & CDS_PKT_TRAC_TYPE_MGMT_ACTION) - cds_pkt_trace_buf_update("WM:T:MACT"); - qdf_nbuf_trace_set_proto_type(tx_frame, proto_type); -#endif /* QCA_PKT_PROTO_TRACE */ } else { if (downld_comp_required) tx_frm_index =