src/dpdk/drivers/net/e1000/base/e1000_api.c
s32 e1000_set_mac_type(struct e1000_hw *hw)
{
	struct e1000_mac_info *mac = &hw->mac;
	s32 ret_val = E1000_SUCCESS;

	DEBUGFUNC("e1000_set_mac_type");

	switch (hw->device_id) {
	case E1000_DEV_ID_82542:
		mac->type = e1000_82542;
		break;
	case E1000_DEV_ID_82543GC_FIBER:
	case E1000_DEV_ID_82543GC_COPPER:
		mac->type = e1000_82543;
		break;
	case E1000_DEV_ID_82544EI_COPPER:
	case E1000_DEV_ID_82544EI_FIBER:
	case E1000_DEV_ID_82544GC_COPPER:
	case E1000_DEV_ID_82544GC_LOM:
		mac->type = e1000_82544;
		break;
	case E1000_DEV_ID_82540EM:
	case E1000_DEV_ID_82540EM_LOM:
	case E1000_DEV_ID_82540EP:
	case E1000_DEV_ID_82540EP_LOM:
	case E1000_DEV_ID_82540EP_LP:
		mac->type = e1000_82540;
		break;
	case E1000_DEV_ID_82545EM_COPPER:
	case E1000_DEV_ID_82545EM_FIBER:
		mac->type = e1000_82545;
		break;
	case E1000_DEV_ID_82545GM_COPPER:
	case E1000_DEV_ID_82545GM_FIBER:
	case E1000_DEV_ID_82545GM_SERDES:
		mac->type = e1000_82545_rev_3;
		break;
	case E1000_DEV_ID_82546EB_COPPER:
	case E1000_DEV_ID_82546EB_FIBER:
	case E1000_DEV_ID_82546EB_QUAD_COPPER:
		mac->type = e1000_82546;
		break;
	case E1000_DEV_ID_82546GB_COPPER:
	case E1000_DEV_ID_82546GB_FIBER:
	case E1000_DEV_ID_82546GB_SERDES:
	case E1000_DEV_ID_82546GB_PCIE:
	case E1000_DEV_ID_82546GB_QUAD_COPPER:
	case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
		mac->type = e1000_82546_rev_3;
		break;
	case E1000_DEV_ID_82541EI:
	case E1000_DEV_ID_82541EI_MOBILE:
	case E1000_DEV_ID_82541ER_LOM:
		mac->type = e1000_82541;
		break;
	case E1000_DEV_ID_82541ER:
	case E1000_DEV_ID_82541GI:
	case E1000_DEV_ID_82541GI_LF:
	case E1000_DEV_ID_82541GI_MOBILE:
		mac->type = e1000_82541_rev_2;
		break;
	case E1000_DEV_ID_82547EI:
	case E1000_DEV_ID_82547EI_MOBILE:
		mac->type = e1000_82547;
		break;
	case E1000_DEV_ID_82547GI:
		mac->type = e1000_82547_rev_2;
		break;
	case E1000_DEV_ID_82571EB_COPPER:
	case E1000_DEV_ID_82571EB_FIBER:
	case E1000_DEV_ID_82571EB_SERDES:
	case E1000_DEV_ID_82571EB_SERDES_DUAL:
	case E1000_DEV_ID_82571EB_SERDES_QUAD:
	case E1000_DEV_ID_82571EB_QUAD_COPPER:
	case E1000_DEV_ID_82571PT_QUAD_COPPER:
	case E1000_DEV_ID_82571EB_QUAD_FIBER:
	case E1000_DEV_ID_82571EB_QUAD_COPPER_LP:
		mac->type = e1000_82571;
		break;
	case E1000_DEV_ID_82572EI:
	case E1000_DEV_ID_82572EI_COPPER:
	case E1000_DEV_ID_82572EI_FIBER:
	case E1000_DEV_ID_82572EI_SERDES:
		mac->type = e1000_82572;
		break;
	case E1000_DEV_ID_82573E:
	case E1000_DEV_ID_82573E_IAMT:
	case E1000_DEV_ID_82573L:
		mac->type = e1000_82573;
		break;
	case E1000_DEV_ID_82574L:
	case E1000_DEV_ID_82574LA:
		mac->type = e1000_82574;
		break;
	case E1000_DEV_ID_82583V:
		mac->type = e1000_82583;
		break;
	case E1000_DEV_ID_80003ES2LAN_COPPER_DPT:
	case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
	case E1000_DEV_ID_80003ES2LAN_COPPER_SPT:
	case E1000_DEV_ID_80003ES2LAN_SERDES_SPT:
		mac->type = e1000_80003es2lan;
		break;
	case E1000_DEV_ID_ICH8_IFE:
	case E1000_DEV_ID_ICH8_IFE_GT:
	case E1000_DEV_ID_ICH8_IFE_G:
	case E1000_DEV_ID_ICH8_IGP_M:
	case E1000_DEV_ID_ICH8_IGP_M_AMT:
	case E1000_DEV_ID_ICH8_IGP_AMT:
	case E1000_DEV_ID_ICH8_IGP_C:
	case E1000_DEV_ID_ICH8_82567V_3:
		mac->type = e1000_ich8lan;
		break;
	case E1000_DEV_ID_ICH9_IFE:
	case E1000_DEV_ID_ICH9_IFE_GT:
	case E1000_DEV_ID_ICH9_IFE_G:
	case E1000_DEV_ID_ICH9_IGP_M:
	case E1000_DEV_ID_ICH9_IGP_M_AMT:
	case E1000_DEV_ID_ICH9_IGP_M_V:
	case E1000_DEV_ID_ICH9_IGP_AMT:
	case E1000_DEV_ID_ICH9_BM:
	case E1000_DEV_ID_ICH9_IGP_C:
	case E1000_DEV_ID_ICH10_R_BM_LM:
	case E1000_DEV_ID_ICH10_R_BM_LF:
	case E1000_DEV_ID_ICH10_R_BM_V:
		mac->type = e1000_ich9lan;
		break;
	case E1000_DEV_ID_ICH10_D_BM_LM:
	case E1000_DEV_ID_ICH10_D_BM_LF:
	case E1000_DEV_ID_ICH10_D_BM_V:
		mac->type = e1000_ich10lan;
		break;
	case E1000_DEV_ID_PCH_D_HV_DM:
	case E1000_DEV_ID_PCH_D_HV_DC:
	case E1000_DEV_ID_PCH_M_HV_LM:
	case E1000_DEV_ID_PCH_M_HV_LC:
		mac->type = e1000_pchlan;
		break;
	case E1000_DEV_ID_PCH2_LV_LM:
	case E1000_DEV_ID_PCH2_LV_V:
		mac->type = e1000_pch2lan;
		break;
	case E1000_DEV_ID_PCH_LPT_I217_LM:
	case E1000_DEV_ID_PCH_LPT_I217_V:
	case E1000_DEV_ID_PCH_LPTLP_I218_LM:
	case E1000_DEV_ID_PCH_LPTLP_I218_V:
	case E1000_DEV_ID_PCH_I218_LM2:
	case E1000_DEV_ID_PCH_I218_V2:
	case E1000_DEV_ID_PCH_I218_LM3:
	case E1000_DEV_ID_PCH_I218_V3:
		mac->type = e1000_pch_lpt;
		break;
	case E1000_DEV_ID_PCH_SPT_I219_LM:
	case E1000_DEV_ID_PCH_SPT_I219_V:
	case E1000_DEV_ID_PCH_SPT_I219_LM2:
	case E1000_DEV_ID_PCH_SPT_I219_V2:
	case E1000_DEV_ID_PCH_LBG_I219_LM3:
	case E1000_DEV_ID_PCH_SPT_I219_LM4:
	case E1000_DEV_ID_PCH_SPT_I219_V4:
	case E1000_DEV_ID_PCH_SPT_I219_LM5:
	case E1000_DEV_ID_PCH_SPT_I219_V5:
		mac->type = e1000_pch_spt;
		break;
	case E1000_DEV_ID_PCH_CNP_I219_LM6:
	case E1000_DEV_ID_PCH_CNP_I219_V6:
	case E1000_DEV_ID_PCH_CNP_I219_LM7:
	case E1000_DEV_ID_PCH_CNP_I219_V7:
	case E1000_DEV_ID_PCH_ICP_I219_LM8:
	case E1000_DEV_ID_PCH_ICP_I219_V8:
	case E1000_DEV_ID_PCH_ICP_I219_LM9:
	case E1000_DEV_ID_PCH_ICP_I219_V9:
		mac->type = e1000_pch_cnp;
		break;
	case E1000_DEV_ID_PCH_ADL_I219_LM16:
	case E1000_DEV_ID_PCH_ADL_I219_V16:
	case E1000_DEV_ID_PCH_ADL_I219_LM17:
	case E1000_DEV_ID_PCH_ADL_I219_V17:
		mac->type = e1000_pch_adp;
		break;
	case E1000_DEV_ID_82575EB_COPPER:
	case E1000_DEV_ID_82575EB_FIBER_SERDES:
	case E1000_DEV_ID_82575GB_QUAD_COPPER:
		mac->type = e1000_82575;
		break;
	case E1000_DEV_ID_82576:
	case E1000_DEV_ID_82576_FIBER:
	case E1000_DEV_ID_82576_SERDES:
	case E1000_DEV_ID_82576_QUAD_COPPER:
	case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
	case E1000_DEV_ID_82576_NS:
	case E1000_DEV_ID_82576_NS_SERDES:
	case E1000_DEV_ID_82576_SERDES_QUAD:
		mac->type = e1000_82576;
		break;
	case E1000_DEV_ID_82580_COPPER:
	case E1000_DEV_ID_82580_FIBER:
	case E1000_DEV_ID_82580_SERDES:
	case E1000_DEV_ID_82580_SGMII:
	case E1000_DEV_ID_82580_COPPER_DUAL:
	case E1000_DEV_ID_82580_QUAD_FIBER:
	case E1000_DEV_ID_DH89XXCC_SGMII:
	case E1000_DEV_ID_DH89XXCC_SERDES:
	case E1000_DEV_ID_DH89XXCC_BACKPLANE:
	case E1000_DEV_ID_DH89XXCC_SFP:
		mac->type = e1000_82580;
		break;
	case E1000_DEV_ID_I350_COPPER:
	case E1000_DEV_ID_I350_FIBER:
	case E1000_DEV_ID_I350_SERDES:
	case E1000_DEV_ID_I350_SGMII:
	case E1000_DEV_ID_I350_DA4:
		mac->type = e1000_i350;
		break;
	case E1000_DEV_ID_I210_COPPER_FLASHLESS:
	case E1000_DEV_ID_I210_SERDES_FLASHLESS:
	case E1000_DEV_ID_I210_SGMII_FLASHLESS:
	case E1000_DEV_ID_I210_COPPER:
	case E1000_DEV_ID_I210_COPPER_OEM1:
	case E1000_DEV_ID_I210_COPPER_IT:
	case E1000_DEV_ID_I210_FIBER:
	case E1000_DEV_ID_I210_SERDES:
	case E1000_DEV_ID_I210_SGMII:
		mac->type = e1000_i210;
		break;
	case E1000_DEV_ID_I211_COPPER:
		mac->type = e1000_i211;
		break;
	case E1000_DEV_ID_82576_VF:
	case E1000_DEV_ID_82576_VF_HV:
		mac->type = e1000_vfadapt;
		break;
	case E1000_DEV_ID_I350_VF:
	case E1000_DEV_ID_I350_VF_HV:
		mac->type = e1000_vfadapt_i350;
		break;

	case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
	case E1000_DEV_ID_I354_SGMII:
	case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
		mac->type = e1000_i354;
		break;
	default:
		/* Should never have loaded on this device */
		ret_val = -E1000_ERR_MAC_INIT;
		break;
	}

	return ret_val;
}
/**
 *  e1000_set_mac_type - Sets MAC type
 *  @hw: pointer to the HW structure
 *
 *  This function sets the mac type of the adapter based on the
 *  device ID stored in the hw structure.
 *  MUST BE FIRST FUNCTION CALLED (explicitly or through
 *  e1000_setup_init_funcs()).
 **/
