From ea977dc41cd3f74dcc3b2303e3c0098d8233a685 Mon Sep 17 00:00:00 2001 From: Ananya Gupta Date: Thu, 5 Nov 2020 09:34:03 +0530 Subject: [PATCH] qcacmn: Count htc packets failed or not freed in misclist HTC packets were mapped but not unmapped or freed. As part of hdd_wlan_stop_modules(), all nbufs will be freed in misclist and TxQueue. Adding debug change to count number of htc packets failed to send and count number of nbufs in misclist are skipped when freeing them. Change-Id: I868621a67cf89d9b84e202843990f576973ec334 CRs-Fixed: 2807407 --- dp/wifi3.0/dp_htt.c | 6 +++++- dp/wifi3.0/dp_htt.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 167d31a046..1414684652 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -621,7 +621,8 @@ static inline QDF_STATUS DP_HTT_SEND_HTC_PKT(struct htt_soc *soc, status = htc_send_pkt(soc->htc_soc, &pkt->htc_pkt); if (status == QDF_STATUS_SUCCESS) htt_htc_misc_pkt_list_add(soc, pkt); - + else + soc->stats.fail_count++; return status; } @@ -643,6 +644,7 @@ htt_htc_misc_pkt_pool_free(struct htt_soc *soc) if (htc_packet_get_magic_cookie(&(pkt->u.pkt.htc_pkt)) != HTC_PACKET_MAGIC_COOKIE) { pkt = next; + soc->stats.skip_count++; continue; } netbuf = (qdf_nbuf_t) (pkt->u.pkt.htc_pkt.pNetBufContext); @@ -659,6 +661,8 @@ htt_htc_misc_pkt_pool_free(struct htt_soc *soc) } soc->htt_htc_pkt_misclist = NULL; HTT_TX_MUTEX_RELEASE(&soc->htt_tx_mutex); + dp_info("HTC Packets, fail count = %d, skip count = %d", + soc->stats.fail_count, soc->stats.skip_count); } /* diff --git a/dp/wifi3.0/dp_htt.h b/dp/wifi3.0/dp_htt.h index 9d1350c913..9271b285af 100644 --- a/dp/wifi3.0/dp_htt.h +++ b/dp/wifi3.0/dp_htt.h @@ -194,6 +194,8 @@ struct htt_soc { struct { int htc_err_cnt; int htc_pkt_free; + int skip_count; + int fail_count; /* rtpm put skip count for ver req msg */ int htt_ver_req_put_skip; } stats;