summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/micrel/ks8851_mll.c
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-02-15 10:45:40 +0400
committerDavid S. Miller <davem@davemloft.net>2012-02-16 00:34:17 +0400
commit7ce5d222190cb3ce3ae88bafde7c4fa52a5103e0 (patch)
tree2b284365b7a2e11d4ba286a589bd35bc39918805 /drivers/net/ethernet/micrel/ks8851_mll.c
parentf2cedb63df14342ad40a8b5b324fc5d94a60b665 (diff)
downloadlinux-7ce5d222190cb3ce3ae88bafde7c4fa52a5103e0.tar.xz
net: use eth_hw_addr_random() and reset addr_assign_type
Use eth_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM. Reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel/ks8851_mll.c')
-rw-r--r--drivers/net/ethernet/micrel/ks8851_mll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 3d9a04e7b49d..180460f4e41f 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1241,6 +1241,7 @@ static int ks_set_mac_address(struct net_device *netdev, void *paddr)
struct sockaddr *addr = paddr;
u8 *da;
+ netdev->addr_assign_type &= ~NET_ADDR_RANDOM;
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
da = (u8 *)netdev->dev_addr;