diff --git a/src/r8168_n.c b/src/r8168_n.c index ef297ce..cd2780a 100755 --- a/src/r8168_n.c +++ b/src/r8168_n.c @@ -1845,7 +1845,11 @@ rtl8168_rx_vlan_skb(struct rtl8168_private *tp, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) +static netdev_features_t rtl8168_fix_features(struct net_device *dev, netdev_features_t features) +#else static u32 rtl8168_fix_features(struct net_device *dev, u32 features) +#endif { if (dev->mtu > MSSMask) features &= ~NETIF_F_ALL_TSO; @@ -1853,7 +1857,11 @@ static u32 rtl8168_fix_features(struct net_device *dev, u32 features) return features; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) +static int rtl8168_set_features(struct net_device *dev, netdev_features_t features) +#else static int rtl8168_set_features(struct net_device *dev, u32 features) +#endif { struct rtl8168_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp->mmio_addr; @@ -2229,6 +2237,7 @@ static struct ethtool_ops rtl8168_ethtool_ops = { .set_settings = rtl8168_set_settings, .get_msglevel = rtl8168_get_msglevel, .set_msglevel = rtl8168_set_msglevel, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) .get_rx_csum = rtl8168_get_rx_csum, .set_rx_csum = rtl8168_set_rx_csum, .get_tx_csum = rtl8168_get_tx_csum, @@ -2239,6 +2248,7 @@ static struct ethtool_ops rtl8168_ethtool_ops = { .get_tso = ethtool_op_get_tso, .set_tso = ethtool_op_set_tso, #endif +#endif .get_regs = rtl8168_get_regs, .get_wol = rtl8168_get_wol, .set_wol = rtl8168_set_wol,