synopGMAC_Host.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * File : synopGMAC_Host.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) chinesebear
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2017-08-24 chinesebear first version
  23. */
  24. #ifndef SYNOP_GMAC_HOST_H
  25. #define SYNOP_GMAC_HOST_H 1
  26. #include "synopGMAC_plat.h"
  27. #include "synopGMAC_Dev.h"
  28. #include "mii.h"
  29. struct net_device_stats
  30. {
  31. unsigned long rx_packets; /* total packets received */
  32. unsigned long tx_packets; /* total packets transmitted */
  33. unsigned long rx_bytes; /* total bytes received */
  34. unsigned long tx_bytes; /* total bytes transmitted */
  35. unsigned long rx_errors; /* bad packets received */
  36. unsigned long tx_errors; /* packet transmit problems */
  37. unsigned long rx_dropped; /* no space in linux buffers */
  38. unsigned long tx_dropped; /* no space available in linux */
  39. unsigned long multicast; /* multicast packets received */
  40. unsigned long collisions;
  41. /* detailed rx_errors: */
  42. unsigned long rx_length_errors;
  43. unsigned long rx_over_errors; /* receiver ring buff overflow */
  44. unsigned long rx_crc_errors; /* recved pkt with crc error */
  45. unsigned long rx_frame_errors; /* recv'd frame alignment error */
  46. unsigned long rx_fifo_errors; /* recv'r fifo overrun */
  47. unsigned long rx_missed_errors; /* receiver missed packet */
  48. /* detailed tx_errors */
  49. unsigned long tx_aborted_errors;
  50. unsigned long tx_carrier_errors;
  51. unsigned long tx_fifo_errors;
  52. unsigned long tx_heartbeat_errors;
  53. unsigned long tx_window_errors;
  54. /* for cslip etc */
  55. unsigned long rx_compressed;
  56. unsigned long tx_compressed;
  57. };
  58. typedef struct synopGMACNetworkAdapter{
  59. /*Device Dependent Data structur*/
  60. synopGMACdevice * synopGMACdev;
  61. struct net_device_stats synopGMACNetStats;
  62. struct mii_if_info mii;
  63. } synopGMACPciNetworkAdapter;
  64. #endif