]> git.baikalelectronics.ru Git - kernel.git/commit
atheros eth: set addr_assign_type if random_ether_addr() used
authorDanny Kukawka <danny.kukawka@bisect.de>
Fri, 17 Feb 2012 05:43:30 +0000 (05:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2012 20:58:06 +0000 (15:58 -0500)
commitd08681c58121d16c8838f594da843845f232fa63
treeb68498a0b99aae6269ddc84e8e4baf7586e20e99
parenta499175f4791e38ee8c73519cfe52ffde6f948dd
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>
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
drivers/net/ethernet/atheros/atl1c/atl1c_main.c
drivers/net/ethernet/atheros/atlx/atl1.c
drivers/net/ethernet/atheros/atlx/atlx.c