Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux...
[cascardo/linux.git] / include / linux / if_arp.h
index 89b4614..f563907 100644 (file)
@@ -33,7 +33,15 @@ static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
 
 static inline int arp_hdr_len(struct net_device *dev)
 {
-       /* ARP header, plus 2 device addresses, plus 2 IP addresses. */
-       return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
+       switch (dev->type) {
+#if IS_ENABLED(CONFIG_FIREWIRE_NET)
+       case ARPHRD_IEEE1394:
+               /* ARP header, device address and 2 IP addresses */
+               return sizeof(struct arphdr) + dev->addr_len + sizeof(u32) * 2;
+#endif
+       default:
+               /* ARP header, plus 2 device addresses, plus 2 IP addresses. */
+               return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
+       }
 }
 #endif /* _LINUX_IF_ARP_H */