diff options
| author | Dmitry Torokhov <[email protected]> | 2015-01-15 09:46:14 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2015-01-15 09:46:14 -0800 |
| commit | 0c49cd295d42d0032af11d55e2140dbec11dc8d0 (patch) | |
| tree | 1e7d0e50b6b6d6e4de1fb6bb0b6d856c3932da58 /include/linux/etherdevice.h | |
| parent | 0c3e99437a66e4c869c60c2398449e6d98f3a988 (diff) | |
| parent | eaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff) | |
Merge tag 'v3.19-rc4' into next
Merge with mainline to bring in the latest thermal and other changes.
Diffstat (limited to 'include/linux/etherdevice.h')
| -rw-r--r-- | include/linux/etherdevice.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 9c5529dc6d07..41c891d05f04 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -29,6 +29,7 @@ #include <asm/bitsperlong.h> #ifdef __KERNEL__ +u32 eth_get_headlen(void *data, unsigned int max_len); __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); extern const struct header_ops eth_header_ops; @@ -391,4 +392,16 @@ static inline unsigned long compare_ether_header(const void *a, const void *b) #endif } +/** + * eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame + * @skb: Buffer to pad + * + * An Ethernet frame should have a minimum size of 60 bytes. This function + * takes short frames and pads them with zeros up to the 60 byte limit. + */ +static inline int eth_skb_pad(struct sk_buff *skb) +{ + return skb_put_padto(skb, ETH_ZLEN); +} + #endif /* _LINUX_ETHERDEVICE_H */ |