backports: handle no_fcs change in struct sk_buff
authorStefan Assmann <sassmann@kpanic.de>
Fri, 16 May 2014 11:21:16 +0000 (13:21 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Jun 2014 22:16:14 +0000 (00:16 +0200)
In kernel 3.4 a new field no_fcs was introduced to struct sk_buff.
Address this by putting ifdef around the code.

commit 3bdc0eba0b8b47797f4a76e377dd8360f317450f
Author: Ben Greear <greearb@candelatech.com>
Date:   Sat Feb 11 15:39:30 2012 +0000

    net: Add framework to allow sending packets with customized CRC.

git describe --contains 3bdc0eba0b8b47797f4a76e377dd8360f317450f
v3.4-rc1~177^2~207

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/0035-skb_no_fcs/INFO [new file with mode: 0644]
patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/0035-skb_no_fcs/INFO b/patches/collateral-evolutions/network/0035-skb_no_fcs/INFO
new file mode 100644 (file)
index 0000000..a242c97
--- /dev/null
@@ -0,0 +1,12 @@
+In kernel 3.4 a new field no_fcs was introduced to struct sk_buff.
+Address this by putting ifdef around the code.
+
+
+commit 3bdc0eba0b8b47797f4a76e377dd8360f317450f
+Author: Ben Greear <greearb@candelatech.com>
+Date:   Sat Feb 11 15:39:30 2012 +0000
+
+    net: Add framework to allow sending packets with customized CRC.
+
+git describe --contains 3bdc0eba0b8b47797f4a76e377dd8360f317450f
+v3.4-rc1~177^2~207
diff --git a/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch b/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch
new file mode 100644 (file)
index 0000000..d4aee27
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
+index ccd8f36..132cef8 100644
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -4768,9 +4768,10 @@ static u32 igb_tx_cmd_type(struct sk_buff *skb, u32 tx_flags)
+       cmd_type |= IGB_SET_FLAG(tx_flags, IGB_TX_FLAGS_TSTAMP,
+                                (E1000_ADVTXD_MAC_TSTAMP));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+       /* insert frame checksum */
+       cmd_type ^= IGB_SET_FLAG(skb->no_fcs, 1, E1000_ADVTXD_DCMD_IFCS);
+-
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) */
+       return cmd_type;
+ }