* [PATCH][RESEND] ARCNET: fix hard_header_len limit
@ 2015-09-17 13:18 Michael Grzeschik
2015-09-18 5:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2015-09-17 13:18 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, kernel
For arcnet the bare minimum header only contains the 4 bytes to
specify source, dest and offset (1, 1 and 2 bytes respectively).
The corresponding struct is struct arc_hardware.
The struct archdr contains additionally a union of possible soft
headers. When doing $insertusecasehere packets might well
include short (or even no?) soft headers.
For this reason only use arc_hardware instead of archdr to
determine the hard_header_len for an arcnet device.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
drivers/net/arcnet/arcnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index 10f71c73..816d0e9 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -326,7 +326,7 @@ static void arcdev_setup(struct net_device *dev)
dev->type = ARPHRD_ARCNET;
dev->netdev_ops = &arcnet_netdev_ops;
dev->header_ops = &arcnet_header_ops;
- dev->hard_header_len = sizeof(struct archdr);
+ dev->hard_header_len = sizeof(struct arc_hardware);
dev->mtu = choose_mtu();
dev->addr_len = ARCNET_ALEN;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][RESEND] ARCNET: fix hard_header_len limit
2015-09-17 13:18 [PATCH][RESEND] ARCNET: fix hard_header_len limit Michael Grzeschik
@ 2015-09-18 5:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-18 5:27 UTC (permalink / raw)
To: m.grzeschik; +Cc: netdev, linux-kernel, kernel
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Thu, 17 Sep 2015 15:18:34 +0200
> For arcnet the bare minimum header only contains the 4 bytes to
> specify source, dest and offset (1, 1 and 2 bytes respectively).
> The corresponding struct is struct arc_hardware.
>
> The struct archdr contains additionally a union of possible soft
> headers. When doing $insertusecasehere packets might well
> include short (or even no?) soft headers.
>
> For this reason only use arc_hardware instead of archdr to
> determine the hard_header_len for an arcnet device.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-18 5:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 13:18 [PATCH][RESEND] ARCNET: fix hard_header_len limit Michael Grzeschik
2015-09-18 5:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).