summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-03-24 02:41:49 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2015-05-19 13:33:21 -0500
commitf566c9949fbdce2e09a900c5343ca9986e5ba360 (patch)
treecb7bb4f188ff373695d36c02aa7b3d850b23c65b /drivers
parent3d6af748ebd831524cb22a29433e9092af469ec7 (diff)
downloadu-boot-imx-f566c9949fbdce2e09a900c5343ca9986e5ba360.zip
u-boot-imx-f566c9949fbdce2e09a900c5343ca9986e5ba360.tar.gz
u-boot-imx-f566c9949fbdce2e09a900c5343ca9986e5ba360.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bcm-sf2-eth.c6
-rw-r--r--drivers/net/designware.c4
-rw-r--r--drivers/net/macb.c9
3 files changed, 0 insertions, 19 deletions
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index 51d5146..eab4c1f 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -154,12 +154,6 @@ static int bcm_sf2_eth_open(struct eth_device *dev, bd_t *bt)
debug("Enabling BCM SF2 Ethernet.\n");
- /* Set MAC address from env */
- if (bcm_sf2_eth_write_hwaddr(dev) != 0) {
- error("%s: MAC set error when opening !\n", __func__);
- return -1;
- }
-
eth->enable_mac();
/* enable tx and rx DMA */
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 07281a6..ae51cf3 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -243,10 +243,6 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
mdelay(100);
};
- /* Soft reset above clears HW address registers.
- * So we have to set it here once again */
- _dw_write_hwaddr(priv, enetaddr);
-
rx_descs_init(priv);
tx_descs_init(priv);
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 4e1a7fe..f949161 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -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;