Переглянути джерело

qcacmn: Account for fragmented list in qdf_nbuf_count_inc

When a jumbo packet connected using fragmented list is given to the
WLAN driver, currently we increment WLAN skb count by only 1, instead,
increment the skb count for all fragments in the fragmented list.

Change-Id: I291118fab2316505ca32900d7cce2b1510de203a
CRs-Fixed: 2498314
Shiva Krishna Pittala 5 роки тому
батько
коміт
45752d0667
1 змінених файлів з 10 додано та 1 видалено
  1. 10 1
      qdf/linux/src/qdf_nbuf.c

+ 10 - 1
qdf/linux/src/qdf_nbuf.c

@@ -334,7 +334,16 @@ qdf_export_symbol(__qdf_nbuf_count_get);
  */
 void __qdf_nbuf_count_inc(qdf_nbuf_t nbuf)
 {
-	qdf_atomic_inc(&nbuf_count);
+	int num_nbuf = 1;
+	qdf_nbuf_t ext_list = qdf_nbuf_get_ext_list(nbuf);
+
+	/* Take care to account for frag_list */
+	while (ext_list) {
+		++num_nbuf;
+		ext_list = qdf_nbuf_queue_next(ext_list);
+	}
+
+	qdf_atomic_add(num_nbuf, &nbuf_count);
 }
 qdf_export_symbol(__qdf_nbuf_count_inc);