diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-09-26 02:33:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:49:09 -0400 |
commit | bf61f50d63b4d9e30d7a86a2d44bb300ae7c1dd4 (patch) | |
tree | 0dff810d2cecf8ab8175ca3af8d81cef100d7f84 /arch/um | |
parent | 602cc2418177a5b80f533f569e5a42c4495988c9 (diff) |
[PATCH] uml: clean our set_ether_mac
Clean set_ether_mac usage. Maybe could also be removed, but surely it can't
be a global function taking a void* argument.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/net_kern.c | 14 | ||||
-rw-r--r-- | arch/um/include/net_user.h | 1 |
2 files changed, 6 insertions, 9 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 | ||
34 | static 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 | ||
36 | static DEFINE_SPINLOCK(opened_lock); | 41 | static 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 | ||
793 | void 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 | |||
800 | struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra) | 798 | struct 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)){ |
diff --git a/arch/um/include/net_user.h b/arch/um/include/net_user.h index 800c403920bc..47ef7cb49a8e 100644 --- a/arch/um/include/net_user.h +++ b/arch/um/include/net_user.h | |||
@@ -26,7 +26,6 @@ struct net_user_info { | |||
26 | 26 | ||
27 | extern void ether_user_init(void *data, void *dev); | 27 | extern void ether_user_init(void *data, void *dev); |
28 | extern void dev_ip_addr(void *d, unsigned char *bin_buf); | 28 | extern void dev_ip_addr(void *d, unsigned char *bin_buf); |
29 | extern void set_ether_mac(void *d, unsigned char *addr); | ||
30 | extern void iter_addresses(void *d, void (*cb)(unsigned char *, | 29 | extern void iter_addresses(void *d, void (*cb)(unsigned char *, |
31 | unsigned char *, void *), | 30 | unsigned char *, void *), |
32 | void *arg); | 31 | void *arg); |