Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 478650
Collapse All | Expand All

(-)a/src/r8168_n.c (-1 / +20 lines)
Lines 52-57 Link Here
52
#include <linux/init.h>
52
#include <linux/init.h>
53
#include <linux/rtnetlink.h>
53
#include <linux/rtnetlink.h>
54
54
55
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
56
#include <uapi/linux/if_ether.h>
57
#endif
58
55
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
59
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
56
#include <linux/pci-aspm.h>
60
#include <linux/pci-aspm.h>
57
#endif
61
#endif
Lines 2232-2237 Link Here
2232
                               swab16(opts2 & 0xffff));
2236
                               swab16(opts2 & 0xffff));
2233
        ret = 0;
2237
        ret = 0;
2234
    }
2238
    }
2239
#elif  LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
2240
    if (opts2 & RxVlanTag)
2241
        __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
2235
#else
2242
#else
2236
    if (opts2 & RxVlanTag)
2243
    if (opts2 & RxVlanTag)
2237
        __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
2244
        __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
Lines 2294-2301 Link Here
2294
        tp->cp_cmd |= RxChkSum;
2301
        tp->cp_cmd |= RxChkSum;
2295
    else
2302
    else
2296
        tp->cp_cmd &= ~RxChkSum;
2303
        tp->cp_cmd &= ~RxChkSum;
2297
2304
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
2305
    if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
2306
#else
2298
    if (dev->features & NETIF_F_HW_VLAN_RX)
2307
    if (dev->features & NETIF_F_HW_VLAN_RX)
2308
#endif
2299
        tp->cp_cmd |= RxVlan;
2309
        tp->cp_cmd |= RxVlan;
2300
    else
2310
    else
2301
        tp->cp_cmd &= ~RxVlan;
2311
        tp->cp_cmd &= ~RxVlan;
Lines 16195-16201 Link Here
16195
16205
16196
#ifdef CONFIG_R8168_VLAN
16206
#ifdef CONFIG_R8168_VLAN
16197
    if (tp->mcfg != CFG_METHOD_DEFAULT) {
16207
    if (tp->mcfg != CFG_METHOD_DEFAULT) {
16208
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
16209
        dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
16210
#else
16198
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
16211
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
16212
#endif
16199
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
16213
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
16200
        dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
16214
        dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
16201
#endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
16215
#endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
Lines 16209-16216 Link Here
16209
        tp->cp_cmd |= RxChkSum;
16223
        tp->cp_cmd |= RxChkSum;
16210
#else
16224
#else
16211
        dev->features |= NETIF_F_RXCSUM;
16225
        dev->features |= NETIF_F_RXCSUM;
16226
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
16227
        dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
16228
                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
16229
#else
16212
        dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
16230
        dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
16213
                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
16231
                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
16232
#endif
16214
        dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
16233
        dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
16215
                             NETIF_F_HIGHDMA;
16234
                             NETIF_F_HIGHDMA;
16216
#endif
16235
#endif

Return to bug 478650