diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 378777e11e94..5c5a551fe630 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -484,9 +484,14 @@ struct net_device int padded; }; +#define NETDEV_ALIGN 32 +#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) + static inline void *netdev_priv(struct net_device *dev) { - return (char *)dev + ((sizeof(struct net_device) + 31) & ~31); + return (char *)dev + ((sizeof(struct net_device) + + NETDEV_ALIGN_CONST) + & ~NETDEV_ALIGN_CONST); } #define SET_MODULE_OWNER(dev) do { } while (0) |
