Browse Source

qcacld-3.0: Enhance DPTRACE to support RX path

Enhance DPTRACE to support RX path and
add support for live mode.
Live mode will print info in kmsg and
log it in buffer as well.
To enable live mode use below command.
iwpriv wlan0 dump_dp_trace 1 0

Change-Id: Id309a4d75cec93654b4acac51e5be42eae7f0b35
CRs-Fixed: 1008087
Nirav Shah 9 years ago
parent
commit
0d58a7ef5f

+ 13 - 6
core/dp/htt/htt_rx.c

@@ -1643,11 +1643,14 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 	unsigned int msdu_count = 0;
 	uint8_t offload_ind;
 	struct htt_host_rx_desc_base *rx_desc;
+	uint8_t peer_id;
 
 	HTT_ASSERT1(htt_rx_in_order_ring_elems(pdev) != 0);
 
 	rx_ind_data = qdf_nbuf_data(rx_ind_msg);
 	msg_word = (uint32_t *) rx_ind_data;
+	peer_id = HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(
+					*(u_int32_t *)rx_ind_data);
 
 	offload_ind = HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_GET(*msg_word);
 
@@ -1690,7 +1693,6 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 
 		/* cache consistency has been taken care of by qdf_nbuf_unmap */
 		rx_desc = htt_rx_desc(msdu);
-
 		htt_rx_extract_lro_info(msdu, rx_desc);
 
 		/*
@@ -1698,12 +1700,20 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 		 * than the descriptor.
 		 */
 		qdf_nbuf_pull_head(msdu, HTT_RX_STD_DESC_RESERVATION);
+
+		qdf_dp_trace_set_track(msdu, QDF_RX);
+		QDF_NBUF_CB_TX_PACKET_TRACK(msdu) = QDF_NBUF_TX_PKT_DATA_TRACK;
+		ol_rx_log_packet(pdev, peer_id, msdu);
+		DPTRACE(qdf_dp_trace(msdu,
+			QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD,
+			qdf_nbuf_data_addr(msdu),
+			sizeof(qdf_nbuf_data(msdu)), QDF_RX));
+
 #if HTT_PADDR64
 #define NEXT_FIELD_OFFSET_IN32 2
 #else /* ! HTT_PADDR64 */
 #define NEXT_FIELD_OFFSET_IN32 1
 #endif /* HTT_PADDR64 */
-#
 		qdf_nbuf_trim_tail(msdu,
 				   HTT_RX_BUF_SIZE -
 				   (RX_STD_DESC_SIZE +
@@ -1720,12 +1730,9 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 
 		if (qdf_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) &
 				    FW_RX_DESC_MIC_ERR_M)) {
-			u_int8_t tid =
+			uint8_t tid =
 				HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(
 					*(u_int32_t *)rx_ind_data);
-			u_int16_t peer_id =
-				HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(
-					*(u_int32_t *)rx_ind_data);
 			ol_rx_mic_error_handler(pdev->txrx_pdev, tid, peer_id,
 						rx_desc, msdu);
 

+ 2 - 2
core/dp/htt/htt_tx.c

@@ -608,7 +608,7 @@ int htt_tx_send_std(htt_pdev_handle pdev, qdf_nbuf_t msdu, uint16_t msdu_id)
 	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),
-				sizeof(qdf_nbuf_data(msdu))));
+				sizeof(qdf_nbuf_data(msdu)), QDF_TX));
 	if (qdf_nbuf_queue_len(&pdev->txnbufq) > 0) {
 		HTT_TX_NBUF_QUEUE_ADD(pdev, msdu);
 		htt_tx_sched(pdev);
@@ -750,7 +750,7 @@ htt_tx_send_base(htt_pdev_handle pdev,
 	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),
-				sizeof(qdf_nbuf_data(msdu))));
+				sizeof(qdf_nbuf_data(msdu)), QDF_TX));
 	htc_send_data_pkt(pdev->htc_pdev, &pkt->htc_pkt, more_data);
 
 	return 0;               /* success */

+ 22 - 0
core/dp/txrx/ol_rx.c

@@ -1361,6 +1361,11 @@ ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
 	while (msdu) {
 		qdf_nbuf_t next = qdf_nbuf_next(msdu);
 
+		DPTRACE(qdf_dp_trace(msdu,
+			QDF_DP_TRACE_RX_TXRX_PACKET_PTR_RECORD,
+			qdf_nbuf_data_addr(msdu),
+			sizeof(qdf_nbuf_data(msdu)), QDF_RX));
+
 		OL_RX_PEER_STATS_UPDATE(peer, msdu);
 		OL_RX_ERR_STATISTICS_1(vdev->pdev, vdev, peer, rx_desc,
 				       OL_RX_ERR_NONE);
@@ -1377,6 +1382,16 @@ ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
 	ol_rx_data_process(peer, msdu_list);
 }
 
