aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-08-26 12:59:37 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-10-23 00:16:26 -0400
commit51a1f721e22a3fc54a3bc1c67991ecea11cc734d (patch)
treed65cc009c649276fd1a363e0a4de1dae17d366dd
parent1a71ab24914b45a9624335866ba00885a33f2108 (diff)
ixgbe: using is_zero_ether_addr() to simplify the code
Using is_zero_ether_addr() to simplify the code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index dbf37e4a45fd..a2a9bcca4915 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -1778,8 +1778,7 @@ s32 ixgbe_validate_mac_addr(u8 *mac_addr)
1778 else if (IXGBE_IS_BROADCAST(mac_addr)) 1778 else if (IXGBE_IS_BROADCAST(mac_addr))
1779 status = IXGBE_ERR_INVALID_MAC_ADDR; 1779 status = IXGBE_ERR_INVALID_MAC_ADDR;
1780 /* Reject the zero address */ 1780 /* Reject the zero address */
1781 else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && 1781 else if (is_zero_ether_addr(mac_addr))
1782 mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)
1783 status = IXGBE_ERR_INVALID_MAC_ADDR; 1782 status = IXGBE_ERR_INVALID_MAC_ADDR;
1784 1783
1785 return status; 1784 return status;