#include <linux/delay.h>
#include <linux/of_mdio.h>
#include "hns_dsaf_main.h"
#include "hns_dsaf_mac.h"
#include "hns_dsaf_gmac.h"
static const struct mac_stats_string g_gmac_stats_string[] = …;
static void hns_gmac_enable(void *mac_drv, enum mac_commom_mode mode)
{ … }
static void hns_gmac_disable(void *mac_drv, enum mac_commom_mode mode)
{ … }
static void hns_gmac_get_en(void *mac_drv, u32 *rx, u32 *tx)
{ … }
static void hns_gmac_free(void *mac_drv)
{ … }
static void hns_gmac_set_tx_auto_pause_frames(void *mac_drv, u16 newval)
{ … }
static void hns_gmac_get_tx_auto_pause_frames(void *mac_drv, u16 *newval)
{ … }
static void hns_gmac_config_max_frame_length(void *mac_drv, u16 newval)
{ … }
static void hns_gmac_config_pad_and_crc(void *mac_drv, u8 newval)
{ … }
static void hns_gmac_config_an_mode(void *mac_drv, u8 newval)
{ … }
static void hns_gmac_tx_loop_pkt_dis(void *mac_drv)
{ … }
static void hns_gmac_get_duplex_type(void *mac_drv,
enum hns_gmac_duplex_mdoe *duplex_mode)
{ … }
static void hns_gmac_get_port_mode(void *mac_drv, enum hns_port_mode *port_mode)
{ … }
static void hns_gmac_port_mode_get(void *mac_drv,
struct hns_gmac_port_mode_cfg *port_mode)
{ … }
static void hns_gmac_pause_frm_cfg(void *mac_drv, u32 rx_pause_en,
u32 tx_pause_en)
{ … }
static void hns_gmac_get_pausefrm_cfg(void *mac_drv, u32 *rx_pause_en,
u32 *tx_pause_en)
{ … }
static bool hns_gmac_need_adjust_link(void *mac_drv, enum mac_speed speed,
int duplex)
{ … }
static int hns_gmac_adjust_link(void *mac_drv, enum mac_speed speed,
u32 full_duplex)
{ … }
static void hns_gmac_set_uc_match(void *mac_drv, u16 en)
{ … }
static void hns_gmac_set_promisc(void *mac_drv, u8 en)
{ … }
static int hns_gmac_wait_fifo_clean(void *mac_drv)
{ … }
static void hns_gmac_init(void *mac_drv)
{ … }
static void hns_gmac_update_stats(void *mac_drv)
{ … }
static void hns_gmac_set_mac_addr(void *mac_drv, const char *mac_addr)
{ … }
static int hns_gmac_config_loopback(void *mac_drv, enum hnae_loop loop_mode,
u8 enable)
{ … }
static void hns_gmac_get_info(void *mac_drv, struct mac_info *mac_info)
{ … }
static void hns_gmac_autoneg_stat(void *mac_drv, u32 *enable)
{ … }
static void hns_gmac_get_link_status(void *mac_drv, u32 *link_stat)
{ … }
static void hns_gmac_get_regs(void *mac_drv, void *data)
{ … }
static void hns_gmac_get_stats(void *mac_drv, u64 *data)
{ … }
static void hns_gmac_get_strings(u32 stringset, u8 *data)
{ … }
static int hns_gmac_get_sset_count(int stringset)
{ … }
static int hns_gmac_get_regs_count(void)
{ … }
void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param)
{ … }