datapath: Check for Centos 6.4 backports.
[cascardo/ovs.git] / datapath / linux / compat / include / linux / etherdevice.h
1 #ifndef __LINUX_ETHERDEVICE_WRAPPER_H
2 #define __LINUX_ETHERDEVICE_WRAPPER_H 1
3
4 #include <linux/version.h>
5 #include_next <linux/etherdevice.h>
6
7 #ifndef HAVE_ETH_HW_ADDR_RANDOM
8 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
9 static inline void eth_hw_addr_random(struct net_device *dev)
10 {
11         random_ether_addr(dev->dev_addr);
12 }
13 #elif LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
14 static inline void eth_hw_addr_random(struct net_device *dev)
15 {
16         dev_hw_addr_random(dev, dev->dev_addr);
17 }
18 #endif
19 #endif
20
21 #endif