PageRenderTime 48ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/BusAccess/Export_Inc/whalBus_Defs.h

http://github.com/CyanogenMod/cm-kernel
C Header | 207 lines | 100 code | 43 blank | 64 comment | 0 complexity | f92616bb6d61a046ff2070cdc1c1db39 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
  5. **| All rights reserved. |**
  6. **| |**
  7. **| Redistribution and use in source and binary forms, with or without |**
  8. **| modification, are permitted provided that the following conditions |**
  9. **| are met: |**
  10. **| |**
  11. **| * Redistributions of source code must retain the above copyright |**
  12. **| notice, this list of conditions and the following disclaimer. |**
  13. **| * Redistributions in binary form must reproduce the above copyright |**
  14. **| notice, this list of conditions and the following disclaimer in |**
  15. **| the documentation and/or other materials provided with the |**
  16. **| distribution. |**
  17. **| * Neither the name Texas Instruments nor the names of its |**
  18. **| contributors may be used to endorse or promote products derived |**
  19. **| from this software without specific prior written permission. |**
  20. **| |**
  21. **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
  22. **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
  23. **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
  24. **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
  25. **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
  26. **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
  27. **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
  28. **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
  29. **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
  30. **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
  31. **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
  32. **| |**
  33. **+-----------------------------------------------------------------------+**
  34. ****************************************************************************/
  35. /****************************************************************************
  36. *
  37. * MODULE: whalBus_Defs.h
  38. * PURPOSE: Bus access component structures definitions
  39. *
  40. ****************************************************************************/
  41. #ifndef _WHAL_BUS_DEFS_H
  42. #define _WHAL_BUS_DEFS_H
  43. #include "public_types.h"
  44. #include "osTIType.h"
  45. #include "ratesTypes.h"
  46. #include "commonTypes.h"
  47. #include "public_host_int.h"
  48. #include "public_descriptors.h"
  49. /* Typedefs */
  50. typedef struct
  51. {
  52. rxPacketType_e packetType;
  53. UINT8 rxLevel;
  54. INT8 rssi;
  55. UINT8 SNR;
  56. UINT8 band;
  57. UINT32 TimeStamp;
  58. } rxXfer_Reserved_t;
  59. typedef struct
  60. {
  61. rxPacketType_e packetType;
  62. TI_STATUS status;
  63. rate_e Rate;
  64. UINT8 SNR;
  65. INT8 Rssi;
  66. UINT8 channel;
  67. UINT32 packetInfo;
  68. UINT8 band;
  69. UINT32 TimeStamp;
  70. }Rx_attr_t;
  71. /* Callback for rx packet */
  72. typedef void (*packetReceiveCB_t)(TI_HANDLE hObj,
  73. TI_STATUS aStatus,
  74. const void *aFrame,
  75. UINT16 aLength,
  76. UINT32 aRate,
  77. UINT8 aChannel,
  78. UINT8 aRCPI,
  79. void *Reserved,
  80. UINT32 aFlags);
  81. /* CallBack for Buffer request */
  82. typedef const void *(*requestForBufferCB_t)(TI_HANDLE hObj, UINT16 aLength, UINT32 uEncryptionFlag);
  83. /* Scan complete Callback - This routine is called from the HAL upon TNET scan complete */
  84. typedef void (*scanCompleteCB_t)(TI_HANDLE hScanSrv, char* str, UINT32 strLen);
  85. /* Disassociation sent - This function is called by the HAL's Tx to indicate that dissasociation frame has been sent.*/
  86. typedef void (*disassocSentCB_t)(TI_HANDLE Hobj);
  87. /* Incoming Info Callback */
  88. typedef void (*InfoCB_t)(TI_HANDLE handle, char* buf, UINT32 bufSize);
  89. /* Device Error Callback */
  90. typedef void (*deviceErrorCB_t)(TI_HANDLE siteMgr);
  91. /* Mac status Callback */
  92. typedef void (*MacStatusCB_t)(TI_HANDLE handle, char* str , UINT32 strLen);
  93. /* Health Report Callback */
  94. typedef void (*HealthReportCB_t)(TI_HANDLE handle, char* str , UINT32 strLen);
  95. /* Aci Indication Callback */
  96. typedef void (*AciIndicationCB_t)(TI_HANDLE handle, char* str , UINT32 strLen);
  97. /* Failure Event Callback */
  98. typedef void (*failureEventCB_t)(TI_HANDLE handle, failureEvent_e failureEvent);
  99. /*
  100. * --------------------------------------------------------------
  101. * DmaParams_T - Rx/Tx Queues and Bufffers params
  102. * --------------------------------------------------------------
  103. */
  104. typedef struct
  105. {
  106. int NumTxQueues;
  107. int NumRxQueues;
  108. UINT32 BlockSize;
  109. int NumTxBlocks;
  110. int NumRxBlocks;
  111. int TxNumDesc[MAX_NUM_OF_TX_QUEUES];
  112. int RxNumDesc;
  113. int TxQPriority[MAX_NUM_OF_TX_QUEUES];
  114. int RxQPriority;
  115. UINT16 NumStations;
  116. UINT8 RxQueue_Priority;
  117. UINT8 RxQueue_Type;
  118. UINT32 TraceBufferSize;
  119. BOOLEAN TraceBufferDoPrint;
  120. UINT8 rxMemBlkNumber;
  121. UINT8 txMinMemBlkNumber;
  122. } DmaParams_T;
  123. /*
  124. * --------------------------------------------------------------
  125. * Internal hal attributes
  126. * --------------------------------------------------------------
  127. */
  128. typedef enum
  129. {
  130. SW_DIVS_TX_RESET = 0, /* reset, i.e. invalid value */
  131. SW_DIVS_TX_ANT2 = BIT_2, /* defined to match TX_PING0 & CFG_ANT_SEL*/
  132. SW_DIVS_TX_ANT1 = BIT_3, /* defined to match TX_PING0 & CFG_ANT_SEL*/
  133. SW_DIVS_RX_W_LAST_TX = BIT_4,
  134. SW_DIVS_TOGGLE_DISABLE = BIT_5,
  135. SW_DIVS_TOGGLE_COUNT_MASK = BIT_6+BIT_7
  136. } SwAntDivs_enum;
  137. #define CTRL_NO_TX_COMPLETE 0x40
  138. #define RX_PACKET_FLAGS_MATCH_RXADDR1 0x00000001
  139. #define RX_PACKET_FLAGS_GROUP_ADDR 0x00000002
  140. #define RX_PACKET_FLAGS_BCAST 0x00000004
  141. #define RX_PACKET_FLAGS_STAINTIM 0x00000008
  142. #define RX_PACKET_FLAGS_VIRTUAL_BM 0x00000010
  143. #define RX_PACKET_FLAGS_MATCH_SSID 0x00000020
  144. #define RX_PACKET_FLAGS_MATCH_BSSID 0x00000040
  145. #define RX_PACKET_FLAGS_ENCRYPTION 0x00030000
  146. #define RX_PACKET_FLAGS_MORE_PACKETS 0x00040000
  147. #define RX_PACKET_FLAGS_MEASURMENT 0x00080000
  148. #define RX_DESC_FLAGS_ENCRYPTION 8
  149. #define RX_PACKET_FLAGS_ENCRYPTION_SHIFT 16
  150. #define RX_PACKET_FLAGS_ENCRYPTION_SHIFT_FROM_DESC (RX_PACKET_FLAGS_ENCRYPTION_SHIFT - RX_DESC_FLAGS_ENCRYPTION)
  151. /* The next definitions are used to decide which encryption is used by the Rx flags */
  152. #define RX_FLAGS_NO_SECURITY 0
  153. #define RX_FLAGS_WEP 1
  154. #define RX_FLAGS_TKIP 2
  155. #define RX_FLAGS_AES 3
  156. #define RX_DESC_PACKETID_SHIFT 11
  157. #define RX_MAX_PACKET_ID 3
  158. /* Cal backs */
  159. /* Callback for rx compleate */
  160. typedef void (*WhalSendPacketTranferCB_t)(TI_HANDLE hWhalTx,
  161. TI_STATUS TxStatus,
  162. UINT32 aPacketId,
  163. void *reserved);
  164. #endif /* _WHAL_BUS_DEFS_H */