qcacld-3.0: Dump few bytes of rx packet in DPTRACE
Propagation from qcacld-2.0 to qcacld-3.0.
Add logic to dump first 32 bytes for rx packets
in DPTRACE.
Change-Id: I950108b9d1c9094ce3d285493ee36bda4f9d7e41
CRs-Fixed: 1074551
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 334bfa9..3816c6f 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -375,7 +375,8 @@
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));
+ qdf_nbuf_data_addr(skb), sizeof(qdf_nbuf_data(skb)),
+ 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)
@@ -664,10 +665,18 @@
pAdapter->stats.rx_bytes += skb->len;
hdd_event_eapol_log(skb, QDF_RX);
- DPTRACE(qdf_dp_trace(rxBuf,
+ DPTRACE(qdf_dp_trace(skb,
QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
- qdf_nbuf_data_addr(rxBuf),
- sizeof(qdf_nbuf_data(rxBuf)), QDF_RX));
+ qdf_nbuf_data_addr(skb),
+ sizeof(qdf_nbuf_data(skb)), QDF_RX));
+ DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_RX_PACKET_RECORD,
+ (uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_RX));
+ if (qdf_nbuf_len(skb) > QDF_DP_TRACE_RECORD_SIZE)
+ DPTRACE(qdf_dp_trace(skb,
+ QDF_DP_TRACE_HDD_RX_PACKET_RECORD,
+ (uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
+ (qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE),
+ QDF_RX));
skb->protocol = eth_type_trans(skb, skb->dev);