mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
net: Update hardware MAC address if it changes in env
When the ethaddr changes in the env, the hardware should also be updated so that MAC filtering will work properly without resetting U-Boot. Also remove the manual calls to set the hwaddr that was included in a few drivers as a result of the framework not doing it. Reported-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
3d6af748eb
commit
f566c9949f
4 changed files with 48 additions and 47 deletions
|
@ -525,7 +525,6 @@ static int macb_phy_init(struct macb_device *macb)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int macb_write_hwaddr(struct eth_device *dev);
|
||||
static int macb_init(struct eth_device *netdev, bd_t *bd)
|
||||
{
|
||||
struct macb_device *macb = to_macb(netdev);
|
||||
|
@ -594,14 +593,6 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
|
|||
#endif /* CONFIG_RMII */
|
||||
}
|
||||
|
||||
/* update the ethaddr */
|
||||
if (is_valid_ethaddr(netdev->enetaddr)) {
|
||||
macb_write_hwaddr(netdev);
|
||||
} else {
|
||||
printf("%s: mac address is not valid\n", netdev->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!macb_phy_init(macb))
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue