* [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN definitions
@ 2014-04-03 16:08 Josh Boyer
2014-04-03 16:32 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2014-04-03 16:08 UTC (permalink / raw)
To: David S. Miller, Mugunthan V N; +Cc: netdev, linux-kernel
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 <jwboyer@fedoraproject.org>
---
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 <linux/err.h>
#include <linux/if.h>
+#include <linux/if_ether.h>
+#include <linux/if_vlan.h>
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <linux/net_tstamp.h>
--
1.8.5.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN definitions
2014-04-03 16:08 [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN definitions Josh Boyer
@ 2014-04-03 16:32 ` David Miller
2014-04-03 16:35 ` Josh Boyer
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2014-04-03 16:32 UTC (permalink / raw)
To: jwboyer; +Cc: mugunthanvnm, netdev, linux-kernel
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Thu, 3 Apr 2014 12:08:43 -0400
> 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 <jwboyer@fedoraproject.org>
A patch for this was already submitted to netdev and applied to the 'net'
GIT tree earlier today.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN definitions
2014-04-03 16:32 ` David Miller
@ 2014-04-03 16:35 ` Josh Boyer
0 siblings, 0 replies; 3+ messages in thread
From: Josh Boyer @ 2014-04-03 16:35 UTC (permalink / raw)
To: David Miller; +Cc: mugunthanvnm, netdev, Linux-Kernel@Vger. Kernel. Org
On Thu, Apr 3, 2014 at 12:32 PM, David Miller <davem@davemloft.net> wrote:
> From: Josh Boyer <jwboyer@fedoraproject.org>
> Date: Thu, 3 Apr 2014 12:08:43 -0400
>
>> 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 <jwboyer@fedoraproject.org>
>
> A patch for this was already submitted to netdev and applied to the 'net'
> GIT tree earlier today.
Ah, great. Glad it's covered. Thanks.
josh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-03 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 16:08 [PATCH] net: cpts: Add includes for ETH_HLEN and VLAN_HLEN definitions Josh Boyer
2014-04-03 16:32 ` David Miller
2014-04-03 16:35 ` Josh Boyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.