1 #include <linux/version.h>
2 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
4 #include <linux/netdevice.h>
7 void dev_disable_lro(struct net_device *dev) { }
10 #include <linux/ethtool.h>
13 * dev_disable_lro - disable Large Receive Offload on a device
16 * Disable Large Receive Offload (LRO) on a net device. Must be
17 * called under RTNL. This is needed if received packets may be
18 * forwarded to another interface.
20 void dev_disable_lro(struct net_device *dev)
22 if (dev->ethtool_ops && dev->ethtool_ops->get_flags &&
23 dev->ethtool_ops->set_flags) {
24 u32 flags = dev->ethtool_ops->get_flags(dev);
25 if (flags & ETH_FLAG_LRO) {
26 flags &= ~ETH_FLAG_LRO;
27 dev->ethtool_ops->set_flags(dev, flags);
30 WARN_ON(dev->features & NETIF_F_LRO);
33 #endif /* NETIF_F_LRO */
35 #endif /* kernel < 2.6.27 */