diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-12-09 00:06:15 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-12-09 00:06:15 +0300 |
commit | 8780e9b106964f1f271748165dac10122ee6c620 (patch) | |
tree | 046336bf848771fd8494e4c054feb22c261d5693 | |
parent | faf40d498c6f519ea24e4063c2e64b8e9581cbbb (diff) | |
download | accel-ppp-8780e9b106964f1f271748165dac10122ee6c620.tar.gz accel-ppp-8780e9b106964f1f271748165dac10122ee6c620.zip |
ipoe: support for kernels 3.16-3.18
-rw-r--r-- | drivers/ipoe/ipoe.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index b353fbc..57da2c2 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -152,6 +152,11 @@ static struct genl_family ipoe_nl_family; static struct genl_multicast_group ipoe_nl_mcg; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) +#define u64_stats_fetch_begin_bh u64_stats_fetch_begin_irq +#define u64_stats_fetch_retry_bh u64_stats_fetch_retry_irq +#endif + static inline int hash_addr(__be32 addr) { #ifdef __LITTLE_ENDIAN @@ -1168,7 +1173,11 @@ static int ipoe_create(__be32 peer_addr, __be32 addr, const char *link_ifname, c sprintf(name, "ipoe%%d"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) + dev = alloc_netdev(sizeof(*ses), name, NET_NAME_UNKNOWN, ipoe_netdev_setup); +#else dev = alloc_netdev(sizeof(*ses), name, ipoe_netdev_setup); +#endif if (dev == NULL) { r = -ENOMEM; goto failed; |