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
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 37aa962..066031d 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -289,9 +289,6 @@
}
#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 @@
/* 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 @@
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 @@
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 @@
++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 @@
}
#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 @@
* 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