Browse Source

net: thunderx: Don't set mac address for secondary Qset VFs

Set MAC addresses only for primary VF's and don't for
secondary VFs.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sunil Goutham 9 years ago
parent
commit
a3a8ce4ce7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/cavium/thunder/nicvf_main.c

+ 1 - 1
drivers/net/ethernet/cavium/thunder/nicvf_main.c

@@ -1209,7 +1209,7 @@ int nicvf_open(struct net_device *netdev)
 	}
 	}
 
 
 	/* Check if we got MAC address from PF or else generate a radom MAC */
 	/* Check if we got MAC address from PF or else generate a radom MAC */
-	if (is_zero_ether_addr(netdev->dev_addr)) {
+	if (!nic->sqs_mode && is_zero_ether_addr(netdev->dev_addr)) {
 		eth_hw_addr_random(netdev);
 		eth_hw_addr_random(netdev);
 		nicvf_hw_set_mac_addr(nic, netdev);
 		nicvf_hw_set_mac_addr(nic, netdev);
 	}
 	}