/* Extracts the 12 bits, from a multicast address, to determine which bit-vector to set in the multicast table. The hardware uses 12 bits, from incoming rx multicast addresses, to determine the bit-vector to check in the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set by the MO field of the MCSTCTRL. The MO field is set during initialization to mc_filter_type.  */
static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
/* Extracts the 12 bits, from a multicast address, to determine which bit-vector to set in the multicast table. The hardware uses 12 bits, from incoming rx multicast addresses, to determine the bit-vector to check in the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set by the MO field of the MCSTCTRL. The MO field is set during initialization to mc_filter_type.  */
static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
{
	u32 vector = 0;
	switch (hw->mac.mc_filter_type) {
	case 0:
		vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
		break;
	case 1:
		vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5));
		break;
	case 2:
		vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
		break;
	case 3:
		vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
		break;
	default:
		hw_dbg(hw, "MC filter type param set incorrectly\n");
		break;
	}
	vector &= 0xFFF;
	return vector;
}