瀏覽代碼

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 6 年之前
父節點
當前提交
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);