Sets MAC type
@hw: pointer to the HW structure

This function sets the mac type of the adapter based on the
device ID stored in the hw structure.
MUST BE FIRST FUNCTION CALLED (explicitly or through
e1000_setup_init_funcs()).
Sets MAC type @hw : pointer to the HW structure This function sets the mac type of the adapter based on the device ID stored in the hw structure . MUST BE FIRST FUNCTION CALLED ( explicitly or through e1000_setup_init_funcs () ) .
s32 e1000_set_mac_type(struct e1000_hw *hw)
{
	struct e1000_mac_info *mac = &hw->mac;
	s32 ret_val = E1000_SUCCESS;
	DEBUGFUNC("e1000_set_mac_type");
	switch (hw->device_id) {
	case E1000_DEV_ID_82542:
		mac->type = e1000_82542;
		break;
	case E1000_DEV_ID_82543GC_FIBER:
	case E1000_DEV_ID_82543GC_COPPER:
		mac->type = e1000_82543;
		break;
	case E1000_DEV_ID_82544EI_COPPER:
	case E1000_DEV_ID_82544EI_FIBER:
	case E1000_DEV_ID_82544GC_COPPER:
	case E1000_DEV_ID_82544GC_LOM:
		mac->type = e1000_82544;
		break;
	case E1000_DEV_ID_82540EM:
	case E1000_DEV_ID_82540EM_LOM:
	case E1000_DEV_ID_82540EP:
	case E1000_DEV_ID_82540EP_LOM:
	case E1000_DEV_ID_82540EP_LP:
		mac->type = e1000_82540;
		break;
	case E1000_DEV_ID_82545EM_COPPER:
	case E1000_DEV_ID_82545EM_FIBER:
		mac->type = e1000_82545;
		break;
	case E1000_DEV_ID_82545GM_COPPER:
	case E1000_DEV_ID_82545GM_FIBER:
	case E1000_DEV_ID_82545GM_SERDES:
		mac->type = e1000_82545_rev_3;
		break;
	case E1000_DEV_ID_82546EB_COPPER:
	case E1000_DEV_ID_82546EB_FIBER:
	case E1000_DEV_ID_82546EB_QUAD_COPPER:
		mac->type = e1000_82546;
		break;
	case E1000_DEV_ID_82546GB_COPPER:
	case E1000_DEV_ID_82546GB_FIBER:
	case E1000_DEV_ID_82546GB_SERDES:
	case E1000_DEV_ID_82546GB_PCIE:
	case E1000_DEV_ID_82546GB_QUAD_COPPER:
	case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
		mac->type = e1000_82546_rev_3;
		break;
	case E1000_DEV_ID_82541EI:
	case E1000_DEV_ID_82541EI_MOBILE:
	case E1000_DEV_ID_82541ER_LOM:
		mac->type = e1000_82541;
		break;
	case E1000_DEV_ID_82541ER:
	case E1000_DEV_ID_82541GI:
	case E1000_DEV_ID_82541GI_LF:
	case E1000_DEV_ID_82541GI_MOBILE:
		mac->type = e1000_82541_rev_2;
		break;
	case E1000_DEV_ID_82547EI:
	case E1000_DEV_ID_82547EI_MOBILE:
		mac->type = e1000_82547;
		break;
	case E1000_DEV_ID_82547GI:
		mac->type = e1000_82547_rev_2;
		break;
	case E1000_DEV_ID_82571EB_COPPER:
	case E1000_DEV_ID_82571EB_FIBER:
	case E1000_DEV_ID_82571EB_SERDES:
	case E1000_DEV_ID_82571EB_SERDES_DUAL:
	case E1000_DEV_ID_82571EB_SERDES_QUAD:
	case E1000_DEV_ID_82571EB_QUAD_COPPER:
	case E1000_DEV_ID_82571PT_QUAD_COPPER:
	case E1000_DEV_ID_82571EB_QUAD_FIBER:
	case E1000_DEV_ID_82571EB_QUAD_COPPER_LP:
		mac->type = e1000_82571;
		break;
	case E1000_DEV_ID_82572EI:
	case E1000_DEV_ID_82572EI_COPPER:
	case E1000_DEV_ID_82572EI_FIBER:
	case E1000_DEV_ID_82572EI_SERDES:
		mac->type = e1000_82572;
		break;
	case E1000_DEV_ID_82573E:
	case E1000_DEV_ID_82573E_IAMT:
	case E1000_DEV_ID_82573L:
		mac->type = e1000_82573;
		break;
	case E1000_DEV_ID_82574L:
	case E1000_DEV_ID_82574LA:
		mac->type = e1000_82574;
		break;
	case E1000_DEV_ID_82583V:
		mac->type = e1000_82583;
		break;
	case E1000_DEV_ID_80003ES2LAN_COPPER_DPT:
	case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
	case E1000_DEV_ID_80003ES2LAN_COPPER_SPT:
	case E1000_DEV_ID_80003ES2LAN_SERDES_SPT:
		mac->type = e1000_80003es2lan;
		break;
	case E1000_DEV_ID_ICH8_IFE:
	case E1000_DEV_ID_ICH8_IFE_GT:
	case E1000_DEV_ID_ICH8_IFE_G:
	case E1000_DEV_ID_ICH8_IGP_M:
	case E1000_DEV_ID_ICH8_IGP_M_AMT:
	case E1000_DEV_ID_ICH8_IGP_AMT:
	case E1000_DEV_ID_ICH8_IGP_C:
	case E1000_DEV_ID_ICH8_82567V_3:
		mac->type = e1000_ich8lan;
		break;
	case E1000_DEV_ID_ICH9_IFE:
	case E1000_DEV_ID_ICH9_IFE_GT:
	case E1000_DEV_ID_ICH9_IFE_G:
	case E1000_DEV_ID_ICH9_IGP_M:
	case E1000_DEV_ID_ICH9_IGP_M_AMT:
	case E1000_DEV_ID_ICH9_IGP_M_V:
	case E1000_DEV_ID_ICH9_IGP_AMT:
	case E1000_DEV_ID_ICH9_BM:
	case E1000_DEV_ID_ICH9_IGP_C:
	case E1000_DEV_ID_ICH10_R_BM_LM:
	case E1000_DEV_ID_ICH10_R_BM_LF:
	case E1000_DEV_ID_ICH10_R_BM_V:
		mac->type = e1000_ich9lan;
		break;
	case E1000_DEV_ID_ICH10_D_BM_LM:
	case E1000_DEV_ID_ICH10_D_BM_LF:
	case E1000_DEV_ID_ICH10_D_BM_V:
		mac->type = e1000_ich10lan;
		break;
	case E1000_DEV_ID_PCH_D_HV_DM:
	case E1000_DEV_ID_PCH_D_HV_DC:
	case E1000_DEV_ID_PCH_M_HV_LM:
	case E1000_DEV_ID_PCH_M_HV_LC:
		mac->type = e1000_pchlan;
		break;
	case E1000_DEV_ID_PCH2_LV_LM:
	case E1000_DEV_ID_PCH2_LV_V:
		mac->type = e1000_pch2lan;
		break;
	case E1000_DEV_ID_PCH_LPT_I217_LM:
	case E1000_DEV_ID_PCH_LPT_I217_V:
	case E1000_DEV_ID_PCH_LPTLP_I218_LM:
	case E1000_DEV_ID_PCH_LPTLP_I218_V:
	case E1000_DEV_ID_PCH_I218_LM2:
	case E1000_DEV_ID_PCH_I218_V2:
	case E1000_DEV_ID_PCH_I218_LM3:
	case E1000_DEV_ID_PCH_I218_V3:
		mac->type = e1000_pch_lpt;
		break;
	case E1000_DEV_ID_PCH_SPT_I219_LM:
	case E1000_DEV_ID_PCH_SPT_I219_V:
	case E1000_DEV_ID_PCH_SPT_I219_LM2:
	case E1000_DEV_ID_PCH_SPT_I219_V2:
	case E1000_DEV_ID_PCH_LBG_I219_LM3:
	case E1000_DEV_ID_PCH_SPT_I219_LM4:
	case E1000_DEV_ID_PCH_SPT_I219_V4:
	case E1000_DEV_ID_PCH_SPT_I219_LM5:
	case E1000_DEV_ID_PCH_SPT_I219_V5:
		mac->type = e1000_pch_spt;
		break;
	case E1000_DEV_ID_PCH_CNP_I219_LM6:
	case E1000_DEV_ID_PCH_CNP_I219_V6:
	case E1000_DEV_ID_PCH_CNP_I219_LM7:
	case E1000_DEV_ID_PCH_CNP_I219_V7:
	case E1000_DEV_ID_PCH_ICP_I219_LM8:
	case E1000_DEV_ID_PCH_ICP_I219_V8:
	case E1000_DEV_ID_PCH_ICP_I219_LM9:
	case E1000_DEV_ID_PCH_ICP_I219_V9:
		mac->type = e1000_pch_cnp;
		break;
	case E1000_DEV_ID_PCH_ADL_I219_LM16:
	case E1000_DEV_ID_PCH_ADL_I219_V16:
	case E1000_DEV_ID_PCH_ADL_I219_LM17:
	case E1000_DEV_ID_PCH_ADL_I219_V17:
		mac->type = e1000_pch_adp;
		break;
	case E1000_DEV_ID_82575EB_COPPER:
	case E1000_DEV_ID_82575EB_FIBER_SERDES:
	case E1000_DEV_ID_82575GB_QUAD_COPPER:
		mac->type = e1000_82575;
		break;
	case E1000_DEV_ID_82576:
	case E1000_DEV_ID_82576_FIBER:
	case E1000_DEV_ID_82576_SERDES:
	case E1000_DEV_ID_82576_QUAD_COPPER:
	case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
	case E1000_DEV_ID_82576_NS:
	case E1000_DEV_ID_82576_NS_SERDES:
	case E1000_DEV_ID_82576_SERDES_QUAD:
		mac->type = e1000_82576;
		break;
	case E1000_DEV_ID_82580_COPPER:
	case E1000_DEV_ID_82580_FIBER:
	case E1000_DEV_ID_82580_SERDES:
	case E1000_DEV_ID_82580_SGMII:
	case E1000_DEV_ID_82580_COPPER_DUAL:
	case E1000_DEV_ID_82580_QUAD_FIBER:
	case E1000_DEV_ID_DH89XXCC_SGMII:
	case E1000_DEV_ID_DH89XXCC_SERDES:
	case E1000_DEV_ID_DH89XXCC_BACKPLANE:
	case E1000_DEV_ID_DH89XXCC_SFP:
		mac->type = e1000_82580;
		break;
	case E1000_DEV_ID_I350_COPPER:
	case E1000_DEV_ID_I350_FIBER:
	case E1000_DEV_ID_I350_SERDES:
	case E1000_DEV_ID_I350_SGMII:
	case E1000_DEV_ID_I350_DA4:
		mac->type = e1000_i350;
		break;
	case E1000_DEV_ID_I210_COPPER_FLASHLESS:
	case E1000_DEV_ID_I210_SERDES_FLASHLESS:
	case E1000_DEV_ID_I210_SGMII_FLASHLESS:
	case E1000_DEV_ID_I210_COPPER:
	case E1000_DEV_ID_I210_COPPER_OEM1:
	case E1000_DEV_ID_I210_COPPER_IT:
	case E1000_DEV_ID_I210_FIBER:
	case E1000_DEV_ID_I210_SERDES:
	case E1000_DEV_ID_I210_SGMII:
		mac->type = e1000_i210;
		break;
	case E1000_DEV_ID_I211_COPPER:
		mac->type = e1000_i211;
		break;
	case E1000_DEV_ID_82576_VF:
	case E1000_DEV_ID_82576_VF_HV:
		mac->type = e1000_vfadapt;
		break;
	case E1000_DEV_ID_I350_VF:
	case E1000_DEV_ID_I350_VF_HV:
		mac->type = e1000_vfadapt_i350;
		break;
	case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
	case E1000_DEV_ID_I354_SGMII:
	case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
		mac->type = e1000_i354;
		break;
	default:
		ret_val = -E1000_ERR_MAC_INIT;
		break;
	}
	return ret_val;
}
s32 e1000_set_mac_type ( struct e1000_hw * hw ) { struct e1000_mac_info * mac = & hw -> mac ; s32 ret_val = E1000_SUCCESS ; DEBUGFUNC ( " " ) ; switch ( hw -> device_id ) { case E1000_DEV_ID_82542 : mac -> type = e1000_82542 ; break ; case E1000_DEV_ID_82543GC_FIBER : case E1000_DEV_ID_82543GC_COPPER : mac -> type = e1000_82543 ; break ; case E1000_DEV_ID_82544EI_COPPER : case E1000_DEV_ID_82544EI_FIBER : case E1000_DEV_ID_82544GC_COPPER : case E1000_DEV_ID_82544GC_LOM : mac -> type = e1000_82544 ; break ; case E1000_DEV_ID_82540EM : case E1000_DEV_ID_82540EM_LOM : case E1000_DEV_ID_82540EP : case E1000_DEV_ID_82540EP_LOM : case E1000_DEV_ID_82540EP_LP : mac -> type = e1000_82540 ; break ; case E1000_DEV_ID_82545EM_COPPER : case E1000_DEV_ID_82545EM_FIBER : mac -> type = e1000_82545 ; break ; case E1000_DEV_ID_82545GM_COPPER : case E1000_DEV_ID_82545GM_FIBER : case E1000_DEV_ID_82545GM_SERDES : mac -> type = e1000_82545_rev_3 ; break ; case E1000_DEV_ID_82546EB_COPPER : case E1000_DEV_ID_82546EB_FIBER : case E1000_DEV_ID_82546EB_QUAD_COPPER : mac -> type = e1000_82546 ; break ; case E1000_DEV_ID_82546GB_COPPER : case E1000_DEV_ID_82546GB_FIBER : case E1000_DEV_ID_82546GB_SERDES : case E1000_DEV_ID_82546GB_PCIE : case E1000_DEV_ID_82546GB_QUAD_COPPER : case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 : mac -> type = e1000_82546_rev_3 ; break ; case E1000_DEV_ID_82541EI : case E1000_DEV_ID_82541EI_MOBILE : case E1000_DEV_ID_82541ER_LOM : mac -> type = e1000_82541 ; break ; case E1000_DEV_ID_82541ER : case E1000_DEV_ID_82541GI : case E1000_DEV_ID_82541GI_LF : case E1000_DEV_ID_82541GI_MOBILE : mac -> type = e1000_82541_rev_2 ; break ; case E1000_DEV_ID_82547EI : case E1000_DEV_ID_82547EI_MOBILE : mac -> type = e1000_82547 ; break ; case E1000_DEV_ID_82547GI : mac -> type = e1000_82547_rev_2 ; break ; case E1000_DEV_ID_82571EB_COPPER : case E1000_DEV_ID_82571EB_FIBER : case E1000_DEV_ID_82571EB_SERDES : case E1000_DEV_ID_82571EB_SERDES_DUAL : case E1000_DEV_ID_82571EB_SERDES_QUAD : case E1000_DEV_ID_82571EB_QUAD_COPPER : case E1000_DEV_ID_82571PT_QUAD_COPPER : case E1000_DEV_ID_82571EB_QUAD_FIBER : case E1000_DEV_ID_82571EB_QUAD_COPPER_LP : mac -> type = e1000_82571 ; break ; case E1000_DEV_ID_82572EI : case E1000_DEV_ID_82572EI_COPPER : case E1000_DEV_ID_82572EI_FIBER : case E1000_DEV_ID_82572EI_SERDES : mac -> type = e1000_82572 ; break ; case E1000_DEV_ID_82573E : case E1000_DEV_ID_82573E_IAMT : case E1000_DEV_ID_82573L : mac -> type = e1000_82573 ; break ; case E1000_DEV_ID_82574L : case E1000_DEV_ID_82574LA : mac -> type = e1000_82574 ; break ; case E1000_DEV_ID_82583V : mac -> type = e1000_82583 ; break ; case E1000_DEV_ID_80003ES2LAN_COPPER_DPT : case E1000_DEV_ID_80003ES2LAN_SERDES_DPT : case E1000_DEV_ID_80003ES2LAN_COPPER_SPT : case E1000_DEV_ID_80003ES2LAN_SERDES_SPT : mac -> type = e1000_80003es2lan ; break ; case E1000_DEV_ID_ICH8_IFE : case E1000_DEV_ID_ICH8_IFE_GT : case E1000_DEV_ID_ICH8_IFE_G : case E1000_DEV_ID_ICH8_IGP_M : case E1000_DEV_ID_ICH8_IGP_M_AMT : case E1000_DEV_ID_ICH8_IGP_AMT : case E1000_DEV_ID_ICH8_IGP_C : case E1000_DEV_ID_ICH8_82567V_3 : mac -> type = e1000_ich8lan ; break ; case E1000_DEV_ID_ICH9_IFE : case E1000_DEV_ID_ICH9_IFE_GT : case E1000_DEV_ID_ICH9_IFE_G : case E1000_DEV_ID_ICH9_IGP_M : case E1000_DEV_ID_ICH9_IGP_M_AMT : case E1000_DEV_ID_ICH9_IGP_M_V : case E1000_DEV_ID_ICH9_IGP_AMT : case E1000_DEV_ID_ICH9_BM : case E1000_DEV_ID_ICH9_IGP_C : case E1000_DEV_ID_ICH10_R_BM_LM : case E1000_DEV_ID_ICH10_R_BM_LF : case E1000_DEV_ID_ICH10_R_BM_V : mac -> type = e1000_ich9lan ; break ; case E1000_DEV_ID_ICH10_D_BM_LM : case E1000_DEV_ID_ICH10_D_BM_LF : case E1000_DEV_ID_ICH10_D_BM_V : mac -> type = e1000_ich10lan ; break ; case E1000_DEV_ID_PCH_D_HV_DM : case E1000_DEV_ID_PCH_D_HV_DC : case E1000_DEV_ID_PCH_M_HV_LM : case E1000_DEV_ID_PCH_M_HV_LC : mac -> type = e1000_pchlan ; break ; case E1000_DEV_ID_PCH2_LV_LM : case E1000_DEV_ID_PCH2_LV_V : mac -> type = e1000_pch2lan ; break ; case E1000_DEV_ID_PCH_LPT_I217_LM : case E1000_DEV_ID_PCH_LPT_I217_V : case E1000_DEV_ID_PCH_LPTLP_I218_LM : case E1000_DEV_ID_PCH_LPTLP_I218_V : case E1000_DEV_ID_PCH_I218_LM2 : case E1000_DEV_ID_PCH_I218_V2 : case E1000_DEV_ID_PCH_I218_LM3 : case E1000_DEV_ID_PCH_I218_V3 : mac -> type = e1000_pch_lpt ; break ; case E1000_DEV_ID_PCH_SPT_I219_LM : case E1000_DEV_ID_PCH_SPT_I219_V : case E1000_DEV_ID_PCH_SPT_I219_LM2 : case E1000_DEV_ID_PCH_SPT_I219_V2 : case E1000_DEV_ID_PCH_LBG_I219_LM3 : case E1000_DEV_ID_PCH_SPT_I219_LM4 : case E1000_DEV_ID_PCH_SPT_I219_V4 : case E1000_DEV_ID_PCH_SPT_I219_LM5 : case E1000_DEV_ID_PCH_SPT_I219_V5 : mac -> type = e1000_pch_spt ; break ; case E1000_DEV_ID_PCH_CNP_I219_LM6 : case E1000_DEV_ID_PCH_CNP_I219_V6 : case E1000_DEV_ID_PCH_CNP_I219_LM7 : case E1000_DEV_ID_PCH_CNP_I219_V7 : case E1000_DEV_ID_PCH_ICP_I219_LM8 : case E1000_DEV_ID_PCH_ICP_I219_V8 : case E1000_DEV_ID_PCH_ICP_I219_LM9 : case E1000_DEV_ID_PCH_ICP_I219_V9 : mac -> type = e1000_pch_cnp ; break ; case E1000_DEV_ID_PCH_ADL_I219_LM16 : case E1000_DEV_ID_PCH_ADL_I219_V16 : case E1000_DEV_ID_PCH_ADL_I219_LM17 : case E1000_DEV_ID_PCH_ADL_I219_V17 : mac -> type = e1000_pch_adp ; break ; case E1000_DEV_ID_82575EB_COPPER : case E1000_DEV_ID_82575EB_FIBER_SERDES : case E1000_DEV_ID_82575GB_QUAD_COPPER : mac -> type = e1000_82575 ; break ; case E1000_DEV_ID_82576 : case E1000_DEV_ID_82576_FIBER : case E1000_DEV_ID_82576_SERDES : case E1000_DEV_ID_82576_QUAD_COPPER : case E1000_DEV_ID_82576_QUAD_COPPER_ET2 : case E1000_DEV_ID_82576_NS : case E1000_DEV_ID_82576_NS_SERDES : case E1000_DEV_ID_82576_SERDES_QUAD : mac -> type = e1000_82576 ; break ; case E1000_DEV_ID_82580_COPPER : case E1000_DEV_ID_82580_FIBER : case E1000_DEV_ID_82580_SERDES : case E1000_DEV_ID_82580_SGMII : case E1000_DEV_ID_82580_COPPER_DUAL : case E1000_DEV_ID_82580_QUAD_FIBER : case E1000_DEV_ID_DH89XXCC_SGMII : case E1000_DEV_ID_DH89XXCC_SERDES : case E1000_DEV_ID_DH89XXCC_BACKPLANE : case E1000_DEV_ID_DH89XXCC_SFP : mac -> type = e1000_82580 ; break ; case E1000_DEV_ID_I350_COPPER : case E1000_DEV_ID_I350_FIBER : case E1000_DEV_ID_I350_SERDES : case E1000_DEV_ID_I350_SGMII : case E1000_DEV_ID_I350_DA4 : mac -> type = e1000_i350 ; break ; case E1000_DEV_ID_I210_COPPER_FLASHLESS : case E1000_DEV_ID_I210_SERDES_FLASHLESS : case E1000_DEV_ID_I210_SGMII_FLASHLESS : case E1000_DEV_ID_I210_COPPER : case E1000_DEV_ID_I210_COPPER_OEM1 : case E1000_DEV_ID_I210_COPPER_IT : case E1000_DEV_ID_I210_FIBER : case E1000_DEV_ID_I210_SERDES : case E1000_DEV_ID_I210_SGMII : mac -> type = e1000_i210 ; break ; case E1000_DEV_ID_I211_COPPER : mac -> type = e1000_i211 ; break ; case E1000_DEV_ID_82576_VF : case E1000_DEV_ID_82576_VF_HV : mac -> type = e1000_vfadapt ; break ; case E1000_DEV_ID_I350_VF : case E1000_DEV_ID_I350_VF_HV : mac -> type = e1000_vfadapt_i350 ; break ; case E1000_DEV_ID_I354_BACKPLANE_1GBPS : case E1000_DEV_ID_I354_SGMII : case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS : mac -> type = e1000_i354 ; break ; default : ret_val = - E1000_ERR_MAC_INIT ; break ; } return ret_val ; }
e1000_set_mac_type - Sets MAC type
  @hw: pointer to the HW structure
e1000_set_mac_type - Sets MAC type @hw : pointer to the HW structure
/* Should never have loaded on this device */