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 cf1fb4b9a4adff6fbd5904fd31d4dfdef3c97bf9..afe9b1662b8cef8c2ba09c73febdca3583f2642a 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 9080ed6516662c82b6db3f3fb6df007b36375bca..77b4e873f91c04fa8f6d3d3853c63513c1ea2af0 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;