From 4371a55a3793a5571704059f9d1e2506052d359e Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 3 Apr 2014 12:09:08 -0400 Subject: [PATCH] Fix build of ti ethernet driver on ARM. Sigh. --- kernel.spec | 2 + ...ludes-for-ETH_HLEN-and-VLAN_HLEN-def.patch | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch diff --git a/kernel.spec b/kernel.spec index fc21b18c5..ef89f4489 100644 --- a/kernel.spec +++ b/kernel.spec @@ -639,6 +639,7 @@ Patch25036: ppc64le_module_fix.patch Patch25055: net-enic-include-irq.h-for-irqreturn_t-definitions.patch Patch25056: net-bnx2x-include-irq.h-for-irqreturn_t-definitions.patch Patch25057: net-qlcnic-include-irq.h-for-irq-definitions.patch +Patch25058: net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch Patch25059: btrfs-fix-lockdep-warning-with-reclaim-lock-inversion.patch # END OF PATCH DEFINITIONS @@ -1285,6 +1286,7 @@ ApplyPatch ppc64le_module_fix.patch ApplyPatch net-enic-include-irq.h-for-irqreturn_t-definitions.patch ApplyPatch net-bnx2x-include-irq.h-for-irqreturn_t-definitions.patch ApplyPatch net-qlcnic-include-irq.h-for-irq-definitions.patch +ApplyPatch net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch ApplyPatch btrfs-fix-lockdep-warning-with-reclaim-lock-inversion.patch # END OF PATCH APPLICATIONS diff --git a/net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch b/net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch new file mode 100644 index 000000000..8b5b37b40 --- /dev/null +++ b/net-cpts-Add-includes-for-ETH_HLEN-and-VLAN_HLEN-def.patch @@ -0,0 +1,40 @@ +From 54ae981b710324ddc190ed5eab97f265bdf402c5 Mon Sep 17 00:00:00 2001 +From: Josh Boyer +Date: Thu, 3 Apr 2014 11:39:15 -0400 +Subject: [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN + definitions + +If CONFIG_TI_CPTS is enabled, the ti_cpsw driver will fail to build with: + +drivers/net/ethernet/ti/cpts.c: In function 'cpts_match': +drivers/net/ethernet/ti/cpts.c:266:12: error: 'ETH_HLEN' undeclared (first use in this function) + offset = ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN; + ^ +drivers/net/ethernet/ti/cpts.c:266:12: note: each undeclared identifier is reported only once for each function it appears in +drivers/net/ethernet/ti/cpts.c:276:23: error: 'VLAN_HLEN' undeclared (first use in this function) + offset = ETH_HLEN + VLAN_HLEN; + ^ + +Add includes of if_ether.h and if_vlan.h to bring in the appropriate defines. + +Signed-off-by: Josh Boyer +--- + drivers/net/ethernet/ti/cpts.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c +index a3bbf59eaafd..2a2f82ae0c1d 100644 +--- a/drivers/net/ethernet/ti/cpts.c ++++ b/drivers/net/ethernet/ti/cpts.c +@@ -19,6 +19,8 @@ + */ + #include + #include ++#include ++#include + #include + #include + #include +-- +1.8.5.3 +