Browse Source

qcacmn: Add debug log to print length of the buffer

When the number of bytes to be transmitted in HTC is greater than
allocate buffer length, dump_stack messages are seen on console.
For further debugging on the difference in the length of the buffer
this debug log is added.

Change-Id: I63f105b1f2251726fdd31efbabb14c985525b879
CRs-Fixed: 2274020
Santosh Anbu 6 years ago
parent
commit
dbfae9b995
1 changed files with 5 additions and 1 deletions
  1. 5 1
      hif/src/ce/ce_main.c

+ 5 - 1
hif/src/ce/ce_main.c

@@ -1769,7 +1769,11 @@ hif_send_head(struct hif_opaque_softc *hif_ctx,
 	int status, i = 0;
 	unsigned int mux_id = 0;
 
-	QDF_ASSERT(nbytes <= qdf_nbuf_len(nbuf));
+	if (nbytes > qdf_nbuf_len(nbuf)) {
+		HIF_ERROR("%s: nbytes:%d nbuf_len:%d", __func__, nbytes,
+			  (uint32_t)qdf_nbuf_len(nbuf));
+		QDF_ASSERT(0);
+	}
 
 	transfer_id =
 		(mux_id & MUX_ID_MASK) |