aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/net_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-rw-r--r--arch/um/drivers/net_kern.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 501f95675d89..4a7966b21931 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -31,6 +31,11 @@
31#include "irq_user.h" 31#include "irq_user.h"
32#include "irq_kern.h" 32#include "irq_kern.h"
33 33
34static inline void set_ether_mac(struct net_device *dev, unsigned char *addr)
35{
36 memcpy(dev->dev_addr, addr, ETH_ALEN);
37}
38
34#define DRIVER_NAME "uml-netdev" 39#define DRIVER_NAME "uml-netdev"
35 40
36static DEFINE_SPINLOCK(opened_lock); 41static DEFINE_SPINLOCK(opened_lock);
@@ -242,7 +247,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr)
242 struct sockaddr *hwaddr = addr; 247 struct sockaddr *hwaddr = addr;
243 248
244 spin_lock(&lp->lock); 249 spin_lock(&lp->lock);
245 memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN); 250 set_ether_mac(dev, hwaddr->sa_data);
246 spin_unlock(&lp->lock); 251 spin_unlock(&lp->lock);
247 252
248 return(0); 253 return(0);
@@ -790,13 +795,6 @@ void dev_ip_addr(void *d, unsigned char *bin_buf)
790 memcpy(bin_buf, &in->ifa_address, sizeof(in->ifa_address)); 795 memcpy(bin_buf, &in->ifa_address, sizeof(in->ifa_address));
791} 796}
792 797
793void set_ether_mac(void *d, unsigned char *addr)
794{
795 struct net_device *dev = d;
796
797 memcpy(dev->dev_addr, addr, ETH_ALEN);
798}
799
800struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra) 798struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra)
801{ 799{
802 if((skb != NULL) && (skb_tailroom(skb) < extra)){ 800 if((skb != NULL) && (skb_tailroom(skb) < extra)){