smsc75xx: only set mac address once on bind
authorSteve Glendinning <steve.glendinning@shawell.net>
Mon, 10 Dec 2012 01:01:19 +0000 (01:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Dec 2012 19:09:00 +0000 (14:09 -0500)
commit481705a172a1fcd483d4a90963c7593964219273
treebd567a8e72350436173bf688dbccefa1a8238eea
parent4b5511ebc7e1cf94e4f13be19c2cf3e90edc3395
smsc75xx: only set mac address once on bind

This patch changes when we decide what the device's MAC address
is from per ifconfig up to once when the device is connected.

Without this patch, a manually forced device MAC is overwritten
on ifconfig down/up.  Also devices that have no EEPROM are
assigned a new random address on ifconfig down/up instead of
persisting the same one.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Reported-by: Robert Cunningham <rcunningham@nsmsurveillance.com>
Cc: Bjorn Mork <bjorn@mork.no>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc75xx.c