vmxnet3: Preserve the MAC address configured by ifconfig
authorShreyas Bhatewara <sbhatewara@vmware.com>
Fri, 14 Jan 2011 14:59:31 +0000 (14:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Jan 2011 05:21:11 +0000 (21:21 -0800)
While activating the device get it's MAC address from netdev. This will allow
the MAC address configured using ifconfig to persist through the reset.

Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vmxnet3/vmxnet3_drv.c

index 562bdbb01507e50cb714fda2ee835c7471797f4f..89bcee8ee3d9131697afcdaf7cc80ff9a1538b99 100644 (file)
@@ -48,6 +48,9 @@ static atomic_t devices_found;
 static int enable_mq = 1;
 static int irq_share_mode;
 
+static void
+vmxnet3_write_mac_addr(struct vmxnet3_adapter *adapter, u8 *mac);
+
 /*
  *    Enable/Disable the given intr
  */
@@ -2168,6 +2171,8 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
        /* rx filter settings */
        devRead->rxFilterConf.rxMode = 0;
        vmxnet3_restore_vlan(adapter);
+       vmxnet3_write_mac_addr(adapter, adapter->netdev->dev_addr);
+
        /* the rest are already zeroed */
 }