Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66641
b: refs/heads/master
c: 73f8318
h: refs/heads/master
i:
  66639: 76dcd8a
v: v3
  • Loading branch information
Alex Landau authored and David S. Miller committed Oct 10, 2007
1 parent 2265e7d commit f523f8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: 1a7eb72b68c1c6a00a237bc242885222ab74536f
refs/heads/master: 73f83182862a2c9113421720997c75ee939902f8
13 changes: 12 additions & 1 deletion trunk/drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void setup_system_regs(struct net_device *dev)
bfin_write_DMA1_Y_MODIFY(0);
}

void setup_mac_addr(u8 * mac_addr)
static void setup_mac_addr(u8 *mac_addr)
{
u32 addr_low = le32_to_cpu(*(__le32 *) & mac_addr[0]);
u16 addr_hi = le16_to_cpu(*(__le16 *) & mac_addr[4]);
Expand All @@ -473,6 +473,16 @@ void setup_mac_addr(u8 * mac_addr)
bfin_write_EMAC_ADDRHI(addr_hi);
}

static int bf537mac_set_mac_address(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
if (netif_running(dev))
return -EBUSY;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
setup_mac_addr(dev->dev_addr);
return 0;
}

static void adjust_tx_list(void)
{
int timeout_cnt = MAX_TIMEOUT_CNT;
Expand Down Expand Up @@ -876,6 +886,7 @@ static int __init bf537mac_probe(struct net_device *dev)
dev->open = bf537mac_open;
dev->stop = bf537mac_close;
dev->hard_start_xmit = bf537mac_hard_start_xmit;
dev->set_mac_address = bf537mac_set_mac_address;
dev->tx_timeout = bf537mac_timeout;
dev->set_multicast_list = bf537mac_set_multicast_list;
#ifdef CONFIG_NET_POLL_CONTROLLER
Expand Down

0 comments on commit f523f8f

Please sign in to comment.