Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172069
b: refs/heads/master
c: ca9e498
h: refs/heads/master
i:
  172067: 244914f
v: v3
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Dec 2, 2009
1 parent e6f5b8e commit e27e01a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35a652859ad76d8bd989025952ecb80d7c5304a4
refs/heads/master: ca9e4988ccbde3b11116679f1b023eb75df8017e
7 changes: 7 additions & 0 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ static int be_mac_addr_set(struct net_device *netdev, void *p)
struct sockaddr *addr = p;
int status = 0;

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

status = be_cmd_pmac_del(adapter, adapter->if_handle, adapter->pmac_id);
if (status)
return status;
Expand Down Expand Up @@ -2146,6 +2149,10 @@ static int be_get_config(struct be_adapter *adapter)
MAC_ADDRESS_TYPE_NETWORK, true /*permanent */, 0);
if (status)
return status;

if (!is_valid_ether_addr(mac))
return -EADDRNOTAVAIL;

memcpy(adapter->netdev->dev_addr, mac, ETH_ALEN);
memcpy(adapter->netdev->perm_addr, mac, ETH_ALEN);

Expand Down

0 comments on commit e27e01a

Please sign in to comment.