e1000e: reorganize PHY and flow control interface
[deliverable/linux.git] / drivers / net / e1000e / 82571.c
index f5a4d40000cd24e3ebfe0aa31cf4c5af3fb68d79..f7e1619b974ee73e508218c0c441fce5a0d2b155 100644 (file)
@@ -75,7 +75,7 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
        struct e1000_phy_info *phy = &hw->phy;
        s32 ret_val;
 
-       if (hw->media_type != e1000_media_type_copper) {
+       if (hw->phy.media_type != e1000_media_type_copper) {
                phy->type = e1000_phy_none;
                return 0;
        }
@@ -195,16 +195,16 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
        case E1000_DEV_ID_82571EB_FIBER:
        case E1000_DEV_ID_82572EI_FIBER:
        case E1000_DEV_ID_82571EB_QUAD_FIBER:
-               hw->media_type = e1000_media_type_fiber;
+               hw->phy.media_type = e1000_media_type_fiber;
                break;
        case E1000_DEV_ID_82571EB_SERDES:
        case E1000_DEV_ID_82572EI_SERDES:
        case E1000_DEV_ID_82571EB_SERDES_DUAL:
        case E1000_DEV_ID_82571EB_SERDES_QUAD:
-               hw->media_type = e1000_media_type_internal_serdes;
+               hw->phy.media_type = e1000_media_type_internal_serdes;
                break;
        default:
-               hw->media_type = e1000_media_type_copper;
+               hw->phy.media_type = e1000_media_type_copper;
                break;
        }
 
@@ -216,7 +216,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
        mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0;
 
        /* check for link */
-       switch (hw->media_type) {
+       switch (hw->phy.media_type) {
        case e1000_media_type_copper:
                func->setup_physical_interface = e1000_setup_copper_link_82571;
                func->check_for_link = e1000e_check_for_copper_link;
@@ -1015,7 +1015,7 @@ static s32 e1000_setup_link_82571(struct e1000_hw *hw)
         * set it to full.
         */
        if (hw->mac.type == e1000_82573)
-               hw->mac.fc = e1000_fc_full;
+               hw->fc.type = e1000_fc_full;
 
        return e1000e_setup_link(hw);
 }
This page took 0.027033 seconds and 5 git commands to generate.