18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright(c) 2007 - 2018 Intel Corporation. */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef _E1000_MAC_H_
58c2ecf20Sopenharmony_ci#define _E1000_MAC_H_
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include "e1000_hw.h"
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include "e1000_phy.h"
108c2ecf20Sopenharmony_ci#include "e1000_nvm.h"
118c2ecf20Sopenharmony_ci#include "e1000_defines.h"
128c2ecf20Sopenharmony_ci#include "e1000_i210.h"
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/* Functions that should not be called directly from drivers but can be used
158c2ecf20Sopenharmony_ci * by other files in this 'shared code'
168c2ecf20Sopenharmony_ci */
178c2ecf20Sopenharmony_cis32  igb_blink_led(struct e1000_hw *hw);
188c2ecf20Sopenharmony_cis32  igb_check_for_copper_link(struct e1000_hw *hw);
198c2ecf20Sopenharmony_cis32  igb_cleanup_led(struct e1000_hw *hw);
208c2ecf20Sopenharmony_cis32  igb_config_fc_after_link_up(struct e1000_hw *hw);
218c2ecf20Sopenharmony_cis32  igb_disable_pcie_master(struct e1000_hw *hw);
228c2ecf20Sopenharmony_cis32  igb_force_mac_fc(struct e1000_hw *hw);
238c2ecf20Sopenharmony_cis32  igb_get_auto_rd_done(struct e1000_hw *hw);
248c2ecf20Sopenharmony_cis32  igb_get_bus_info_pcie(struct e1000_hw *hw);
258c2ecf20Sopenharmony_cis32  igb_get_hw_semaphore(struct e1000_hw *hw);
268c2ecf20Sopenharmony_cis32  igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed,
278c2ecf20Sopenharmony_ci				     u16 *duplex);
288c2ecf20Sopenharmony_cis32  igb_id_led_init(struct e1000_hw *hw);
298c2ecf20Sopenharmony_cis32  igb_led_off(struct e1000_hw *hw);
308c2ecf20Sopenharmony_civoid igb_update_mc_addr_list(struct e1000_hw *hw,
318c2ecf20Sopenharmony_ci			     u8 *mc_addr_list, u32 mc_addr_count);
328c2ecf20Sopenharmony_cis32  igb_setup_link(struct e1000_hw *hw);
338c2ecf20Sopenharmony_cis32  igb_validate_mdi_setting(struct e1000_hw *hw);
348c2ecf20Sopenharmony_cis32  igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg,
358c2ecf20Sopenharmony_ci			     u32 offset, u8 data);
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_civoid igb_clear_hw_cntrs_base(struct e1000_hw *hw);
388c2ecf20Sopenharmony_civoid igb_clear_vfta(struct e1000_hw *hw);
398c2ecf20Sopenharmony_civoid igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value);
408c2ecf20Sopenharmony_cis32  igb_vfta_set(struct e1000_hw *hw, u32 vid, u32 vind,
418c2ecf20Sopenharmony_ci		  bool vlan_on, bool vlvf_bypass);
428c2ecf20Sopenharmony_civoid igb_config_collision_dist(struct e1000_hw *hw);
438c2ecf20Sopenharmony_civoid igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);
448c2ecf20Sopenharmony_civoid igb_mta_set(struct e1000_hw *hw, u32 hash_value);
458c2ecf20Sopenharmony_civoid igb_put_hw_semaphore(struct e1000_hw *hw);
468c2ecf20Sopenharmony_civoid igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
478c2ecf20Sopenharmony_cis32  igb_check_alt_mac_addr(struct e1000_hw *hw);
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_cibool igb_enable_mng_pass_thru(struct e1000_hw *hw);
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_cienum e1000_mng_mode {
528c2ecf20Sopenharmony_ci	e1000_mng_mode_none = 0,
538c2ecf20Sopenharmony_ci	e1000_mng_mode_asf,
548c2ecf20Sopenharmony_ci	e1000_mng_mode_pt,
558c2ecf20Sopenharmony_ci	e1000_mng_mode_ipmi,
568c2ecf20Sopenharmony_ci	e1000_mng_mode_host_if_only
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define E1000_FACTPS_MNGCG	0x20000000
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define E1000_FWSM_MODE_MASK	0xE
628c2ecf20Sopenharmony_ci#define E1000_FWSM_MODE_SHIFT	1
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci#define E1000_MNG_DHCP_COOKIE_STATUS_VLAN	0x2
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_civoid e1000_init_function_pointers_82575(struct e1000_hw *hw);
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#endif
69