Merge lp:~homemadejam/ubuntu/saucy/r8168/fix-for-linux3.10 into lp:ubuntu/saucy/r8168

Proposed by Edb
Status: Work in progress
Proposed branch: lp:~homemadejam/ubuntu/saucy/r8168/fix-for-linux3.10
Merge into: lp:ubuntu/saucy/r8168
Diff against target: 81 lines (+32/-0)
2 files modified
debian/changelog (+12/-0)
src/r8168_n.c (+20/-0)
To merge this branch: bzr merge lp:~homemadejam/ubuntu/saucy/r8168/fix-for-linux3.10
Reviewer Review Type Date Requested Status
Robie Basak Needs Information
Ubuntu branches Pending
Review via email: mp+182485@code.launchpad.net

Description of the change

* kernel-3.10 patch: Fixing building the module for kernel 3.10+ which has
  NETIF_F_HW_{RX,TX} defines renamed to NETIF_F_HW_VLAN_{RX,TX}.
* also for 3.10: fixing parameters to __vlan_hwaccel_put_tag which
  now requires the protocol to be specified.
* Closes #1216906 using patch by anonymous damian posted at
  http://code.google.com/p/r8168/issues/detail?id=13

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

I've commented on the bug. Since the DKMS package installs and successfully compiles on Saucy right now, it isn't clear to me what needs to be merged. Could you please clarify if this merge proposal is still relevant?

review: Needs Information

Unmerged revisions

13. By Edb

* kernel-3.10 patch: Fixing building the module for kernel 3.10+ which has
  NETIF_F_HW_{RX,TX} defines renamed to NETIF_F_HW_VLAN_{RX,TX}.
* also for 3.10: fixing parameters to __vlan_hwaccel_put_tag which
  now requires the protocol to be specified.
* Closes #1216906 using patch by anonymous damian posted at
  http://code.google.com/p/r8168/issues/detail?id=13

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-05-07 10:02:12 +0000
3+++ debian/changelog 2013-08-27 20:06:42 +0000
4@@ -1,3 +1,15 @@
5+r8168 (8.035.00-2ubuntu2) UNRELEASED; urgency=medium
6+
7+ * kernel-3.10 patch: Fixing building the module for kernel 3.10+ which has
8+ NETIF_F_HW_{RX,TX} defines renamed to NETIF_F_HW_VLAN_{RX,TX}.
9+ * also for 3.10: fixing parameters to __vlan_hwaccel_put_tag which
10+ now requires the protocol to be specified.
11+ * Closes #1216906 using patch by anonymous damian posted at
12+ http://code.google.com/p/r8168/issues/detail?id=13
13+
14+
15+ -- ed <ed@brussels> Tue, 27 Aug 2013 20:51:52 +0100
16+
17 r8168 (8.035.00-2) unstable; urgency=low
18
19 * kernel-3.8.patch: New, fix building the module for kernel 3.8+ that has
20
21=== modified file 'src/r8168_n.c'
22--- src/r8168_n.c 2013-05-07 10:02:12 +0000
23+++ src/r8168_n.c 2013-08-27 20:06:42 +0000
24@@ -53,6 +53,10 @@
25 #include <linux/init.h>
26 #include <linux/rtnetlink.h>
27
28+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
29+#include <uapi/linux/if_ether.h>
30+#endif
31+
32 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
33 #include <linux/pci-aspm.h>
34 #endif
35@@ -2079,6 +2083,9 @@
36 swab16(opts2 & 0xffff));
37 ret = 0;
38 }
39+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
40+ if (opts2 & RxVlanTag)
41+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
42 #else
43 if (opts2 & RxVlanTag)
44 __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
45@@ -2140,7 +2147,11 @@
46 else
47 tp->cp_cmd &= ~RxChkSum;
48
49+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
50+ if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
51+#else
52 if (dev->features & NETIF_F_HW_VLAN_RX)
53+#endif
54 tp->cp_cmd |= RxVlan;
55 else
56 tp->cp_cmd &= ~RxVlan;
57@@ -15061,7 +15072,11 @@
58
59 #ifdef CONFIG_R8168_VLAN
60 if (tp->mcfg != CFG_METHOD_DEFAULT) {
61+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
62+ dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
63+#else
64 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
65+#endif
66 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
67 dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
68 #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
69@@ -15076,7 +15091,12 @@
70 #else
71 dev->features |= NETIF_F_RXCSUM;
72 dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
73+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
74+ NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
75+#else
76 NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
77+#endif
78+
79 dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
80 NETIF_F_HIGHDMA;
81 #endif

Subscribers

People subscribed via source and target branches

to all changes: