qcacld-3.0: Add support to add memory tracking in tx path
Add support to add memory tracking in tx path in WLAN driver using
already present infrastructure for memory tracking.
Change-Id: I6a2c9890e0af1fd51c4e2dfcded68f0075a3a4ef
CRs-Fixed: 2025668
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 0adeaf9..4062e6a 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -386,6 +386,12 @@
}
#endif
+ /*
+ * Add SKB to internal tracking table before further processing
+ * in WLAN driver.
+ */
+ qdf_net_buf_debug_acquire_skb(skb, __FILE__, __LINE__);
+
pAdapter->stats.tx_bytes += skb->len;
if (qdf_nbuf_is_tso(skb))
@@ -415,12 +421,14 @@
"%s: Failed to send packet to txrx for staid:%d",
__func__, STAId);
++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- goto drop_pkt;
+ goto drop_pkt_and_release_skb;
}
netif_trans_update(dev);
return NETDEV_TX_OK;
+drop_pkt_and_release_skb:
+ qdf_net_buf_debug_release_skb(skb);
drop_pkt:
DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,