enic: Fix addr valid check in enic_set_vf_mac
authorRoopa Prabhu <roprabhu@cisco.com>
Wed, 7 Mar 2012 03:50:44 +0000 (03:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Mar 2012 08:28:19 +0000 (00:28 -0800)
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: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/enic_main.c

index cf1fb4b..afe9b16 100644 (file)
@@ -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
index 9080ed6..77b4e87 100644 (file)
@@ -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;