From: Stefan Assmann Date: Fri, 16 May 2014 11:21:16 +0000 (+0200) Subject: backports: handle no_fcs change in struct sk_buff X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b84a68f567584135d433111daca2bcb23b5f98cf;p=openwrt%2Fstaging%2Fblogic.git backports: handle no_fcs change in struct sk_buff 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 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 Signed-off-by: Hauke Mehrtens --- 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 index 000000000000..a242c97ea220 --- /dev/null +++ b/patches/collateral-evolutions/network/0035-skb_no_fcs/INFO @@ -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 +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 index 000000000000..d4aee27ae38b --- /dev/null +++ b/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch @@ -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; + } +