aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-02 08:48:28 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-03 12:08:11 -0500
commit7e300bc8e6736d41e7b92978f415572ac60fd59b (patch)
treeb48dc8243946bd08e3c7eef5171d910218a43987 /drivers/net/sfc/efx.c
parent02ebc26865c2755720d2ede90a5ab27c45741823 (diff)
sfc: Store MAC address from NVRAM in net_device::perm_addr
For some reason we failed to make this change when perm_addr was introduced. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 7e820d90e6ba..f3e4043d70ee 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -909,6 +909,7 @@ static void efx_mac_work(struct work_struct *data)
909 909
910static int efx_probe_port(struct efx_nic *efx) 910static int efx_probe_port(struct efx_nic *efx)
911{ 911{
912 unsigned char *perm_addr;
912 int rc; 913 int rc;
913 914
914 netif_dbg(efx, probe, efx->net_dev, "create port\n"); 915 netif_dbg(efx, probe, efx->net_dev, "create port\n");
@@ -922,11 +923,12 @@ static int efx_probe_port(struct efx_nic *efx)
922 return rc; 923 return rc;
923 924
924 /* Sanity check MAC address */ 925 /* Sanity check MAC address */
925 if (is_valid_ether_addr(efx->mac_address)) { 926 perm_addr = efx->net_dev->perm_addr;
926 memcpy(efx->net_dev->dev_addr, efx->mac_address, ETH_ALEN); 927 if (is_valid_ether_addr(perm_addr)) {
928 memcpy(efx->net_dev->dev_addr, perm_addr, ETH_ALEN);
927 } else { 929 } else {
928 netif_err(efx, probe, efx->net_dev, "invalid MAC address %pM\n", 930 netif_err(efx, probe, efx->net_dev, "invalid MAC address %pM\n",
929 efx->mac_address); 931 perm_addr);
930 if (!allow_bad_hwaddr) { 932 if (!allow_bad_hwaddr) {
931 rc = -EINVAL; 933 rc = -EINVAL;
932 goto err; 934 goto err;