Guest User

Fixing r8168

a guest
Aug 26th, 2013
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.46 KB | None | 0 0
  1. --- src/r8168_n.c       2013-06-17 12:42:48.000000000 +0100
  2. +++ src.good/r8168_n.c  2013-08-26 13:29:29.059243548 +0100
  3. @@ -2234,7 +2234,7 @@
  4.      }
  5.  #else
  6.      if (opts2 & RxVlanTag)
  7. -        __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
  8. +        __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
  9.  #endif
  10.  
  11.      desc->opts2 = 0;
  12. @@ -2295,7 +2295,7 @@
  13.      else
  14.          tp->cp_cmd &= ~RxChkSum;
  15.  
  16. -    if (dev->features & NETIF_F_HW_VLAN_RX)
  17. +    if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
  18.          tp->cp_cmd |= RxVlan;
  19.      else
  20.          tp->cp_cmd &= ~RxVlan;
  21. @@ -16195,7 +16195,7 @@
  22.  
  23.  #ifdef CONFIG_R8168_VLAN
  24.      if (tp->mcfg != CFG_METHOD_DEFAULT) {
  25. -        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
  26. +        dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
  27.  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
  28.          dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
  29.  #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
  30. @@ -16210,7 +16210,7 @@
  31.  #else
  32.          dev->features |= NETIF_F_RXCSUM;
  33.          dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
  34. -                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
  35. +                           NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
  36.          dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
  37.                               NETIF_F_HIGHDMA;
  38.  #endif
Advertisement
Add Comment
Please, Sign In to add comment