Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290459
b: refs/heads/master
c: 66dc92e
h: refs/heads/master
i:
  290457: 1222264
  290455: 79b1064
v: v3
  • Loading branch information
Danny Kukawka authored and David S. Miller committed Feb 24, 2012
1 parent 0bfb333 commit 5ee6c4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: f27fd49962dc0f608e5547fc7ae98a8243570610
refs/heads/master: 66dc92eddf610d6f4572367f42902e62e19db7cb
12 changes: 8 additions & 4 deletions trunk/drivers/net/ethernet/cirrus/mac89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,14 @@ static void set_multicast_list(struct net_device *dev)
static int set_mac_address(struct net_device *dev, void *addr)
{
int i;
printk("%s: Setting MAC address to ", dev->name);
for (i = 0; i < 6; i++)
printk(" %2.2x", dev->dev_addr[i] = ((unsigned char *)addr)[i]);
printk(".\n");
struct sockaddr *saddr = addr;

if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;

memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr);

/* set the Ethernet address */
for (i=0; i < ETH_ALEN/2; i++)
writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8));
Expand Down

0 comments on commit 5ee6c4c

Please sign in to comment.