wx_lib.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * WangXun Gigabit PCI Express Linux driver
  4. * Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd.
  5. */
  6. #ifndef _WX_LIB_H_
  7. #define _WX_LIB_H_
  8. struct wx_dec_ptype wx_decode_ptype(const u8 ptype);
  9. void wx_alloc_rx_buffers(struct wx_ring *rx_ring, u16 cleaned_count);
  10. u16 wx_desc_unused(struct wx_ring *ring);
  11. netdev_tx_t wx_xmit_frame(struct sk_buff *skb,
  12. struct net_device *netdev);
  13. void wx_napi_enable_all(struct wx *wx);
  14. void wx_napi_disable_all(struct wx *wx);
  15. void wx_reset_interrupt_capability(struct wx *wx);
  16. void wx_clear_interrupt_scheme(struct wx *wx);
  17. int wx_init_interrupt_scheme(struct wx *wx);
  18. irqreturn_t wx_msix_clean_rings(int __always_unused irq, void *data);
  19. void wx_free_irq(struct wx *wx);
  20. int wx_setup_isb_resources(struct wx *wx);
  21. void wx_free_isb_resources(struct wx *wx);
  22. u32 wx_misc_isb(struct wx *wx, enum wx_isb_idx idx);
  23. void wx_write_eitr(struct wx_q_vector *q_vector);
  24. void wx_configure_vectors(struct wx *wx);
  25. void wx_clean_all_rx_rings(struct wx *wx);
  26. void wx_clean_all_tx_rings(struct wx *wx);
  27. void wx_free_resources(struct wx *wx);
  28. int wx_setup_resources(struct wx *wx);
  29. void wx_get_stats64(struct net_device *netdev,
  30. struct rtnl_link_stats64 *stats);
  31. int wx_set_features(struct net_device *netdev, netdev_features_t features);
  32. netdev_features_t wx_fix_features(struct net_device *netdev,
  33. netdev_features_t features);
  34. void wx_set_ring(struct wx *wx, u32 new_tx_count,
  35. u32 new_rx_count, struct wx_ring *temp_ring);
  36. #endif /* _NGBE_LIB_H_ */