+void ol_rx_log_packet(htt_pdev_handle htt_pdev,
+		uint8_t peer_id, qdf_nbuf_t msdu)
+{
+	struct ol_txrx_peer_t *peer;
+
+	peer = ol_txrx_peer_find_by_id(htt_pdev->txrx_pdev, peer_id);
+	if (peer)
+		qdf_dp_trace_log_pkt(peer->vdev->vdev_id, msdu, QDF_RX);
+}
+
 void
 ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
 					uint32_t msdu_count,
@@ -1396,6 +1411,13 @@ ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
 
 		peer = ol_txrx_peer_find_by_id(htt_pdev->txrx_pdev, peer_id);
 		if (peer) {
+			qdf_dp_trace_set_track(head_buf, QDF_RX);
+			qdf_dp_trace_log_pkt(peer->vdev->vdev_id,
+				head_buf, QDF_RX);
+			DPTRACE(qdf_dp_trace(head_buf,
+				QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD,
+				qdf_nbuf_data_addr(head_buf),
+				sizeof(qdf_nbuf_data(head_buf)), QDF_RX));
 			ol_rx_data_process(peer, head_buf);
 		} else {
 			buf = head_buf;

+ 2 - 0
core/dp/txrx/ol_rx.h

@@ -52,6 +52,8 @@ ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
 		       struct ol_txrx_peer_t *peer,
 		       unsigned tid, qdf_nbuf_t head_msdu);
 
+void ol_rx_log_packet(htt_pdev_handle htt_pdev,
+		 uint8_t peer_id, qdf_nbuf_t msdu);
 void
 ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
 					uint32_t msdu_count,

+ 8 - 7
core/dp/txrx/ol_tx.c

@@ -293,7 +293,7 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 			 */
 			htt_tx_desc_display(tx_desc->htt_tx_desc);
 
-			ol_tx_send(vdev->pdev, tx_desc, msdu);
+			ol_tx_send(vdev->pdev, tx_desc, msdu, vdev->vdev_id);
 
 			if (msdu_info.tso_info.curr_seg) {
 				msdu_info.tso_info.curr_seg =
@@ -351,7 +351,7 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 		 * tx_send call.
 		 */
 		next = qdf_nbuf_next(msdu);
-		ol_tx_send(vdev->pdev, tx_desc, msdu);
+		ol_tx_send(vdev->pdev, tx_desc, msdu, vdev->vdev_id);
 		msdu = next;
 	}
 	return NULL;            /* all MSDUs were accepted */
@@ -583,7 +583,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 				    QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
 				    qdf_nbuf_data_addr(msdu),
 				    sizeof(qdf_nbuf_data(msdu)),
-				     tx_desc->id, 0));
+				     tx_desc->id, vdev->vdev_id));
 				/*
 				 * If debug display is enabled, show the meta
 				 * data being downloaded to the target via the
@@ -681,7 +681,8 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 			DPTRACE(qdf_dp_trace_ptr(msdu,
 				QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
 				qdf_nbuf_data_addr(msdu),
-				sizeof(qdf_nbuf_data(msdu)), tx_desc->id, 0));
+				sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
+				vdev->vdev_id));
 			/*
 			 * If debug display is enabled, show the meta-data being
 			 * downloaded to the target via the HTT tx descriptor.
@@ -821,7 +822,7 @@ ol_tx_vdev_pause_queue_append(struct ol_txrx_vdev_t *vdev,
 		DPTRACE(qdf_dp_trace(msdu_list,
 				QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD,
 				qdf_nbuf_data_addr(msdu_list),
-				sizeof(qdf_nbuf_data(msdu_list))));
+				sizeof(qdf_nbuf_data(msdu_list)), QDF_TX));
 
 		vdev->ll_pause.txq.depth++;
 		if (!vdev->ll_pause.txq.head) {
@@ -1088,7 +1089,7 @@ ol_tx_non_std_ll(ol_txrx_vdev_handle vdev,
 		 * downloaded to the target via the HTT tx descriptor.
 		 */
 		htt_tx_desc_display(tx_desc->htt_tx_desc);
-		ol_tx_send(vdev->pdev, tx_desc, msdu);
+		ol_tx_send(vdev->pdev, tx_desc, msdu, vdev->vdev_id);
 		msdu = next;
 	}
 	return NULL;            /* all MSDUs were accepted */
@@ -1410,7 +1411,7 @@ qdf_nbuf_t ol_tx_reinject(struct ol_txrx_vdev_t *vdev,
 
 	htt_tx_desc_set_peer_id(tx_desc->htt_tx_desc, peer_id);
 
-	ol_tx_send(vdev->pdev, tx_desc, msdu);
+	ol_tx_send(vdev->pdev, tx_desc, msdu, vdev->vdev_id);
 
 	return NULL;
 }

