desc.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  4. * All rights reserved.
  5. *
  6. * File: desc.h
  7. *
  8. * Purpose:The header file of descriptor
  9. *
  10. * Revision History:
  11. *
  12. * Author: Tevin Chen
  13. *
  14. * Date: May 21, 1996
  15. *
  16. */
  17. #ifndef __DESC_H__
  18. #define __DESC_H__
  19. #include <linux/types.h>
  20. #include <linux/mm.h>
  21. /* max transmit or receive buffer size */
  22. #define CB_MAX_BUF_SIZE 2900U /* NOTE: must be multiple of 4 */
  23. #define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE
  24. #define MAX_INTERRUPT_SIZE 32
  25. #define CB_MAX_RX_DESC 128 /* max # of descriptors */
  26. #define CB_MIN_RX_DESC 16 /* min # of RX descriptors */
  27. #define CB_MAX_TX_DESC 128 /* max # of descriptors */
  28. #define CB_MIN_TX_DESC 16 /* min # of TX descriptors */
  29. /*
  30. * bits in the RSR register
  31. */
  32. #define RSR_ADDRBROAD 0x80
  33. #define RSR_ADDRMULTI 0x40
  34. #define RSR_ADDRUNI 0x00
  35. #define RSR_IVLDTYP 0x20 /* invalid packet type */
  36. #define RSR_IVLDLEN 0x10 /* invalid len (> 2312 byte) */
  37. #define RSR_BSSIDOK 0x08
  38. #define RSR_CRCOK 0x04
  39. #define RSR_BCNSSIDOK 0x02
  40. #define RSR_ADDROK 0x01
  41. /*
  42. * bits in the new RSR register
  43. */
  44. #define NEWRSR_DECRYPTOK 0x10
  45. #define NEWRSR_CFPIND 0x08
  46. #define NEWRSR_HWUTSF 0x04
  47. #define NEWRSR_BCNHITAID 0x02
  48. #define NEWRSR_BCNHITAID0 0x01
  49. /*
  50. * bits in the TSR register
  51. */
  52. #define TSR_RETRYTMO 0x08
  53. #define TSR_TMO 0x04
  54. #define TSR_ACKDATA 0x02
  55. #define TSR_VALID 0x01
  56. #define FIFOCTL_AUTO_FB_1 0x1000
  57. #define FIFOCTL_AUTO_FB_0 0x0800
  58. #define FIFOCTL_GRPACK 0x0400
  59. #define FIFOCTL_11GA 0x0300
  60. #define FIFOCTL_11GB 0x0200
  61. #define FIFOCTL_11B 0x0100
  62. #define FIFOCTL_11A 0x0000
  63. #define FIFOCTL_RTS 0x0080
  64. #define FIFOCTL_ISDMA0 0x0040
  65. #define FIFOCTL_GENINT 0x0020
  66. #define FIFOCTL_TMOEN 0x0010
  67. #define FIFOCTL_LRETRY 0x0008
  68. #define FIFOCTL_CRCDIS 0x0004
  69. #define FIFOCTL_NEEDACK 0x0002
  70. #define FIFOCTL_LHEAD 0x0001
  71. /* WMAC definition Frag Control */
  72. #define FRAGCTL_AES 0x0300
  73. #define FRAGCTL_TKIP 0x0200
  74. #define FRAGCTL_LEGACY 0x0100
  75. #define FRAGCTL_NONENCRYPT 0x0000
  76. #define FRAGCTL_ENDFRAG 0x0003
  77. #define FRAGCTL_MIDFRAG 0x0002
  78. #define FRAGCTL_STAFRAG 0x0001
  79. #define FRAGCTL_NONFRAG 0x0000
  80. #endif /* __DESC_H__ */