synopGMAC_Host.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2017-08-24 chinesebear first version
  9. */
  10. #ifndef SYNOP_GMAC_HOST_H
  11. #define SYNOP_GMAC_HOST_H 1
  12. #include "synopGMAC_plat.h"
  13. #include "synopGMAC_Dev.h"
  14. #include "mii.h"
  15. struct net_device_stats
  16. {
  17. unsigned long rx_packets; /* total packets received */
  18. unsigned long tx_packets; /* total packets transmitted */
  19. unsigned long rx_bytes; /* total bytes received */
  20. unsigned long tx_bytes; /* total bytes transmitted */
  21. unsigned long rx_errors; /* bad packets received */
  22. unsigned long tx_errors; /* packet transmit problems */
  23. unsigned long rx_dropped; /* no space in linux buffers */
  24. unsigned long tx_dropped; /* no space available in linux */
  25. unsigned long multicast; /* multicast packets received */
  26. unsigned long collisions;
  27. /* detailed rx_errors: */
  28. unsigned long rx_length_errors;
  29. unsigned long rx_over_errors; /* receiver ring buff overflow */
  30. unsigned long rx_crc_errors; /* recved pkt with crc error */
  31. unsigned long rx_frame_errors; /* recv'd frame alignment error */
  32. unsigned long rx_fifo_errors; /* recv'r fifo overrun */
  33. unsigned long rx_missed_errors; /* receiver missed packet */
  34. /* detailed tx_errors */
  35. unsigned long tx_aborted_errors;
  36. unsigned long tx_carrier_errors;
  37. unsigned long tx_fifo_errors;
  38. unsigned long tx_heartbeat_errors;
  39. unsigned long tx_window_errors;
  40. /* for cslip etc */
  41. unsigned long rx_compressed;
  42. unsigned long tx_compressed;
  43. };
  44. typedef struct synopGMACNetworkAdapter{
  45. /*Device Dependent Data structur*/
  46. synopGMACdevice * synopGMACdev;
  47. struct net_device_stats synopGMACNetStats;
  48. struct mii_if_info mii;
  49. } synopGMACPciNetworkAdapter;
  50. #endif