]> bbs.cooldavid.org Git - net-next-2.6.git/commit
smsc95xx: generate random MAC address once, not every ifup
authorBernard Blackham <bernard@largestprime.net>
Mon, 18 Oct 2010 13:16:39 +0000 (13:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 10:09:48 +0000 (03:09 -0700)
commitf4e8ab7cc4e819011ca6325e54383b3da7a5d130
tree0a8587e0cafd2a436ff3b3fde7881048c9e4cf9a
parentfdb246f526e422b18b48d578085c01ab28ec2c33
smsc95xx: generate random MAC address once, not every ifup

The smsc95xx driver currently generates a new random MAC address
every time the interface is brought up. This makes it impossible to
override using the standard `ifconfig hw ether` approach.

Past patches tried to make the MAC address a module parameter or
base it off the die ID, but it seems to me much simpler (and
hopefully less controversial) to stick with the current random
generation scheme, but allow the user to change the address.

This patch does exactly that - it moves the random address
generation from smsc95xx_reset() into smsc95xx_bind(), so that it is
done once on module load, not on every ifup. The user can then
override this using the standard mechanisms.

Applies against 2.6.35 and linux-2.6 head.

Signed-off-by: Bernard Blackham <b-omap@largestprime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c