From: Stanislaw Gruszka Date: Fri, 15 Jul 2011 15:50:26 +0000 (+0200) Subject: compat: add alloc_netdev_mqs X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=802463abbe2fca7e412c8373394d919d5f7bebb0;p=openwrt%2Fstaging%2Fblogic.git compat: add alloc_netdev_mqs Function was added in 2.6.38 kernel commit: commit 36909ea43814cba34f7c921e99cba33d770a54e1 Author: Tom Herbert Date: Sun Jan 9 19:36:31 2011 +0000 net: Add alloc_netdev_mqs function Emulate it using alloc_netdev_mq(), newer kernels use opposite emulation method :-) Signed-off-by: Stanislaw Gruszka --- diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index dfe12507f890..937976b3e849 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.h @@ -71,6 +71,10 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb) no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #endif +/* include/linux/netdevice.h */ +#define alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) \ + alloc_netdev_mq(sizeof_priv, name, setup, max(txqs, rxqs)) + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */ #endif /* LINUX_26_38_COMPAT_H */