Search Linux Wireless

[PATCH] compat: fix build error in init_dummy_netdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In kernel <= 2.6.28 the member napi_list in struct net_device is only
availabe if CONFIG_NETPOLL is set. We should initialize it only if it
is available.

This should fix the problem reported by Philip.

This should also go into stable.

CC: philipp_subx@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 compat/compat-2.6.29.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compat/compat-2.6.29.c b/compat/compat-2.6.29.c
index bc4288f..cded3cc 100644
--- a/compat/compat-2.6.29.c
+++ b/compat/compat-2.6.29.c
@@ -153,8 +153,10 @@ int init_dummy_netdev(struct net_device *dev)
 	/* initialize the ref count */
 	atomic_set(&dev->refcnt, 1);
 
+#ifdef CONFIG_NETPOLL
 	/* NAPI wants this */
 	INIT_LIST_HEAD(&dev->napi_list);
+#endif
 
 	/* a dummy interface is started by default */
 	set_bit(__LINK_STATE_PRESENT, &dev->state);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux