qcacld-3.0: Support for DPTRACE
1. Add an extra parameter pdev id to
qdf_trace signatures to avoid compilation break.
2. This variable allows to collect records per pdev
for Lithium based chipsets.
3. Set this variable to a default value QDF_TRACE_DEFAULT_PDEV_ID
for older chipsets.
Change-Id: I2f4c2e3525ac0d1d53f1af3db7e43acadf6ab835
CRs-Fixed: 2049412
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index d502744..fb7e110 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -401,18 +401,22 @@
++pAdapter->stats.tx_packets;
hdd_event_eapol_log(skb, QDF_TX);
- qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);
+ qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX,
+ QDF_TRACE_DEFAULT_PDEV_ID);
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, QDF_TX);
DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
- qdf_nbuf_data_addr(skb), sizeof(qdf_nbuf_data(skb)),
+ QDF_TRACE_DEFAULT_PDEV_ID, 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));
+ QDF_TRACE_DEFAULT_PDEV_ID, (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_TX_PACKET_RECORD,
+ QDF_TRACE_DEFAULT_PDEV_ID,
(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
@@ -433,9 +437,11 @@
drop_pkt:
DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,
- (uint8_t *)skb->data, qdf_nbuf_len(skb), QDF_TX));
+ QDF_TRACE_DEFAULT_PDEV_ID, (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,
+ QDF_TRACE_DEFAULT_PDEV_ID,
(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
kfree_skb(skb);
@@ -510,7 +516,8 @@
int i;
DPTRACE(qdf_dp_trace(NULL, QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT,
- NULL, 0, QDF_TX));
+ QDF_TRACE_DEFAULT_PDEV_ID,
+ 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
@@ -732,13 +739,17 @@
hdd_event_eapol_log(skb, QDF_RX);
DPTRACE(qdf_dp_trace(skb,
QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
+ QDF_TRACE_DEFAULT_PDEV_ID,
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));
+ QDF_TRACE_DEFAULT_PDEV_ID,
+ (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,
+ QDF_TRACE_DEFAULT_PDEV_ID,
(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE),
QDF_RX));