Browse Source

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
Ananya Gupta 4 năm trước cách đây
mục cha
commit
ea977dc41c
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 5 1
      dp/wifi3.0/dp_htt.c
  2. 2 0
      dp/wifi3.0/dp_htt.h

+ 5 - 1
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);
 }
 
 /*

+ 2 - 0
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;