desc.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. * File: desc.h
  20. *
  21. * Purpose:The header file of descriptor
  22. *
  23. * Revision History:
  24. *
  25. * Author: Tevin Chen
  26. *
  27. * Date: May 21, 1996
  28. *
  29. */
  30. #ifndef __DESC_H__
  31. #define __DESC_H__
  32. #include <linux/types.h>
  33. #include <linux/mm.h>
  34. /* max transmit or receive buffer size */
  35. #define CB_MAX_BUF_SIZE 2900U /* NOTE: must be multiple of 4 */
  36. #define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE
  37. #define MAX_INTERRUPT_SIZE 32
  38. #define CB_MAX_RX_DESC 128 /* max # of descriptors */
  39. #define CB_MIN_RX_DESC 16 /* min # of RX descriptors */
  40. #define CB_MAX_TX_DESC 128 /* max # of descriptors */
  41. #define CB_MIN_TX_DESC 16 /* min # of TX descriptors */
  42. /*
  43. * bits in the RSR register
  44. */
  45. #define RSR_ADDRBROAD 0x80
  46. #define RSR_ADDRMULTI 0x40
  47. #define RSR_ADDRUNI 0x00
  48. #define RSR_IVLDTYP 0x20 /* invalid packet type */
  49. #define RSR_IVLDLEN 0x10 /* invalid len (> 2312 byte) */
  50. #define RSR_BSSIDOK 0x08
  51. #define RSR_CRCOK 0x04
  52. #define RSR_BCNSSIDOK 0x02
  53. #define RSR_ADDROK 0x01
  54. /*
  55. * bits in the new RSR register
  56. */
  57. #define NEWRSR_DECRYPTOK 0x10
  58. #define NEWRSR_CFPIND 0x08
  59. #define NEWRSR_HWUTSF 0x04
  60. #define NEWRSR_BCNHITAID 0x02
  61. #define NEWRSR_BCNHITAID0 0x01
  62. /*
  63. * bits in the TSR register
  64. */
  65. #define TSR_RETRYTMO 0x08
  66. #define TSR_TMO 0x04
  67. #define TSR_ACKDATA 0x02
  68. #define TSR_VALID 0x01
  69. #define FIFOCTL_AUTO_FB_1 0x1000
  70. #define FIFOCTL_AUTO_FB_0 0x0800
  71. #define FIFOCTL_GRPACK 0x0400
  72. #define FIFOCTL_11GA 0x0300
  73. #define FIFOCTL_11GB 0x0200
  74. #define FIFOCTL_11B 0x0100
  75. #define FIFOCTL_11A 0x0000
  76. #define FIFOCTL_RTS 0x0080
  77. #define FIFOCTL_ISDMA0 0x0040
  78. #define FIFOCTL_GENINT 0x0020
  79. #define FIFOCTL_TMOEN 0x0010
  80. #define FIFOCTL_LRETRY 0x0008
  81. #define FIFOCTL_CRCDIS 0x0004
  82. #define FIFOCTL_NEEDACK 0x0002
  83. #define FIFOCTL_LHEAD 0x0001
  84. /* WMAC definition Frag Control */
  85. #define FRAGCTL_AES 0x0300
  86. #define FRAGCTL_TKIP 0x0200
  87. #define FRAGCTL_LEGACY 0x0100
  88. #define FRAGCTL_NONENCRYPT 0x0000
  89. #define FRAGCTL_ENDFRAG 0x0003
  90. #define FRAGCTL_MIDFRAG 0x0002
  91. #define FRAGCTL_STAFRAG 0x0001
  92. #define FRAGCTL_NONFRAG 0x0000
  93. #endif /* __DESC_H__ */