Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8622cbd authored by Roopa Prabhu's avatar Roopa Prabhu Committed by David S. Miller
Browse files

enic: Fix addr valid check in enic_set_vf_mac



zero mac address is a valid address for VIC dynamic vnic and sriov Vf's.
Fix the check in enic_set_vf_mac appropriately

Signed-off-by: default avatarRoopa Prabhu <roprabhu@cisco.com>
Signed-off-by: default avatarChristian Benvenuti <benve@cisco.com>
Signed-off-by: default avatarSujith Sankar <ssujith@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0111ad82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@

#define DRV_NAME		"enic"
#define DRV_DESCRIPTION		"Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION		"2.1.1.38"
#define DRV_VERSION		"2.1.1.39"
#define DRV_COPYRIGHT		"Copyright 2008-2011 Cisco Systems, Inc"

#define ENIC_BARS_MAX		6
+1 −1
Original line number Diff line number Diff line
@@ -1069,7 +1069,7 @@ static int enic_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
	if (err)
		return err;

	if (is_valid_ether_addr(mac)) {
	if (is_valid_ether_addr(mac) || is_zero_ether_addr(mac)) {
		if (vf == PORT_SELF_VF) {
			memcpy(pp->vf_mac, mac, ETH_ALEN);
			return 0;