+ 3 - 2
core/dp/txrx/ol_tx_send.c

@@ -175,7 +175,7 @@ ol_tx_send_base(struct ol_txrx_pdev_t *pdev,
 
 void
 ol_tx_send(struct ol_txrx_pdev_t *pdev,
-	   struct ol_tx_desc_t *tx_desc, qdf_nbuf_t msdu)
+	   struct ol_tx_desc_t *tx_desc, qdf_nbuf_t msdu, uint8_t vdev_id)
 {
 	int msdu_credit_consumed;
 	uint16_t id;
@@ -186,7 +186,8 @@ ol_tx_send(struct ol_txrx_pdev_t *pdev,
 	QDF_NBUF_UPDATE_TX_PKT_COUNT(msdu, QDF_NBUF_TX_PKT_TXRX);
 	DPTRACE(qdf_dp_trace_ptr(msdu, QDF_DP_TRACE_TXRX_PACKET_PTR_RECORD,
 				qdf_nbuf_data_addr(msdu),
-				sizeof(qdf_nbuf_data(msdu)), tx_desc->id, 0));
+				sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
+				vdev_id));
 	failed = htt_tx_send_std(pdev->htt_pdev, msdu, id);
 	if (qdf_unlikely(failed)) {
 		OL_TX_TARGET_CREDIT_INCR_INT(pdev, msdu_credit_consumed);

+ 1 - 1
core/dp/txrx/ol_tx_send.h

@@ -52,7 +52,7 @@ void ol_tx_discard_target_frms(ol_txrx_pdev_handle pdev);
  */
 void
 ol_tx_send(struct ol_txrx_pdev_t *pdev,
-	   struct ol_tx_desc_t *tx_desc, qdf_nbuf_t msdu);
+	   struct ol_tx_desc_t *tx_desc, qdf_nbuf_t msdu, uint8_t vdev_id);
 
 /**
  * @brief Send a tx batch download to the target.

+ 0 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -96,7 +96,6 @@
 #define SAP_24GHZ_CH_COUNT (14)
 #define ACS_SCAN_EXPIRY_TIMEOUT_S 4
 
-#define DUMP_DP_TRACE       0
 
 /* Function definitions */
 

+ 18 - 19
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -289,9 +289,6 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	}
 #endif
 
-	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb,
-			   WIFI_EVENT_DRIVER_EAPOL_FRAME_TRANSMIT_REQUESTED);
-
 #ifdef QCA_PKT_PROTO_TRACE
 	if ((hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) ||
 	    (hddCtxt->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) {
@@ -311,18 +308,19 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	/* Zero out skb's context buffer for the driver to use */
 	qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);
 	QDF_NBUF_CB_TX_PACKET_TRACK(skb) = QDF_NBUF_TX_PKT_DATA_TRACK;
 	QDF_NBUF_UPDATE_TX_PKT_COUNT(skb, QDF_NBUF_TX_PKT_HDD);
 
-	qdf_dp_trace_set_track(skb);
-	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_PTR_RECORD,
-				(uint8_t *)&skb->data, sizeof(skb->data)));
-	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_RECORD,
-				(uint8_t *)skb->data, qdf_nbuf_len(skb)));
+	qdf_dp_trace_set_track(skb, QDF_TX);
+	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
+			(uint8_t *)&skb->data, sizeof(skb->data), QDF_TX));
+	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
+			(uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_TX));
 	if (qdf_nbuf_len(skb) > QDF_DP_TRACE_RECORD_SIZE)
-		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_RECORD,
-				(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
-				(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE)));
+		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
+			(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);
@@ -342,11 +340,11 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 drop_pkt:
 
 	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,
-				(uint8_t *)skb->data, qdf_nbuf_len(skb)));
+			(uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_TX));
 	if (qdf_nbuf_len(skb) > QDF_DP_TRACE_RECORD_SIZE)
 		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,
-				(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
-				(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE)));
+			(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
+			(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
 	kfree_skb(skb);
 
 drop_pkt_accounting:
@@ -374,7 +372,7 @@ static void __hdd_softap_tx_timeout(struct net_device *dev)
 	int i;
 
 	DPTRACE(qdf_dp_trace(NULL, QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT,
-				NULL, 0));
+				NULL, 0, QDF_TX));
 	/* Getting here implies we disabled the TX queues for too
 	 * long. Queues are disabled either because of disassociation
 	 * or low resource scenarios. In case of disassociation it is
@@ -583,9 +581,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
 	++pAdapter->stats.rx_packets;
 	pAdapter->stats.rx_bytes += skb->len;
 
-	qdf_dp_trace_log_pkt(pAdapter->sessionId,
-		skb, WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED);
-
 #ifdef QCA_PKT_PROTO_TRACE
 	if ((pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_EAPOL) ||
 	    (pHddCtx->config->gEnableDebugLog & CDS_PKT_TRAC_TYPE_DHCP)) {
@@ -600,6 +595,11 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
 	}
 #endif /* QCA_PKT_PROTO_TRACE */
 
