diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-17 05:43:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-17 15:58:06 -0500 |
commit | 6a214fd4142d585ef2226e8ef6bc29a15403506f (patch) | |
tree | b68498a0b99aae6269ddc84e8e4baf7586e20e99 /drivers/net/ethernet/atheros/atlx/atlx.c | |
parent | 939d2254fc259fd5ca0872f96b56f6966d804e24 (diff) | |
download | op-kernel-dev-6a214fd4142d585ef2226e8ef6bc29a15403506f.zip op-kernel-dev-6a214fd4142d585ef2226e8ef6bc29a15403506f.tar.gz |
atheros eth: set addr_assign_type if random_ether_addr() used
Set addr_assign_type correctly to NET_ADDR_RANDOM in case
a random MAC address was generated and assigned to the netdevice.
Fix error handling in atl1c_probe(). If atl1c_read_mac_addr()
couldn't get the hw mac address, and a random mac address get
set return the error code. Don't go to err_eeprom in
atl1c_probe(), use the generated MAC address in this case.
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
v2: use bitops
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx/atlx.c')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atlx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c index 8ff7411..3cd8837 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.c +++ b/drivers/net/ethernet/atheros/atlx/atlx.c @@ -84,6 +84,7 @@ static int atlx_set_mac(struct net_device *netdev, void *p) memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); memcpy(adapter->hw.mac_addr, addr->sa_data, netdev->addr_len); + netdev->addr_assign_type &= ~NET_ADDR_RANDOM; atlx_set_mac_addr(&adapter->hw); return 0; |