Lines Matching refs:mac_drv
111 static void hns_xgmac_lf_rf_insert(struct mac_driver *mac_drv, u32 mode) in hns_xgmac_lf_rf_insert() argument
113 dsaf_set_dev_field(mac_drv, XGMAC_MAC_TX_LF_RF_CONTROL_REG, in hns_xgmac_lf_rf_insert()
121 static void hns_xgmac_lf_rf_control_init(struct mac_driver *mac_drv) in hns_xgmac_lf_rf_control_init() argument
128 dsaf_write_dev(mac_drv, XGMAC_MAC_TX_LF_RF_CONTROL_REG, val); in hns_xgmac_lf_rf_control_init()
136 static void hns_xgmac_enable(void *mac_drv, enum mac_commom_mode mode) in hns_xgmac_enable() argument
138 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_enable()
160 static void hns_xgmac_disable(void *mac_drv, enum mac_commom_mode mode) in hns_xgmac_disable() argument
162 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_disable()
206 static void hns_xgmac_init(void *mac_drv) in hns_xgmac_init() argument
208 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_init()
223 hns_xgmac_disable(mac_drv, MAC_COMM_MODE_RX_AND_TX); in hns_xgmac_init()
231 static void hns_xgmac_config_pad_and_crc(void *mac_drv, u8 newval) in hns_xgmac_config_pad_and_crc() argument
233 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_config_pad_and_crc()
248 static void hns_xgmac_pausefrm_cfg(void *mac_drv, u32 rx_en, u32 tx_en) in hns_xgmac_pausefrm_cfg() argument
250 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_pausefrm_cfg()
258 static void hns_xgmac_set_pausefrm_mac_addr(void *mac_drv, const char *mac_addr) in hns_xgmac_set_pausefrm_mac_addr() argument
260 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_set_pausefrm_mac_addr()
274 static void hns_xgmac_set_tx_auto_pause_frames(void *mac_drv, u16 enable) in hns_xgmac_set_tx_auto_pause_frames() argument
276 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_set_tx_auto_pause_frames()
291 static void hns_xgmac_config_max_frame_length(void *mac_drv, u16 newval) in hns_xgmac_config_max_frame_length() argument
293 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_config_max_frame_length()
298 static void hns_xgmac_update_stats(void *mac_drv) in hns_xgmac_update_stats() argument
300 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_update_stats()
409 static void hns_xgmac_free(void *mac_drv) in hns_xgmac_free() argument
411 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_free()
425 static void hns_xgmac_get_info(void *mac_drv, struct mac_info *mac_info) in hns_xgmac_get_info() argument
427 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_info()
456 static void hns_xgmac_get_pausefrm_cfg(void *mac_drv, u32 *rx_en, u32 *tx_en) in hns_xgmac_get_pausefrm_cfg() argument
458 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_pausefrm_cfg()
471 static void hns_xgmac_get_link_status(void *mac_drv, u32 *link_stat) in hns_xgmac_get_link_status() argument
473 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_link_status()
483 static void hns_xgmac_get_regs(void *mac_drv, void *data) in hns_xgmac_get_regs() argument
486 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_regs()
726 static void hns_xgmac_get_stats(void *mac_drv, u64 *data) in hns_xgmac_get_stats() argument
730 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_stats()
782 struct mac_driver *mac_drv; in hns_xgmac_config() local
784 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_xgmac_config()
785 if (!mac_drv) in hns_xgmac_config()
788 mac_drv->mac_init = hns_xgmac_init; in hns_xgmac_config()
789 mac_drv->mac_enable = hns_xgmac_enable; in hns_xgmac_config()
790 mac_drv->mac_disable = hns_xgmac_disable; in hns_xgmac_config()
792 mac_drv->mac_id = mac_param->mac_id; in hns_xgmac_config()
793 mac_drv->mac_mode = mac_param->mac_mode; in hns_xgmac_config()
794 mac_drv->io_base = mac_param->vaddr; in hns_xgmac_config()
795 mac_drv->dev = mac_param->dev; in hns_xgmac_config()
796 mac_drv->mac_cb = mac_cb; in hns_xgmac_config()
798 mac_drv->set_mac_addr = hns_xgmac_set_pausefrm_mac_addr; in hns_xgmac_config()
799 mac_drv->set_an_mode = NULL; in hns_xgmac_config()
800 mac_drv->config_loopback = NULL; in hns_xgmac_config()
801 mac_drv->config_pad_and_crc = hns_xgmac_config_pad_and_crc; in hns_xgmac_config()
802 mac_drv->mac_free = hns_xgmac_free; in hns_xgmac_config()
803 mac_drv->adjust_link = NULL; in hns_xgmac_config()
804 mac_drv->set_tx_auto_pause_frames = hns_xgmac_set_tx_auto_pause_frames; in hns_xgmac_config()
805 mac_drv->config_max_frame_length = hns_xgmac_config_max_frame_length; in hns_xgmac_config()
806 mac_drv->mac_pausefrm_cfg = hns_xgmac_pausefrm_cfg; in hns_xgmac_config()
807 mac_drv->autoneg_stat = NULL; in hns_xgmac_config()
808 mac_drv->get_info = hns_xgmac_get_info; in hns_xgmac_config()
809 mac_drv->get_pause_enable = hns_xgmac_get_pausefrm_cfg; in hns_xgmac_config()
810 mac_drv->get_link_status = hns_xgmac_get_link_status; in hns_xgmac_config()
811 mac_drv->get_regs = hns_xgmac_get_regs; in hns_xgmac_config()
812 mac_drv->get_ethtool_stats = hns_xgmac_get_stats; in hns_xgmac_config()
813 mac_drv->get_sset_count = hns_xgmac_get_sset_count; in hns_xgmac_config()
814 mac_drv->get_regs_count = hns_xgmac_get_regs_count; in hns_xgmac_config()
815 mac_drv->get_strings = hns_xgmac_get_strings; in hns_xgmac_config()
816 mac_drv->update_stats = hns_xgmac_update_stats; in hns_xgmac_config()
818 return (void *)mac_drv; in hns_xgmac_config()