summaryrefslogtreecommitdiff
path: root/net/batman-adv/hard-interface.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-02-18 11:27:34 +0100
committerAntonio Quartulli <ordex@autistici.org>2012-04-18 09:54:01 +0200
commit0d125074ebc8c971e939f8c2c8f90a80fa09aeb4 (patch)
treefb31ee069ab0a2abc7681b999839fd81392110f7 /net/batman-adv/hard-interface.c
parent1eeb479fda2405269b3a85c86ba0eca41fcc4ea0 (diff)
downloadlinux-stable-0d125074ebc8c971e939f8c2c8f90a80fa09aeb4.tar.gz
linux-stable-0d125074ebc8c971e939f8c2c8f90a80fa09aeb4.tar.bz2
linux-stable-0d125074ebc8c971e939f8c2c8f90a80fa09aeb4.zip
batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)
Instead of using sizeof(struct ethhdr) it is strongly recommended to use the kernel macro ETH_HLEN. This patch substitute each occurrence of the former expressione with the latter one. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r--net/batman-adv/hard-interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index e8c5da379a80..47c79d724ba3 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -574,8 +574,7 @@ static int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
goto err_free;
/* expect a valid ethernet header here. */
- if (unlikely(skb->mac_len != sizeof(struct ethhdr) ||
- !skb_mac_header(skb)))
+ if (unlikely(skb->mac_len != ETH_HLEN || !skb_mac_header(skb)))
goto err_free;
if (!hard_iface->soft_iface)