Lines Matching full:mac

19 	struct e1000_mac_info *mac = &hw->mac;  in e1000e_get_bus_info_pcie()  local
31 mac->ops.set_lan_id(hw); in e1000e_get_bus_info_pcie()
107 * register to the devices MAC address and clearing all the other receive
116 e_dbg("Programming MAC Address into RAR[0]\n"); in e1000e_init_rx_addrs()
118 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in e1000e_init_rx_addrs()
123 hw->mac.ops.rar_set(hw, mac_addr, i); in e1000e_init_rx_addrs()
127 * e1000_check_alt_mac_addr_generic - Check for alternate MAC addr
130 * Checks the nvm for an alternate MAC address. An alternate MAC address
132 * address and must override the actual permanent MAC address. If an
133 * alternate MAC address is found it is programmed into RAR0, replacing
150 if (hw->mac.type == e1000_82573) in e1000_check_alt_mac_addr_generic()
162 /* There is no Alternate MAC Address */ in e1000_check_alt_mac_addr_generic()
181 e_dbg("Ignoring Alternate Mac Address with MC bit set\n"); in e1000_check_alt_mac_addr_generic()
185 /* We have a valid alternate MAC address, and we want to treat it the in e1000_check_alt_mac_addr_generic()
186 * same as the normal permanent MAC address stored by the HW into the in e1000_check_alt_mac_addr_generic()
189 hw->mac.ops.rar_set(hw, alt_mac_addr, 0); in e1000_check_alt_mac_addr_generic()
196 return hw->mac.rar_entry_count; in e1000e_rar_get_count_generic()
220 /* If MAC address zero, no need to set the AV bit */ in e1000e_rar_set_generic()
250 hash_mask = (hw->mac.mta_reg_count * 32) - 1; in e1000_hash_mc_addr()
270 * For example, given the following Destination MAC Address and an in e1000_hash_mc_addr()
283 switch (hw->mac.mc_filter_type) { in e1000_hash_mc_addr()
320 memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow)); in e1000e_update_mc_addr_list_generic()
326 hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1); in e1000e_update_mc_addr_list_generic()
329 hw->mac.mta_shadow[hash_reg] |= BIT(hash_bit); in e1000e_update_mc_addr_list_generic()
334 for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) in e1000e_update_mc_addr_list_generic()
335 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, hw->mac.mta_shadow[i]); in e1000e_update_mc_addr_list_generic()
396 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_copper_link() local
405 if (!mac->get_link_status) in e1000e_check_for_copper_link()
407 mac->get_link_status = false; in e1000e_check_for_copper_link()
425 if (!mac->autoneg) in e1000e_check_for_copper_link()
429 * of MAC speed/duplex configuration. So we only need to in e1000e_check_for_copper_link()
430 * configure Collision Distance in the MAC. in e1000e_check_for_copper_link()
432 mac->ops.config_collision_dist(hw); in e1000e_check_for_copper_link()
446 mac->get_link_status = true; in e1000e_check_for_copper_link()
459 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_fiber_link() local
479 if (!mac->autoneg_failed) { in e1000e_check_for_fiber_link()
480 mac->autoneg_failed = true; in e1000e_check_for_fiber_link()
486 ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000e_check_for_fiber_link()
506 ew32(TXCW, mac->txcw); in e1000e_check_for_fiber_link()
509 mac->serdes_has_link = true; in e1000e_check_for_fiber_link()
524 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_serdes_link() local
542 if (!mac->autoneg_failed) { in e1000e_check_for_serdes_link()
543 mac->autoneg_failed = true; in e1000e_check_for_serdes_link()
549 ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000e_check_for_serdes_link()
569 ew32(TXCW, mac->txcw); in e1000e_check_for_serdes_link()
572 mac->serdes_has_link = true; in e1000e_check_for_serdes_link()
575 * link status based on MAC synchronization for internal in e1000e_check_for_serdes_link()
583 mac->serdes_has_link = true; in e1000e_check_for_serdes_link()
587 mac->serdes_has_link = false; in e1000e_check_for_serdes_link()
600 mac->serdes_has_link = true; in e1000e_check_for_serdes_link()
603 mac->serdes_has_link = false; in e1000e_check_for_serdes_link()
607 mac->serdes_has_link = false; in e1000e_check_for_serdes_link()
611 mac->serdes_has_link = false; in e1000e_check_for_serdes_link()
693 ret_val = hw->mac.ops.setup_physical_interface(hw); in e1000e_setup_link_generic()
721 struct e1000_mac_info *mac = &hw->mac; in e1000_commit_fc_settings_generic() local
773 mac->txcw = txcw; in e1000_commit_fc_settings_generic()
787 struct e1000_mac_info *mac = &hw->mac; in e1000_poll_fiber_serdes_link_generic() local
805 mac->autoneg_failed = true; in e1000_poll_fiber_serdes_link_generic()
807 * mac->check_for_link. This routine will force the in e1000_poll_fiber_serdes_link_generic()
811 ret_val = mac->ops.check_for_link(hw); in e1000_poll_fiber_serdes_link_generic()
816 mac->autoneg_failed = false; in e1000_poll_fiber_serdes_link_generic()
818 mac->autoneg_failed = false; in e1000_poll_fiber_serdes_link_generic()
842 hw->mac.ops.config_collision_dist(hw); in e1000e_setup_fiber_serdes_link()
930 * e1000e_force_mac_fc - Force the MAC's flow control settings
933 * Force the MAC's flow control settings. Sets the TFCE and RFCE bits in the
936 * autonegotiation is managed by the PHY rather than the MAC. Software must
1001 struct e1000_mac_info *mac = &hw->mac; in e1000e_config_fc_after_link_up() local
1009 * configuration of the MAC to match the "fc" parameter. in e1000e_config_fc_after_link_up()
1011 if (mac->autoneg_failed) { in e1000e_config_fc_after_link_up()
1030 if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg) { in e1000e_config_fc_after_link_up()
1148 ret_val = mac->ops.get_link_up_info(hw, &speed, &duplex); in e1000e_config_fc_after_link_up()
1157 /* Now we call a subroutine to actually force the MAC in e1000e_config_fc_after_link_up()
1173 mac->autoneg) { in e1000e_config_fc_after_link_up()
1277 /* Now we call a subroutine to actually force the MAC in e1000e_config_fc_after_link_up()
1466 struct e1000_mac_info *mac = &hw->mac; in e1000e_id_led_init_generic() local
1478 mac->ledctl_default = er32(LEDCTL); in e1000e_id_led_init_generic()
1479 mac->ledctl_mode1 = mac->ledctl_default; in e1000e_id_led_init_generic()
1480 mac->ledctl_mode2 = mac->ledctl_default; in e1000e_id_led_init_generic()
1488 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in e1000e_id_led_init_generic()
1489 mac->ledctl_mode1 |= ledctl_on << (i << 3); in e1000e_id_led_init_generic()
1494 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in e1000e_id_led_init_generic()
1495 mac->ledctl_mode1 |= ledctl_off << (i << 3); in e1000e_id_led_init_generic()
1505 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in e1000e_id_led_init_generic()
1506 mac->ledctl_mode2 |= ledctl_on << (i << 3); in e1000e_id_led_init_generic()
1511 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in e1000e_id_led_init_generic()
1512 mac->ledctl_mode2 |= ledctl_off << (i << 3); in e1000e_id_led_init_generic()
1534 if (hw->mac.ops.setup_led != e1000e_setup_led_generic) in e1000e_setup_led_generic()
1539 hw->mac.ledctl_default = ledctl; in e1000e_setup_led_generic()
1547 ew32(LEDCTL, hw->mac.ledctl_mode1); in e1000e_setup_led_generic()
1562 ew32(LEDCTL, hw->mac.ledctl_default); in e1000e_cleanup_led_generic()
1588 ledctl_blink = hw->mac.ledctl_mode2; in e1000e_blink_led_generic()
1590 u32 mode = (hw->mac.ledctl_mode2 >> i) & in e1000e_blink_led_generic()
1592 u32 led_default = hw->mac.ledctl_default >> i; in e1000e_blink_led_generic()
1629 ew32(LEDCTL, hw->mac.ledctl_mode2); in e1000e_led_on_generic()
1656 ew32(LEDCTL, hw->mac.ledctl_mode1); in e1000e_led_off_generic()
1727 struct e1000_mac_info *mac = &hw->mac; in e1000e_reset_adaptive() local
1729 if (!mac->adaptive_ifs) { in e1000e_reset_adaptive()
1734 mac->current_ifs_val = 0; in e1000e_reset_adaptive()
1735 mac->ifs_min_val = IFS_MIN; in e1000e_reset_adaptive()
1736 mac->ifs_max_val = IFS_MAX; in e1000e_reset_adaptive()
1737 mac->ifs_step_size = IFS_STEP; in e1000e_reset_adaptive()
1738 mac->ifs_ratio = IFS_RATIO; in e1000e_reset_adaptive()
1740 mac->in_ifs_mode = false; in e1000e_reset_adaptive()
1753 struct e1000_mac_info *mac = &hw->mac; in e1000e_update_adaptive() local
1755 if (!mac->adaptive_ifs) { in e1000e_update_adaptive()
1760 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { in e1000e_update_adaptive()
1761 if (mac->tx_packet_delta > MIN_NUM_XMITS) { in e1000e_update_adaptive()
1762 mac->in_ifs_mode = true; in e1000e_update_adaptive()
1763 if (mac->current_ifs_val < mac->ifs_max_val) { in e1000e_update_adaptive()
1764 if (!mac->current_ifs_val) in e1000e_update_adaptive()
1765 mac->current_ifs_val = mac->ifs_min_val; in e1000e_update_adaptive()
1767 mac->current_ifs_val += in e1000e_update_adaptive()
1768 mac->ifs_step_size; in e1000e_update_adaptive()
1769 ew32(AIT, mac->current_ifs_val); in e1000e_update_adaptive()
1773 if (mac->in_ifs_mode && in e1000e_update_adaptive()
1774 (mac->tx_packet_delta <= MIN_NUM_XMITS)) { in e1000e_update_adaptive()
1775 mac->current_ifs_val = 0; in e1000e_update_adaptive()
1776 mac->in_ifs_mode = false; in e1000e_update_adaptive()