]> git.pld-linux.org Git - packages/r8168.git/blob - linux-3.10.patch
- up to 8.036.00
[packages/r8168.git] / linux-3.10.patch
1 Author: Ko Matsumura <minaco2@gmail.com>
2 Description: add kernel 3.10 support
3 Origin: other, https://code.google.com/p/r8168/issues/detail?id=15#c1
4 Bug-Debian: http://bugs.debian.org/717161
5
6 --- a/src/r8168_n.c     2013-06-17 20:42:48.000000000 +0900
7 +++ b/src/r8168_n.c     2013-07-21 00:20:02.000000000 +0900
8 @@ -52,6 +52,10 @@
9  #include <linux/init.h>
10  #include <linux/rtnetlink.h>
11  
12 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
13 +#include <uapi/linux/if_ether.h>
14 +#endif
15 +
16  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
17  #include <linux/pci-aspm.h>
18  #endif
19 @@ -2232,6 +2236,9 @@
20                                 swab16(opts2 & 0xffff));
21          ret = 0;
22      }
23 +#elif  LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
24 +    if (opts2 & RxVlanTag)
25 +        __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
26  #else
27      if (opts2 & RxVlanTag)
28          __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
29 @@ -2294,8 +2301,11 @@
30          tp->cp_cmd |= RxChkSum;
31      else
32          tp->cp_cmd &= ~RxChkSum;
33 -
34 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
35 +    if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
36 +#else
37      if (dev->features & NETIF_F_HW_VLAN_RX)
38 +#endif
39          tp->cp_cmd |= RxVlan;
40      else
41          tp->cp_cmd &= ~RxVlan;
42 @@ -16195,7 +16205,11 @@
43  
44  #ifdef CONFIG_R8168_VLAN
45      if (tp->mcfg != CFG_METHOD_DEFAULT) {
46 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
47 +        dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
48 +#else
49          dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
50 +#endif
51  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
52          dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
53  #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
54 @@ -16209,8 +16223,13 @@
55          tp->cp_cmd |= RxChkSum;
56  #else
57          dev->features |= NETIF_F_RXCSUM;
58 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
59 +        dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
60 +                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
61 +#else
62          dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
63                             NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
64 +#endif
65          dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
66                               NETIF_F_HIGHDMA;
67  #endif
This page took 0.02496 seconds and 3 git commands to generate.