qcacmn: 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: I58044e5b1d0a834b3b6d17f66d6f4b2462873f2a
CRs-Fixed: 2016355
This commit is contained in:
Houston Hoffman
2017-03-08 15:57:54 -08:00
committed by snandini
parent 99868ac3ca
commit eab19b3b61
2 changed files with 91 additions and 30 deletions

View File

@@ -263,11 +263,12 @@ struct qca_napi_cpu {
struct qca_napi_data {
qdf_spinlock_t lock;
uint32_t state;
/* bitmap of created/registered NAPI instances, indexed by pipe_id,
* not used by clients (clients use an id returned by create)
*/
uint32_t ce_map;
struct qca_napi_info napis[CE_COUNT_MAX];
struct qca_napi_info *napis[CE_COUNT_MAX];
struct qca_napi_cpu napi_cpu[NR_CPUS];
int lilcl_head, bigcl_head;
enum qca_napi_tput_state napi_mode;