wx_hw.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2015 - 2022 Beijing WangXun Technology Co., Ltd. */
  3. #ifndef _WX_HW_H_
  4. #define _WX_HW_H_
  5. #include <linux/phy.h>
  6. int wx_phy_read_reg_mdi_c22(struct mii_bus *bus, int phy_addr, int regnum);
  7. int wx_phy_write_reg_mdi_c22(struct mii_bus *bus, int phy_addr, int regnum, u16 value);
  8. int wx_phy_read_reg_mdi_c45(struct mii_bus *bus, int phy_addr, int devnum, int regnum);
  9. int wx_phy_write_reg_mdi_c45(struct mii_bus *bus, int phy_addr,
  10. int devnum, int regnum, u16 value);
  11. void wx_intr_enable(struct wx *wx, u64 qmask);
  12. void wx_irq_disable(struct wx *wx);
  13. int wx_check_flash_load(struct wx *wx, u32 check_bit);
  14. void wx_control_hw(struct wx *wx, bool drv);
  15. int wx_mng_present(struct wx *wx);
  16. int wx_host_interface_command(struct wx *wx, u32 *buffer,
  17. u32 length, u32 timeout, bool return_data);
  18. int wx_read_ee_hostif(struct wx *wx, u16 offset, u16 *data);
  19. int wx_read_ee_hostif_buffer(struct wx *wx,
  20. u16 offset, u16 words, u16 *data);
  21. void wx_init_eeprom_params(struct wx *wx);
  22. void wx_get_mac_addr(struct wx *wx, u8 *mac_addr);
  23. void wx_init_rx_addrs(struct wx *wx);
  24. void wx_mac_set_default_filter(struct wx *wx, u8 *addr);
  25. void wx_flush_sw_mac_table(struct wx *wx);
  26. int wx_set_mac(struct net_device *netdev, void *p);
  27. void wx_disable_rx(struct wx *wx);
  28. int wx_disable_sec_rx_path(struct wx *wx);
  29. void wx_enable_sec_rx_path(struct wx *wx);
  30. void wx_set_rx_mode(struct net_device *netdev);
  31. int wx_change_mtu(struct net_device *netdev, int new_mtu);
  32. void wx_disable_rx_queue(struct wx *wx, struct wx_ring *ring);
  33. void wx_configure_rx(struct wx *wx);
  34. void wx_configure(struct wx *wx);
  35. void wx_start_hw(struct wx *wx);
  36. int wx_disable_pcie_master(struct wx *wx);
  37. int wx_stop_adapter(struct wx *wx);
  38. void wx_reset_misc(struct wx *wx);
  39. int wx_get_pcie_msix_counts(struct wx *wx, u16 *msix_count, u16 max_msix_count);
  40. int wx_sw_init(struct wx *wx);
  41. int wx_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid);
  42. int wx_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid);
  43. int wx_fc_enable(struct wx *wx, bool tx_pause, bool rx_pause);
  44. void wx_update_stats(struct wx *wx);
  45. void wx_clear_hw_cntrs(struct wx *wx);
  46. #endif /* _WX_HW_H_ */