net/vmxnet3: preserve configured MAC address
authorGeorge Wilkie <gwilkie@brocade.com>
Thu, 15 Jun 2017 12:17:42 +0000 (08:17 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:57 +0000 (15:00 +0200)
When starting a vmxnet3 device, it is always writing the permanent MAC
address, even if a different MAC address was configured.  Write from
the device data instead which holds the current one.

Signed-off-by: George Wilkie <gwilkie@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
drivers/net/vmxnet3/vmxnet3_ethdev.c

index 54358e3..72ec67c 100644 (file)
@@ -734,7 +734,7 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
        vmxnet3_dev_vlan_offload_set(dev,
                                     ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
 
-       vmxnet3_write_mac(hw, hw->perm_addr);
+       vmxnet3_write_mac(hw, dev->data->mac_addrs->addr_bytes);
 
        return VMXNET3_SUCCESS;
 }