Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35706
b: refs/heads/master
c: bf61f50
h: refs/heads/master
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Sep 26, 2006
1 parent 4f9c014 commit 1b5ce55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 602cc2418177a5b80f533f569e5a42c4495988c9
refs/heads/master: bf61f50d63b4d9e30d7a86a2d44bb300ae7c1dd4
14 changes: 6 additions & 8 deletions trunk/arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
#include "irq_user.h"
#include "irq_kern.h"

static inline void set_ether_mac(struct net_device *dev, unsigned char *addr)
{
memcpy(dev->dev_addr, addr, ETH_ALEN);
}

#define DRIVER_NAME "uml-netdev"

static DEFINE_SPINLOCK(opened_lock);
Expand Down Expand Up @@ -242,7 +247,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr)
struct sockaddr *hwaddr = addr;

spin_lock(&lp->lock);
memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN);
set_ether_mac(dev, hwaddr->sa_data);
spin_unlock(&lp->lock);

return(0);
Expand Down Expand Up @@ -790,13 +795,6 @@ void dev_ip_addr(void *d, unsigned char *bin_buf)
memcpy(bin_buf, &in->ifa_address, sizeof(in->ifa_address));
}

void set_ether_mac(void *d, unsigned char *addr)
{
struct net_device *dev = d;

memcpy(dev->dev_addr, addr, ETH_ALEN);
}

struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra)
{
if((skb != NULL) && (skb_tailroom(skb) < extra)){
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/include/net_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct net_user_info {

extern void ether_user_init(void *data, void *dev);
extern void dev_ip_addr(void *d, unsigned char *bin_buf);
extern void set_ether_mac(void *d, unsigned char *addr);
extern void iter_addresses(void *d, void (*cb)(unsigned char *,
unsigned char *, void *),
void *arg);
Expand Down

0 comments on commit 1b5ce55

Please sign in to comment.