X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fnetdevice.h;h=d79163208dfdbff7dfc5ac825da9e2d8aec91453;hb=cc09ee80c3b18ae1a897a30a17fe710b2b2f620a;hp=7c41593c1d6a226a39e7fb3fc0be4fdad5ed3d00;hpb=89594c746b00d3755e0792a2407f0b557a30ef37;p=linux-2.6-microblaze.git diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c41593c1d6a..d79163208dfd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4641,6 +4641,24 @@ void __hw_addr_unsync_dev(struct netdev_hw_addr_list *list, void __hw_addr_init(struct netdev_hw_addr_list *list); /* Functions used for device addresses handling */ +static inline void +__dev_addr_set(struct net_device *dev, const u8 *addr, size_t len) +{ + memcpy(dev->dev_addr, addr, len); +} + +static inline void dev_addr_set(struct net_device *dev, const u8 *addr) +{ + __dev_addr_set(dev, addr, dev->addr_len); +} + +static inline void +dev_addr_mod(struct net_device *dev, unsigned int offset, + const u8 *addr, size_t len) +{ + memcpy(&dev->dev_addr[offset], addr, len); +} + int dev_addr_add(struct net_device *dev, const unsigned char *addr, unsigned char addr_type); int dev_addr_del(struct net_device *dev, const unsigned char *addr,