浏览代码

qcacld-3.0: Allocate hif_napi_info structures dynamically

The hif_napi_info structure has a dummy netdev included.
The dummy netdev is large.  Avoiding unneeded allocation
save 30kb of memory.  Dynamically allocating the
hif_napi_info structures also reduces the size of
the contiguous memory needed for the parent structure.

Change-Id: Ib2d0772cf793e25a10329169ddd8ef1dc1022e82
CRs-Fixed: 2020752
Houston Hoffman 8 年之前
父节点
当前提交
b38c10255a
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      core/hdd/src/wlan_hdd_napi.c

+ 4 - 1
core/hdd/src/wlan_hdd_napi.c

@@ -413,7 +413,10 @@ int hdd_display_napi_stats(void)
 
 	for (i = 0; i < CE_COUNT_MAX; i++)
 		if (napid->ce_map & (0x01 << i)) {
-			napii = &(napid->napis[i]);
+			napii = napid->napis[i];
+			if (!napii)
+				continue;
+
 			for (j = 0; j < num_possible_cpus(); j++) {
 				napis = &(napii->stats[j]);
 				n = 0;