Skip to content

Commit

Permalink
enic: Fix addr valid check in enic_set_vf_mac
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Mar 8, 2012
1 parent 0111ad8 commit b8622cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8622cb

Please sign in to comment.