]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: eth: Clear MAC address in eth_pre_remove()
authorBin Meng <bmeng.cn@gmail.com>
Thu, 8 Oct 2015 04:45:42 +0000 (21:45 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 29 Oct 2015 19:05:51 +0000 (14:05 -0500)
commita16edabe7f744b2d7a97bba4d4bc95b6894fd592
tree557ab362dfb12072c5066bed1802cce3e0ed6b47
parent50dae85c713e11c52abf25dfd283db336257dbc5
net: eth: Clear MAC address in eth_pre_remove()

platdata->enetaddr was assigned to a value in dev_probe() last time.
If we don't clear it, for dev_probe() at the second time, dm eth
will end up treating it as a MAC address from ROM no matter where it
came from originally (maybe env, ROM, or even random). Fix this by
clearing platdata->enetaddr when removing an Ethernet device.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/eth.c