162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright(c) 2007 - 2018 Intel Corporation. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _E1000_MAC_H_ 562306a36Sopenharmony_ci#define _E1000_MAC_H_ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include "e1000_hw.h" 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include "e1000_phy.h" 1062306a36Sopenharmony_ci#include "e1000_nvm.h" 1162306a36Sopenharmony_ci#include "e1000_defines.h" 1262306a36Sopenharmony_ci#include "e1000_i210.h" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci/* Functions that should not be called directly from drivers but can be used 1562306a36Sopenharmony_ci * by other files in this 'shared code' 1662306a36Sopenharmony_ci */ 1762306a36Sopenharmony_cis32 igb_blink_led(struct e1000_hw *hw); 1862306a36Sopenharmony_cis32 igb_check_for_copper_link(struct e1000_hw *hw); 1962306a36Sopenharmony_cis32 igb_cleanup_led(struct e1000_hw *hw); 2062306a36Sopenharmony_cis32 igb_config_fc_after_link_up(struct e1000_hw *hw); 2162306a36Sopenharmony_cis32 igb_disable_pcie_master(struct e1000_hw *hw); 2262306a36Sopenharmony_cis32 igb_force_mac_fc(struct e1000_hw *hw); 2362306a36Sopenharmony_cis32 igb_get_auto_rd_done(struct e1000_hw *hw); 2462306a36Sopenharmony_cis32 igb_get_bus_info_pcie(struct e1000_hw *hw); 2562306a36Sopenharmony_cis32 igb_get_hw_semaphore(struct e1000_hw *hw); 2662306a36Sopenharmony_cis32 igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, 2762306a36Sopenharmony_ci u16 *duplex); 2862306a36Sopenharmony_cis32 igb_id_led_init(struct e1000_hw *hw); 2962306a36Sopenharmony_cis32 igb_led_off(struct e1000_hw *hw); 3062306a36Sopenharmony_civoid igb_update_mc_addr_list(struct e1000_hw *hw, 3162306a36Sopenharmony_ci u8 *mc_addr_list, u32 mc_addr_count); 3262306a36Sopenharmony_cis32 igb_setup_link(struct e1000_hw *hw); 3362306a36Sopenharmony_cis32 igb_validate_mdi_setting(struct e1000_hw *hw); 3462306a36Sopenharmony_cis32 igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, 3562306a36Sopenharmony_ci u32 offset, u8 data); 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_civoid igb_clear_hw_cntrs_base(struct e1000_hw *hw); 3862306a36Sopenharmony_civoid igb_clear_vfta(struct e1000_hw *hw); 3962306a36Sopenharmony_civoid igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value); 4062306a36Sopenharmony_cis32 igb_vfta_set(struct e1000_hw *hw, u32 vid, u32 vind, 4162306a36Sopenharmony_ci bool vlan_on, bool vlvf_bypass); 4262306a36Sopenharmony_civoid igb_config_collision_dist(struct e1000_hw *hw); 4362306a36Sopenharmony_civoid igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count); 4462306a36Sopenharmony_civoid igb_mta_set(struct e1000_hw *hw, u32 hash_value); 4562306a36Sopenharmony_civoid igb_put_hw_semaphore(struct e1000_hw *hw); 4662306a36Sopenharmony_civoid igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index); 4762306a36Sopenharmony_cis32 igb_check_alt_mac_addr(struct e1000_hw *hw); 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_cibool igb_enable_mng_pass_thru(struct e1000_hw *hw); 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_cienum e1000_mng_mode { 5262306a36Sopenharmony_ci e1000_mng_mode_none = 0, 5362306a36Sopenharmony_ci e1000_mng_mode_asf, 5462306a36Sopenharmony_ci e1000_mng_mode_pt, 5562306a36Sopenharmony_ci e1000_mng_mode_ipmi, 5662306a36Sopenharmony_ci e1000_mng_mode_host_if_only 5762306a36Sopenharmony_ci}; 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci#define E1000_FACTPS_MNGCG 0x20000000 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define E1000_FWSM_MODE_MASK 0xE 6262306a36Sopenharmony_ci#define E1000_FWSM_MODE_SHIFT 1 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define E1000_MNG_DHCP_COOKIE_STATUS_VLAN 0x2 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_civoid e1000_init_function_pointers_82575(struct e1000_hw *hw); 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#endif 69