src/dpdk/drivers/net/igc/base/igc_api.c
s32 igc_set_mac_type(struct igc_hw *hw)
{
	struct igc_mac_info *mac = &hw->mac;
	s32 ret_val = IGC_SUCCESS;

	DEBUGFUNC("igc_set_mac_type");

	switch (hw->device_id) {
	case IGC_DEV_ID_82542:
		mac->type = igc_82542;
		break;
	case IGC_DEV_ID_82543GC_FIBER:
	case IGC_DEV_ID_82543GC_COPPER:
		mac->type = igc_82543;
		break;
	case IGC_DEV_ID_82544EI_COPPER:
	case IGC_DEV_ID_82544EI_FIBER:
	case IGC_DEV_ID_82544GC_COPPER:
	case IGC_DEV_ID_82544GC_LOM:
		mac->type = igc_82544;
		break;
	case IGC_DEV_ID_82540EM:
	case IGC_DEV_ID_82540EM_LOM:
	case IGC_DEV_ID_82540EP:
	case IGC_DEV_ID_82540EP_LOM:
	case IGC_DEV_ID_82540EP_LP:
		mac->type = igc_82540;
		break;
	case IGC_DEV_ID_82545EM_COPPER:
	case IGC_DEV_ID_82545EM_FIBER:
		mac->type = igc_82545;
		break;
	case IGC_DEV_ID_82545GM_COPPER:
	case IGC_DEV_ID_82545GM_FIBER:
	case IGC_DEV_ID_82545GM_SERDES:
		mac->type = igc_82545_rev_3;
		break;
	case IGC_DEV_ID_82546EB_COPPER:
	case IGC_DEV_ID_82546EB_FIBER:
	case IGC_DEV_ID_82546EB_QUAD_COPPER:
		mac->type = igc_82546;
		break;
	case IGC_DEV_ID_82546GB_COPPER:
	case IGC_DEV_ID_82546GB_FIBER:
	case IGC_DEV_ID_82546GB_SERDES:
	case IGC_DEV_ID_82546GB_PCIE:
	case IGC_DEV_ID_82546GB_QUAD_COPPER:
	case IGC_DEV_ID_82546GB_QUAD_COPPER_KSP3:
		mac->type = igc_82546_rev_3;
		break;
	case IGC_DEV_ID_82541EI:
	case IGC_DEV_ID_82541EI_MOBILE:
	case IGC_DEV_ID_82541ER_LOM:
		mac->type = igc_82541;
		break;
	case IGC_DEV_ID_82541ER:
	case IGC_DEV_ID_82541GI:
	case IGC_DEV_ID_82541GI_LF:
	case IGC_DEV_ID_82541GI_MOBILE:
		mac->type = igc_82541_rev_2;
		break;
	case IGC_DEV_ID_82547EI:
	case IGC_DEV_ID_82547EI_MOBILE:
		mac->type = igc_82547;
		break;
	case IGC_DEV_ID_82547GI:
		mac->type = igc_82547_rev_2;
		break;
	case IGC_DEV_ID_82571EB_COPPER:
	case IGC_DEV_ID_82571EB_FIBER:
	case IGC_DEV_ID_82571EB_SERDES:
	case IGC_DEV_ID_82571EB_SERDES_DUAL:
	case IGC_DEV_ID_82571EB_SERDES_QUAD:
	case IGC_DEV_ID_82571EB_QUAD_COPPER:
	case IGC_DEV_ID_82571PT_QUAD_COPPER:
	case IGC_DEV_ID_82571EB_QUAD_FIBER:
	case IGC_DEV_ID_82571EB_QUAD_COPPER_LP:
		mac->type = igc_82571;
		break;
	case IGC_DEV_ID_82572EI:
	case IGC_DEV_ID_82572EI_COPPER:
	case IGC_DEV_ID_82572EI_FIBER:
	case IGC_DEV_ID_82572EI_SERDES:
		mac->type = igc_82572;
		break;
	case IGC_DEV_ID_82573E:
	case IGC_DEV_ID_82573E_IAMT:
	case IGC_DEV_ID_82573L:
		mac->type = igc_82573;
		break;
	case IGC_DEV_ID_82574L:
	case IGC_DEV_ID_82574LA:
		mac->type = igc_82574;
		break;
	case IGC_DEV_ID_82583V:
		mac->type = igc_82583;
		break;
	case IGC_DEV_ID_80003ES2LAN_COPPER_DPT:
	case IGC_DEV_ID_80003ES2LAN_SERDES_DPT:
	case IGC_DEV_ID_80003ES2LAN_COPPER_SPT:
	case IGC_DEV_ID_80003ES2LAN_SERDES_SPT:
		mac->type = igc_80003es2lan;
		break;
	case IGC_DEV_ID_ICH8_IFE:
	case IGC_DEV_ID_ICH8_IFE_GT:
	case IGC_DEV_ID_ICH8_IFE_G:
	case IGC_DEV_ID_ICH8_IGP_M:
	case IGC_DEV_ID_ICH8_IGP_M_AMT:
	case IGC_DEV_ID_ICH8_IGP_AMT:
	case IGC_DEV_ID_ICH8_IGP_C:
	case IGC_DEV_ID_ICH8_82567V_3:
		mac->type = igc_ich8lan;
		break;
	case IGC_DEV_ID_ICH9_IFE:
	case IGC_DEV_ID_ICH9_IFE_GT:
	case IGC_DEV_ID_ICH9_IFE_G:
	case IGC_DEV_ID_ICH9_IGP_M:
	case IGC_DEV_ID_ICH9_IGP_M_AMT:
	case IGC_DEV_ID_ICH9_IGP_M_V:
	case IGC_DEV_ID_ICH9_IGP_AMT:
	case IGC_DEV_ID_ICH9_BM:
	case IGC_DEV_ID_ICH9_IGP_C:
	case IGC_DEV_ID_ICH10_R_BM_LM:
	case IGC_DEV_ID_ICH10_R_BM_LF:
	case IGC_DEV_ID_ICH10_R_BM_V:
		mac->type = igc_ich9lan;
		break;
	case IGC_DEV_ID_ICH10_D_BM_LM:
	case IGC_DEV_ID_ICH10_D_BM_LF:
	case IGC_DEV_ID_ICH10_D_BM_V:
		mac->type = igc_ich10lan;
		break;
	case IGC_DEV_ID_PCH_D_HV_DM:
	case IGC_DEV_ID_PCH_D_HV_DC:
	case IGC_DEV_ID_PCH_M_HV_LM:
	case IGC_DEV_ID_PCH_M_HV_LC:
		mac->type = igc_pchlan;
		break;
	case IGC_DEV_ID_PCH2_LV_LM:
	case IGC_DEV_ID_PCH2_LV_V:
		mac->type = igc_pch2lan;
		break;
	case IGC_DEV_ID_PCH_LPT_I217_LM:
	case IGC_DEV_ID_PCH_LPT_I217_V:
	case IGC_DEV_ID_PCH_LPTLP_I218_LM:
	case IGC_DEV_ID_PCH_LPTLP_I218_V:
	case IGC_DEV_ID_PCH_I218_LM2:
	case IGC_DEV_ID_PCH_I218_V2:
	case IGC_DEV_ID_PCH_I218_LM3:
	case IGC_DEV_ID_PCH_I218_V3:
		mac->type = igc_pch_lpt;
		break;
	case IGC_DEV_ID_PCH_SPT_I219_LM:
	case IGC_DEV_ID_PCH_SPT_I219_V:
	case IGC_DEV_ID_PCH_SPT_I219_LM2:
	case IGC_DEV_ID_PCH_SPT_I219_V2:
	case IGC_DEV_ID_PCH_LBG_I219_LM3:
	case IGC_DEV_ID_PCH_SPT_I219_LM4:
	case IGC_DEV_ID_PCH_SPT_I219_V4:
	case IGC_DEV_ID_PCH_SPT_I219_LM5:
	case IGC_DEV_ID_PCH_SPT_I219_V5:
		mac->type = igc_pch_spt;
		break;
	case IGC_DEV_ID_PCH_CNP_I219_LM6:
	case IGC_DEV_ID_PCH_CNP_I219_V6:
	case IGC_DEV_ID_PCH_CNP_I219_LM7:
	case IGC_DEV_ID_PCH_CNP_I219_V7:
	case IGC_DEV_ID_PCH_ICP_I219_LM8:
	case IGC_DEV_ID_PCH_ICP_I219_V8:
	case IGC_DEV_ID_PCH_ICP_I219_LM9:
	case IGC_DEV_ID_PCH_ICP_I219_V9:
		mac->type = igc_pch_cnp;
		break;
	case IGC_DEV_ID_82575EB_COPPER:
	case IGC_DEV_ID_82575EB_FIBER_SERDES:
	case IGC_DEV_ID_82575GB_QUAD_COPPER:
		mac->type = igc_82575;
		break;
	case IGC_DEV_ID_82576:
	case IGC_DEV_ID_82576_FIBER:
	case IGC_DEV_ID_82576_SERDES:
	case IGC_DEV_ID_82576_QUAD_COPPER:
	case IGC_DEV_ID_82576_QUAD_COPPER_ET2:
	case IGC_DEV_ID_82576_NS:
	case IGC_DEV_ID_82576_NS_SERDES:
	case IGC_DEV_ID_82576_SERDES_QUAD:
		mac->type = igc_82576;
		break;
	case IGC_DEV_ID_82576_VF:
	case IGC_DEV_ID_82576_VF_HV:
		mac->type = igc_vfadapt;
		break;
	case IGC_DEV_ID_82580_COPPER:
	case IGC_DEV_ID_82580_FIBER:
	case IGC_DEV_ID_82580_SERDES:
	case IGC_DEV_ID_82580_SGMII:
	case IGC_DEV_ID_82580_COPPER_DUAL:
	case IGC_DEV_ID_82580_QUAD_FIBER:
	case IGC_DEV_ID_DH89XXCC_SGMII:
	case IGC_DEV_ID_DH89XXCC_SERDES:
	case IGC_DEV_ID_DH89XXCC_BACKPLANE:
	case IGC_DEV_ID_DH89XXCC_SFP:
		mac->type = igc_82580;
		break;
	case IGC_DEV_ID_I350_COPPER:
	case IGC_DEV_ID_I350_FIBER:
	case IGC_DEV_ID_I350_SERDES:
	case IGC_DEV_ID_I350_SGMII:
	case IGC_DEV_ID_I350_DA4:
		mac->type = igc_i350;
		break;
	case IGC_DEV_ID_I210_COPPER_FLASHLESS:
	case IGC_DEV_ID_I210_SERDES_FLASHLESS:
	case IGC_DEV_ID_I210_SGMII_FLASHLESS:
	case IGC_DEV_ID_I210_COPPER:
	case IGC_DEV_ID_I210_COPPER_OEM1:
	case IGC_DEV_ID_I210_COPPER_IT:
	case IGC_DEV_ID_I210_FIBER:
	case IGC_DEV_ID_I210_SERDES:
	case IGC_DEV_ID_I210_SGMII:
		mac->type = igc_i210;
		break;
	case IGC_DEV_ID_I211_COPPER:
		mac->type = igc_i211;
		break;
	case IGC_DEV_ID_I225_LM:
	case IGC_DEV_ID_I225_V:
	case IGC_DEV_ID_I225_K:
	case IGC_DEV_ID_I225_I:
	case IGC_DEV_ID_I220_V:
	case IGC_DEV_ID_I225_BLANK_NVM:
		mac->type = igc_i225;
		break;
	case IGC_DEV_ID_I350_VF:
	case IGC_DEV_ID_I350_VF_HV:
		mac->type = igc_vfadapt_i350;
		break;
	case IGC_DEV_ID_I354_BACKPLANE_1GBPS:
	case IGC_DEV_ID_I354_SGMII:
	case IGC_DEV_ID_I354_BACKPLANE_2_5GBPS:
		mac->type = igc_i354;
		break;
	default:
		/* Should never have loaded on this device */
		ret_val = -IGC_ERR_MAC_INIT;
		break;
	}

	return ret_val;
}
/**
 *  igc_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
 *  igc_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
igc_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 igc_setup_init_funcs () ) .
s32 igc_set_mac_type(struct igc_hw *hw)
{
	struct igc_mac_info *mac = &hw->mac;
	s32 ret_val = IGC_SUCCESS;
	DEBUGFUNC("igc_set_mac_type");
	switch (hw->device_id) {
	case IGC_DEV_ID_82542:
		mac->type = igc_82542;
		break;
	case IGC_DEV_ID_82543GC_FIBER:
	case IGC_DEV_ID_82543GC_COPPER:
		mac->type = igc_82543;
		break;
	case IGC_DEV_ID_82544EI_COPPER:
	case IGC_DEV_ID_82544EI_FIBER:
	case IGC_DEV_ID_82544GC_COPPER:
	case IGC_DEV_ID_82544GC_LOM:
		mac->type = igc_82544;
		break;
	case IGC_DEV_ID_82540EM:
	case IGC_DEV_ID_82540EM_LOM:
	case IGC_DEV_ID_82540EP:
	case IGC_DEV_ID_82540EP_LOM:
	case IGC_DEV_ID_82540EP_LP:
		mac->type = igc_82540;
		break;
	case IGC_DEV_ID_82545EM_COPPER:
	case IGC_DEV_ID_82545EM_FIBER:
		mac->type = igc_82545;
		break;
	case IGC_DEV_ID_82545GM_COPPER:
	case IGC_DEV_ID_82545GM_FIBER:
	case IGC_DEV_ID_82545GM_SERDES:
		mac->type = igc_82545_rev_3;
		break;
	case IGC_DEV_ID_82546EB_COPPER:
	case IGC_DEV_ID_82546EB_FIBER:
	case IGC_DEV_ID_82546EB_QUAD_COPPER:
		mac->type = igc_82546;
		break;
	case IGC_DEV_ID_82546GB_COPPER:
	case IGC_DEV_ID_82546GB_FIBER:
	case IGC_DEV_ID_82546GB_SERDES:
	case IGC_DEV_ID_82546GB_PCIE:
	case IGC_DEV_ID_82546GB_QUAD_COPPER:
	case IGC_DEV_ID_82546GB_QUAD_COPPER_KSP3:
		mac->type = igc_82546_rev_3;
		break;
	case IGC_DEV_ID_82541EI:
	case IGC_DEV_ID_82541EI_MOBILE:
	case IGC_DEV_ID_82541ER_LOM:
		mac->type = igc_82541;
		break;
	case IGC_DEV_ID_82541ER:
	case IGC_DEV_ID_82541GI:
	case IGC_DEV_ID_82541GI_LF:
	case IGC_DEV_ID_82541GI_MOBILE:
		mac->type = igc_82541_rev_2;
		break;
	case IGC_DEV_ID_82547EI:
	case IGC_DEV_ID_82547EI_MOBILE:
		mac->type = igc_82547;
		break;
	case IGC_DEV_ID_82547GI:
		mac->type = igc_82547_rev_2;
		break;
	case IGC_DEV_ID_82571EB_COPPER:
	case IGC_DEV_ID_82571EB_FIBER:
	case IGC_DEV_ID_82571EB_SERDES:
	case IGC_DEV_ID_82571EB_SERDES_DUAL:
	case IGC_DEV_ID_82571EB_SERDES_QUAD:
	case IGC_DEV_ID_82571EB_QUAD_COPPER:
	case IGC_DEV_ID_82571PT_QUAD_COPPER:
	case IGC_DEV_ID_82571EB_QUAD_FIBER:
	case IGC_DEV_ID_82571EB_QUAD_COPPER_LP:
		mac->type = igc_82571;
		break;
	case IGC_DEV_ID_82572EI:
	case IGC_DEV_ID_82572EI_COPPER:
	case IGC_DEV_ID_82572EI_FIBER:
	case IGC_DEV_ID_82572EI_SERDES:
		mac->type = igc_82572;
		break;
	case IGC_DEV_ID_82573E:
	case IGC_DEV_ID_82573E_IAMT:
	case IGC_DEV_ID_82573L:
		mac->type = igc_82573;
		break;
	case IGC_DEV_ID_82574L:
	case IGC_DEV_ID_82574LA:
		mac->type = igc_82574;
		break;
	case IGC_DEV_ID_82583V:
		mac->type = igc_82583;
		break;
	case IGC_DEV_ID_80003ES2LAN_COPPER_DPT:
	case IGC_DEV_ID_80003ES2LAN_SERDES_DPT:
	case IGC_DEV_ID_80003ES2LAN_COPPER_SPT:
	case IGC_DEV_ID_80003ES2LAN_SERDES_SPT:
		mac->type = igc_80003es2lan;
		break;
	case IGC_DEV_ID_ICH8_IFE:
	case IGC_DEV_ID_ICH8_IFE_GT:
	case IGC_DEV_ID_ICH8_IFE_G:
	case IGC_DEV_ID_ICH8_IGP_M:
	case IGC_DEV_ID_ICH8_IGP_M_AMT:
	case IGC_DEV_ID_ICH8_IGP_AMT:
	case IGC_DEV_ID_ICH8_IGP_C:
	case IGC_DEV_ID_ICH8_82567V_3:
		mac->type = igc_ich8lan;
		break;
	case IGC_DEV_ID_ICH9_IFE:
	case IGC_DEV_ID_ICH9_IFE_GT:
	case IGC_DEV_ID_ICH9_IFE_G:
	case IGC_DEV_ID_ICH9_IGP_M:
	case IGC_DEV_ID_ICH9_IGP_M_AMT:
	case IGC_DEV_ID_ICH9_IGP_M_V:
	case IGC_DEV_ID_ICH9_IGP_AMT:
	case IGC_DEV_ID_ICH9_BM:
	case IGC_DEV_ID_ICH9_IGP_C:
	case IGC_DEV_ID_ICH10_R_BM_LM:
	case IGC_DEV_ID_ICH10_R_BM_LF:
	case IGC_DEV_ID_ICH10_R_BM_V:
		mac->type = igc_ich9lan;
		break;
	case IGC_DEV_ID_ICH10_D_BM_LM:
	case IGC_DEV_ID_ICH10_D_BM_LF:
	case IGC_DEV_ID_ICH10_D_BM_V:
		mac->type = igc_ich10lan;
		break;
	case IGC_DEV_ID_PCH_D_HV_DM:
	case IGC_DEV_ID_PCH_D_HV_DC:
	case IGC_DEV_ID_PCH_M_HV_LM:
	case IGC_DEV_ID_PCH_M_HV_LC:
		mac->type = igc_pchlan;
		break;
	case IGC_DEV_ID_PCH2_LV_LM:
	case IGC_DEV_ID_PCH2_LV_V:
		mac->type = igc_pch2lan;
		break;
	case IGC_DEV_ID_PCH_LPT_I217_LM:
	case IGC_DEV_ID_PCH_LPT_I217_V:
	case IGC_DEV_ID_PCH_LPTLP_I218_LM:
	case IGC_DEV_ID_PCH_LPTLP_I218_V:
	case IGC_DEV_ID_PCH_I218_LM2:
	case IGC_DEV_ID_PCH_I218_V2:
	case IGC_DEV_ID_PCH_I218_LM3:
	case IGC_DEV_ID_PCH_I218_V3:
		mac->type = igc_pch_lpt;
		break;
	case IGC_DEV_ID_PCH_SPT_I219_LM:
	case IGC_DEV_ID_PCH_SPT_I219_V:
	case IGC_DEV_ID_PCH_SPT_I219_LM2:
	case IGC_DEV_ID_PCH_SPT_I219_V2:
	case IGC_DEV_ID_PCH_LBG_I219_LM3:
	case IGC_DEV_ID_PCH_SPT_I219_LM4:
	case IGC_DEV_ID_PCH_SPT_I219_V4:
	case IGC_DEV_ID_PCH_SPT_I219_LM5:
	case IGC_DEV_ID_PCH_SPT_I219_V5:
		mac->type = igc_pch_spt;
		break;
	case IGC_DEV_ID_PCH_CNP_I219_LM6:
	case IGC_DEV_ID_PCH_CNP_I219_V6:
	case IGC_DEV_ID_PCH_CNP_I219_LM7:
	case IGC_DEV_ID_PCH_CNP_I219_V7:
	case IGC_DEV_ID_PCH_ICP_I219_LM8:
	case IGC_DEV_ID_PCH_ICP_I219_V8:
	case IGC_DEV_ID_PCH_ICP_I219_LM9:
	case IGC_DEV_ID_PCH_ICP_I219_V9:
		mac->type = igc_pch_cnp;
		break;
	case IGC_DEV_ID_82575EB_COPPER:
	case IGC_DEV_ID_82575EB_FIBER_SERDES:
	case IGC_DEV_ID_82575GB_QUAD_COPPER:
		mac->type = igc_82575;
		break;
	case IGC_DEV_ID_82576:
	case IGC_DEV_ID_82576_FIBER:
	case IGC_DEV_ID_82576_SERDES:
	case IGC_DEV_ID_82576_QUAD_COPPER:
	case IGC_DEV_ID_82576_QUAD_COPPER_ET2:
	case IGC_DEV_ID_82576_NS:
	case IGC_DEV_ID_82576_NS_SERDES:
	case IGC_DEV_ID_82576_SERDES_QUAD:
		mac->type = igc_82576;
		break;
	case IGC_DEV_ID_82576_VF:
	case IGC_DEV_ID_82576_VF_HV:
		mac->type = igc_vfadapt;
		break;
	case IGC_DEV_ID_82580_COPPER:
	case IGC_DEV_ID_82580_FIBER:
	case IGC_DEV_ID_82580_SERDES:
	case IGC_DEV_ID_82580_SGMII:
	case IGC_DEV_ID_82580_COPPER_DUAL:
	case IGC_DEV_ID_82580_QUAD_FIBER:
	case IGC_DEV_ID_DH89XXCC_SGMII:
	case IGC_DEV_ID_DH89XXCC_SERDES:
	case IGC_DEV_ID_DH89XXCC_BACKPLANE:
	case IGC_DEV_ID_DH89XXCC_SFP:
		mac->type = igc_82580;
		break;
	case IGC_DEV_ID_I350_COPPER:
	case IGC_DEV_ID_I350_FIBER:
	case IGC_DEV_ID_I350_SERDES:
	case IGC_DEV_ID_I350_SGMII:
	case IGC_DEV_ID_I350_DA4:
		mac->type = igc_i350;
		break;
	case IGC_DEV_ID_I210_COPPER_FLASHLESS:
	case IGC_DEV_ID_I210_SERDES_FLASHLESS:
	case IGC_DEV_ID_I210_SGMII_FLASHLESS:
	case IGC_DEV_ID_I210_COPPER:
	case IGC_DEV_ID_I210_COPPER_OEM1:
	case IGC_DEV_ID_I210_COPPER_IT:
	case IGC_DEV_ID_I210_FIBER:
	case IGC_DEV_ID_I210_SERDES:
	case IGC_DEV_ID_I210_SGMII:
		mac->type = igc_i210;
		break;
	case IGC_DEV_ID_I211_COPPER:
		mac->type = igc_i211;
		break;
	case IGC_DEV_ID_I225_LM:
	case IGC_DEV_ID_I225_V:
	case IGC_DEV_ID_I225_K:
	case IGC_DEV_ID_I225_I:
	case IGC_DEV_ID_I220_V:
	case IGC_DEV_ID_I225_BLANK_NVM:
		mac->type = igc_i225;
		break;
	case IGC_DEV_ID_I350_VF:
	case IGC_DEV_ID_I350_VF_HV:
		mac->type = igc_vfadapt_i350;
		break;
	case IGC_DEV_ID_I354_BACKPLANE_1GBPS:
	case IGC_DEV_ID_I354_SGMII:
	case IGC_DEV_ID_I354_BACKPLANE_2_5GBPS:
		mac->type = igc_i354;
		break;
	default:
		ret_val = -IGC_ERR_MAC_INIT;
		break;
	}
	return ret_val;
}
s32 igc_set_mac_type ( struct igc_hw * hw ) { struct igc_mac_info * mac = & hw -> mac ; s32 ret_val = IGC_SUCCESS ; DEBUGFUNC ( " " ) ; switch ( hw -> device_id ) { case IGC_DEV_ID_82542 : mac -> type = igc_82542 ; break ; case IGC_DEV_ID_82543GC_FIBER : case IGC_DEV_ID_82543GC_COPPER : mac -> type = igc_82543 ; break ; case IGC_DEV_ID_82544EI_COPPER : case IGC_DEV_ID_82544EI_FIBER : case IGC_DEV_ID_82544GC_COPPER : case IGC_DEV_ID_82544GC_LOM : mac -> type = igc_82544 ; break ; case IGC_DEV_ID_82540EM : case IGC_DEV_ID_82540EM_LOM : case IGC_DEV_ID_82540EP : case IGC_DEV_ID_82540EP_LOM : case IGC_DEV_ID_82540EP_LP : mac -> type = igc_82540 ; break ; case IGC_DEV_ID_82545EM_COPPER : case IGC_DEV_ID_82545EM_FIBER : mac -> type = igc_82545 ; break ; case IGC_DEV_ID_82545GM_COPPER : case IGC_DEV_ID_82545GM_FIBER : case IGC_DEV_ID_82545GM_SERDES : mac -> type = igc_82545_rev_3 ; break ; case IGC_DEV_ID_82546EB_COPPER : case IGC_DEV_ID_82546EB_FIBER : case IGC_DEV_ID_82546EB_QUAD_COPPER : mac -> type = igc_82546 ; break ; case IGC_DEV_ID_82546GB_COPPER : case IGC_DEV_ID_82546GB_FIBER : case IGC_DEV_ID_82546GB_SERDES : case IGC_DEV_ID_82546GB_PCIE : case IGC_DEV_ID_82546GB_QUAD_COPPER : case IGC_DEV_ID_82546GB_QUAD_COPPER_KSP3 : mac -> type = igc_82546_rev_3 ; break ; case IGC_DEV_ID_82541EI : case IGC_DEV_ID_82541EI_MOBILE : case IGC_DEV_ID_82541ER_LOM : mac -> type = igc_82541 ; break ; case IGC_DEV_ID_82541ER : case IGC_DEV_ID_82541GI : case IGC_DEV_ID_82541GI_LF : case IGC_DEV_ID_82541GI_MOBILE : mac -> type = igc_82541_rev_2 ; break ; case IGC_DEV_ID_82547EI : case IGC_DEV_ID_82547EI_MOBILE : mac -> type = igc_82547 ; break ; case IGC_DEV_ID_82547GI : mac -> type = igc_82547_rev_2 ; break ; case IGC_DEV_ID_82571EB_COPPER : case IGC_DEV_ID_82571EB_FIBER : case IGC_DEV_ID_82571EB_SERDES : case IGC_DEV_ID_82571EB_SERDES_DUAL : case IGC_DEV_ID_82571EB_SERDES_QUAD : case IGC_DEV_ID_82571EB_QUAD_COPPER : case IGC_DEV_ID_82571PT_QUAD_COPPER : case IGC_DEV_ID_82571EB_QUAD_FIBER : case IGC_DEV_ID_82571EB_QUAD_COPPER_LP : mac -> type = igc_82571 ; break ; case IGC_DEV_ID_82572EI : case IGC_DEV_ID_82572EI_COPPER : case IGC_DEV_ID_82572EI_FIBER : case IGC_DEV_ID_82572EI_SERDES : mac -> type = igc_82572 ; break ; case IGC_DEV_ID_82573E : case IGC_DEV_ID_82573E_IAMT : case IGC_DEV_ID_82573L : mac -> type = igc_82573 ; break ; case IGC_DEV_ID_82574L : case IGC_DEV_ID_82574LA : mac -> type = igc_82574 ; break ; case IGC_DEV_ID_82583V : mac -> type = igc_82583 ; break ; case IGC_DEV_ID_80003ES2LAN_COPPER_DPT : case IGC_DEV_ID_80003ES2LAN_SERDES_DPT : case IGC_DEV_ID_80003ES2LAN_COPPER_SPT : case IGC_DEV_ID_80003ES2LAN_SERDES_SPT : mac -> type = igc_80003es2lan ; break ; case IGC_DEV_ID_ICH8_IFE : case IGC_DEV_ID_ICH8_IFE_GT : case IGC_DEV_ID_ICH8_IFE_G : case IGC_DEV_ID_ICH8_IGP_M : case IGC_DEV_ID_ICH8_IGP_M_AMT : case IGC_DEV_ID_ICH8_IGP_AMT : case IGC_DEV_ID_ICH8_IGP_C : case IGC_DEV_ID_ICH8_82567V_3 : mac -> type = igc_ich8lan ; break ; case IGC_DEV_ID_ICH9_IFE : case IGC_DEV_ID_ICH9_IFE_GT : case IGC_DEV_ID_ICH9_IFE_G : case IGC_DEV_ID_ICH9_IGP_M : case IGC_DEV_ID_ICH9_IGP_M_AMT : case IGC_DEV_ID_ICH9_IGP_M_V : case IGC_DEV_ID_ICH9_IGP_AMT : case IGC_DEV_ID_ICH9_BM : case IGC_DEV_ID_ICH9_IGP_C : case IGC_DEV_ID_ICH10_R_BM_LM : case IGC_DEV_ID_ICH10_R_BM_LF : case IGC_DEV_ID_ICH10_R_BM_V : mac -> type = igc_ich9lan ; break ; case IGC_DEV_ID_ICH10_D_BM_LM : case IGC_DEV_ID_ICH10_D_BM_LF : case IGC_DEV_ID_ICH10_D_BM_V : mac -> type = igc_ich10lan ; break ; case IGC_DEV_ID_PCH_D_HV_DM : case IGC_DEV_ID_PCH_D_HV_DC : case IGC_DEV_ID_PCH_M_HV_LM : case IGC_DEV_ID_PCH_M_HV_LC : mac -> type = igc_pchlan ; break ; case IGC_DEV_ID_PCH2_LV_LM : case IGC_DEV_ID_PCH2_LV_V : mac -> type = igc_pch2lan ; break ; case IGC_DEV_ID_PCH_LPT_I217_LM : case IGC_DEV_ID_PCH_LPT_I217_V : case IGC_DEV_ID_PCH_LPTLP_I218_LM : case IGC_DEV_ID_PCH_LPTLP_I218_V : case IGC_DEV_ID_PCH_I218_LM2 : case IGC_DEV_ID_PCH_I218_V2 : case IGC_DEV_ID_PCH_I218_LM3 : case IGC_DEV_ID_PCH_I218_V3 : mac -> type = igc_pch_lpt ; break ; case IGC_DEV_ID_PCH_SPT_I219_LM : case IGC_DEV_ID_PCH_SPT_I219_V : case IGC_DEV_ID_PCH_SPT_I219_LM2 : case IGC_DEV_ID_PCH_SPT_I219_V2 : case IGC_DEV_ID_PCH_LBG_I219_LM3 : case IGC_DEV_ID_PCH_SPT_I219_LM4 : case IGC_DEV_ID_PCH_SPT_I219_V4 : case IGC_DEV_ID_PCH_SPT_I219_LM5 : case IGC_DEV_ID_PCH_SPT_I219_V5 : mac -> type = igc_pch_spt ; break ; case IGC_DEV_ID_PCH_CNP_I219_LM6 : case IGC_DEV_ID_PCH_CNP_I219_V6 : case IGC_DEV_ID_PCH_CNP_I219_LM7 : case IGC_DEV_ID_PCH_CNP_I219_V7 : case IGC_DEV_ID_PCH_ICP_I219_LM8 : case IGC_DEV_ID_PCH_ICP_I219_V8 : case IGC_DEV_ID_PCH_ICP_I219_LM9 : case IGC_DEV_ID_PCH_ICP_I219_V9 : mac -> type = igc_pch_cnp ; break ; case IGC_DEV_ID_82575EB_COPPER : case IGC_DEV_ID_82575EB_FIBER_SERDES : case IGC_DEV_ID_82575GB_QUAD_COPPER : mac -> type = igc_82575 ; break ; case IGC_DEV_ID_82576 : case IGC_DEV_ID_82576_FIBER : case IGC_DEV_ID_82576_SERDES : case IGC_DEV_ID_82576_QUAD_COPPER : case IGC_DEV_ID_82576_QUAD_COPPER_ET2 : case IGC_DEV_ID_82576_NS : case IGC_DEV_ID_82576_NS_SERDES : case IGC_DEV_ID_82576_SERDES_QUAD : mac -> type = igc_82576 ; break ; case IGC_DEV_ID_82576_VF : case IGC_DEV_ID_82576_VF_HV : mac -> type = igc_vfadapt ; break ; case IGC_DEV_ID_82580_COPPER : case IGC_DEV_ID_82580_FIBER : case IGC_DEV_ID_82580_SERDES : case IGC_DEV_ID_82580_SGMII : case IGC_DEV_ID_82580_COPPER_DUAL : case IGC_DEV_ID_82580_QUAD_FIBER : case IGC_DEV_ID_DH89XXCC_SGMII : case IGC_DEV_ID_DH89XXCC_SERDES : case IGC_DEV_ID_DH89XXCC_BACKPLANE : case IGC_DEV_ID_DH89XXCC_SFP : mac -> type = igc_82580 ; break ; case IGC_DEV_ID_I350_COPPER : case IGC_DEV_ID_I350_FIBER : case IGC_DEV_ID_I350_SERDES : case IGC_DEV_ID_I350_SGMII : case IGC_DEV_ID_I350_DA4 : mac -> type = igc_i350 ; break ; case IGC_DEV_ID_I210_COPPER_FLASHLESS : case IGC_DEV_ID_I210_SERDES_FLASHLESS : case IGC_DEV_ID_I210_SGMII_FLASHLESS : case IGC_DEV_ID_I210_COPPER : case IGC_DEV_ID_I210_COPPER_OEM1 : case IGC_DEV_ID_I210_COPPER_IT : case IGC_DEV_ID_I210_FIBER : case IGC_DEV_ID_I210_SERDES : case IGC_DEV_ID_I210_SGMII : mac -> type = igc_i210 ; break ; case IGC_DEV_ID_I211_COPPER : mac -> type = igc_i211 ; break ; case IGC_DEV_ID_I225_LM : case IGC_DEV_ID_I225_V : case IGC_DEV_ID_I225_K : case IGC_DEV_ID_I225_I : case IGC_DEV_ID_I220_V : case IGC_DEV_ID_I225_BLANK_NVM : mac -> type = igc_i225 ; break ; case IGC_DEV_ID_I350_VF : case IGC_DEV_ID_I350_VF_HV : mac -> type = igc_vfadapt_i350 ; break ; case IGC_DEV_ID_I354_BACKPLANE_1GBPS : case IGC_DEV_ID_I354_SGMII : case IGC_DEV_ID_I354_BACKPLANE_2_5GBPS : mac -> type = igc_i354 ; break ; default : ret_val = - IGC_ERR_MAC_INIT ; break ; } return ret_val ; }
igc_set_mac_type - Sets MAC type
  @hw: pointer to the HW structure
igc_set_mac_type - Sets MAC type @hw : pointer to the HW structure
/* Should never have loaded on this device */