+	DPTRACE(qdf_dp_trace(rxBuf,
+		QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
+		qdf_nbuf_data_addr(rxBuf),
+		sizeof(qdf_nbuf_data(rxBuf)), QDF_RX));
+
 	skb->protocol = eth_type_trans(skb, skb->dev);
 #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
 	qdf_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
@@ -611,7 +611,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
 	 * it to stack
 	 */
 	qdf_net_buf_debug_release_skb(rxBuf);
-
 	if (hdd_napi_enabled(HDD_NAPI_ANY) && !pHddCtx->config->enableRxThread)
 		rxstat = netif_receive_skb(skb);
 	else

+ 17 - 16
core/hdd/src/wlan_hdd_tx_rx.c

@@ -440,20 +440,19 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	/* Zero out skb's context buffer for the driver to use */
 	qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
-	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb,
-		WIFI_EVENT_DRIVER_EAPOL_FRAME_TRANSMIT_REQUESTED);
+	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);
 	QDF_NBUF_CB_TX_PACKET_TRACK(skb) = QDF_NBUF_TX_PKT_DATA_TRACK;
 	QDF_NBUF_UPDATE_TX_PKT_COUNT(skb, QDF_NBUF_TX_PKT_HDD);
 
-	qdf_dp_trace_set_track(skb);
-	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_PTR_RECORD,
-				(uint8_t *)&skb->data, sizeof(skb->data)));
-	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_RECORD,
-				(uint8_t *)skb->data, qdf_nbuf_len(skb)));
+	qdf_dp_trace_set_track(skb, QDF_TX);
+	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
+			(uint8_t *)&skb->data, sizeof(skb->data), QDF_TX));
+	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
+			(uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_TX));
 	if (qdf_nbuf_len(skb) > QDF_DP_TRACE_RECORD_SIZE) {
-		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_PACKET_RECORD,
-				(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
-				(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE)));
+		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
+			(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
+			(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
 	}
 
 	/* Check if station is connected */
@@ -494,11 +493,11 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 drop_pkt:
 
 	DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,
-				(uint8_t *)skb->data, qdf_nbuf_len(skb)));
+			(uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_TX));
 	if (qdf_nbuf_len(skb) > QDF_DP_TRACE_RECORD_SIZE)
 		DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,
-				(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
-				(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE)));
+			(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
+			(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
 
 	++pAdapter->stats.tx_dropped;
 	++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
@@ -553,7 +552,7 @@ static void __hdd_tx_timeout(struct net_device *dev)
 		  "%s: Transmission timeout occurred jiffies %lu trans_start %lu",
 		  __func__, jiffies, dev->trans_start);
 	DPTRACE(qdf_dp_trace(NULL, QDF_DP_TRACE_HDD_TX_TIMEOUT,
-				NULL, 0));
+				NULL, 0, QDF_TX));
 
 	/* Getting here implies we disabled the TX queues for too
 	 * long. Queues are disabled either because of disassociation
@@ -777,8 +776,10 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
 		return QDF_STATUS_SUCCESS;
 	}
 
-	qdf_dp_trace_log_pkt(pAdapter->sessionId,
-		skb, WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED);
+	DPTRACE(qdf_dp_trace(rxBuf,
+		QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
+		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) ||

+ 2 - 1
core/hdd/src/wlan_hdd_wext.c

@@ -428,7 +428,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = {
 #define WE_SET_FW_CRASH_INJECT    2
 #endif
 #define WE_DUMP_DP_TRACE_LEVEL    3
-#define DUMP_DP_TRACE       0
 /* Private sub ioctl for enabling and setting histogram interval of profiling */
 #define WE_ENABLE_FW_PROFILE    4
 #define WE_SET_FW_PROFILE_HIST_INTVL    5
@@ -9844,6 +9843,8 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
 		       value[1], value[2]);
 		if (value[1] == DUMP_DP_TRACE)
 			qdf_dp_trace_dump_all(value[2]);
+		else if (value[1] == ENABLE_DP_TRACE_LIVE_MODE)
+			qdf_dp_trace_enable_live_mode();
 		break;
 	case WE_SET_MON_MODE_CHAN:
 		ret = wlan_hdd_set_mon_chan(pAdapter, value[1], value[2]);