src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_validate_mac_addr(u8 *mac_addr)
{
	s32 status = 0;

	DEBUGFUNC("txgbe_validate_mac_addr");

	/* Make sure it is not a multicast address */
	if (TXGBE_IS_MULTICAST(mac_addr)) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	/* Not a broadcast address */
	} else if (TXGBE_IS_BROADCAST(mac_addr)) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	/* Reject the zero address */
	} else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 &&
		   mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	}
	return status;
}
/**
 *  txgbe_validate_mac_addr - Validate MAC address
 *  @mac_addr: pointer to MAC address.
 *
 *  Tests a MAC address to ensure it is a valid Individual Address.
 **/
Validate MAC address
@mac_addr: pointer to MAC address.

Tests a MAC address to ensure it is a valid Individual Address.
Validate MAC address @mac_addr : pointer to MAC address . Tests a MAC address to ensure it is a valid Individual Address .
s32 txgbe_validate_mac_addr(u8 *mac_addr)
{
	s32 status = 0;
	DEBUGFUNC("txgbe_validate_mac_addr");
	if (TXGBE_IS_MULTICAST(mac_addr)) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	} else if (TXGBE_IS_BROADCAST(mac_addr)) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	} else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 &&
		   mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0) {
		status = TXGBE_ERR_INVALID_MAC_ADDR;
	}
	return status;
}
s32 txgbe_validate_mac_addr ( u8 * mac_addr ) { s32 status = 0 ; DEBUGFUNC ( " " ) ; if ( TXGBE_IS_MULTICAST ( mac_addr ) ) { status = TXGBE_ERR_INVALID_MAC_ADDR ; } else if ( TXGBE_IS_BROADCAST ( mac_addr ) ) { status = TXGBE_ERR_INVALID_MAC_ADDR ; } else if ( mac_addr [ 0 ] == 0 && mac_addr [ 1 ] == 0 && mac_addr [ 2 ] == 0 && mac_addr [ 3 ] == 0 && mac_addr [ 4 ] == 0 && mac_addr [ 5 ] == 0 ) { status = TXGBE_ERR_INVALID_MAC_ADDR ; } return status ; }
txgbe_validate_mac_addr - Validate MAC address
  @mac_addr: pointer to MAC address.
txgbe_validate_mac_addr - Validate MAC address @mac_addr : pointer to MAC address .
/* Make sure it is not a multicast address */ /* Not a broadcast address */ /* Reject the zero address */