[PATCH] ARCNET: fix hard_header_len limit

Michael Grzeschik
2015-07-30T13:35:07Z

The commit <9c7077622dd9> ("packet: make packet_snd fail on len smaller
than l2 header") adds the check for minimum packet length of the used l2.
For arcnet the hardware header length is not the complete archdr which
includes hard + soft header. This patch changes the length to
sizeof(arc_hardware).

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.1.4