PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/wl1283/stad/Export_Inc/STADExternalIf.h

https://github.com/CyanogenDefy/android_hardware_ti_wlan
C Header | 384 lines | 156 code | 41 blank | 187 comment | 0 complexity | f5d63686f9c61b27737bdf0c23d31884 MD5 | raw file
  1. /*
  2. * STADExternalIf.h
  3. *
  4. * Copyright(c) 1998 - 2010 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. /* MODULE: TiWlnIf.h */
  36. /* PURPOSE: */
  37. /* */
  38. /****************************************************************************/
  39. #ifndef __TIWLNIF_NEW_H__
  40. #define __TIWLNIF_NEW_H__
  41. /** \file STADExternalIf.h
  42. * \brief STAD External APIs
  43. */
  44. #include "tidef.h"
  45. #include "report.h"
  46. #include "osDot11.h"
  47. #include "TI_IPC_Api.h"
  48. #include "bssTypes.h"
  49. #include "roamingMngrTypes.h"
  50. #include "version.h"
  51. #include "privateCmd.h"
  52. #include "CmdInterfaceCodes.h"
  53. #include "coreDefaultParams.h"
  54. #include "scanMngrTypes.h"
  55. #include "TWDriver.h"
  56. /***********/
  57. /* defines */
  58. /***********/
  59. #define NUM_OF_CONFIG_PARAMS_IN_SG 2
  60. #define NUM_OF_STATUS_PARAMS_IN_SG 11
  61. #define NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG 6
  62. #define NUM_OF_RATE_MNGT_PARAMS_MAX 14
  63. #define SET_SSID_WITHOUT_SUPPL 0x8000
  64. #define TX_RETRY_HISTOGRAM_SIZE 16
  65. #define RX_DATA_FILTER_MAX_MASK_SIZE 8
  66. #define RX_DATA_FILTER_MAX_PATTERN_SIZE 64
  67. #define KEEP_ALIVE_TEMPLATE_MAX_LENGTH 64
  68. #define KEEP_ALIVE_MAX_USER_MESSAGES 2
  69. /*Indicates that key management type is WPS (bit field)*/
  70. #define TI_AUTH_KEY_MGMT_WPS 0x80
  71. /*********************/
  72. /* enumeration types */
  73. /*********************/
  74. /** \enum TxDelayRanges_e
  75. * \brief TX Delay Ranges
  76. *
  77. * \par Description
  78. * The Tx path delay histogram (host + MAC)ranges in msec
  79. * Used as indexes in tx Delay Histogram Ranges (including Start & End of ranges) Table
  80. *
  81. * \sa
  82. */
  83. typedef enum
  84. {
  85. TX_DELAY_RANGE_MIN = 0, /**< */
  86. TX_DELAY_RANGE_0_TO_1 = 0, /**< */
  87. TX_DELAY_RANGE_1_TO_10 = 1, /**< */
  88. TX_DELAY_RANGE_10_TO_20 = 2, /**< */
  89. TX_DELAY_RANGE_20_TO_40 = 3, /**< */
  90. TX_DELAY_RANGE_40_TO_60 = 4, /**< */
  91. TX_DELAY_RANGE_60_TO_80 = 5, /**< */
  92. TX_DELAY_RANGE_80_TO_100 = 6, /**< */
  93. TX_DELAY_RANGE_100_TO_200 = 7, /**< */
  94. TX_DELAY_RANGE_ABOVE_200 = 8, /**< */
  95. TX_DELAY_RANGE_MAX = 8, /**< */
  96. TX_DELAY_RANGES_NUM = 9 /**< */
  97. } TxDelayRanges_e;
  98. /** \enum TIWLN_SIMPLE_CONFIG_MODE
  99. * \brief TI WLAN Simple Configuration Mode
  100. *
  101. * \par Description
  102. * Used for indicating WiFi Simple Configuration mode
  103. *
  104. * \sa
  105. */
  106. typedef enum
  107. {
  108. TIWLN_SIMPLE_CONFIG_OFF = 0, /**< Simple Configuration OFF */
  109. TIWLN_SIMPLE_CONFIG_PIN_METHOD, /**< Simple Configuration PIN Method */
  110. TIWLN_SIMPLE_CONFIG_PBC_METHOD /**< Simple Configuration PBC Method */
  111. } TIWLN_SIMPLE_CONFIG_MODE;
  112. /** \enum EDraftNumber
  113. * \brief Draft Number
  114. *
  115. * \par Description
  116. * Site Manager / Exteranl Rate use draft number
  117. *
  118. * \sa
  119. */
  120. typedef enum
  121. {
  122. DRAFT_5_AND_EARLIER = 5, /**< */
  123. DRAFT_6_AND_LATER = 6 /**< */
  124. } EDraftNumber;
  125. /********************/
  126. /* Structures types */
  127. /********************/
  128. /** \struct TTxDataCounters
  129. * \brief TX Data Counters
  130. *
  131. * \par Description
  132. * Tx statistics per Tx-queue
  133. *
  134. * \sa
  135. */
  136. typedef struct
  137. {
  138. TI_UINT32 XmitOk; /**< The number of frames that were transferred to TNET without errors */
  139. TI_UINT32 DirectedBytesXmit; /**< The number of bytes in directed packets that are transmitted without errors */
  140. TI_UINT32 DirectedFramesXmit; /**< The number of directed packets that are transmitted without errors */
  141. TI_UINT32 MulticastBytesXmit; /**< The number of bytes in multicast/functional packets that are transmitted without errors */
  142. TI_UINT32 MulticastFramesXmit; /**< The number of multicast/functional packets that are transmitted without errors */
  143. TI_UINT32 BroadcastBytesXmit; /**< The number of bytes in broadcast packets that are transmitted without errors */
  144. TI_UINT32 BroadcastFramesXmit; /**< The number of broadcast packets that are transmitted without errors */
  145. TI_UINT32 RetryHistogram[ TX_RETRY_HISTOGRAM_SIZE ]; /**< Histogram counting the number of packets xfered with any retry number */
  146. TI_UINT32 RetryFailCounter; /**< Number of packets that failed transmission due to retry number exceeded */
  147. TI_UINT32 TxTimeoutCounter; /**< Number of packets that failed transmission due to lifetime expiry */
  148. TI_UINT32 NoLinkCounter; /**< Number of packets that failed transmission due to link failure */
  149. TI_UINT32 OtherFailCounter; /**< Number of packets that failed transmission due to other reasons */
  150. TI_UINT32 MaxConsecutiveRetryFail;/**< Maximum consecutive packets that failed transmission due to retry limit exceeded */
  151. /* TX path delay statistics */
  152. TI_UINT32 txDelayHistogram[TX_DELAY_RANGES_NUM]; /**< Histogram of Tx path delay (host + MAC) */
  153. TI_UINT32 NumPackets; /**< For average calculation - Total packets counted */
  154. TI_UINT32 SumTotalDelayMs; /**< For average calculation - the sum of packets total delay */
  155. TI_UINT32 SumFWDelayUs; /**< For average calculation - The sum of packets FW delay */
  156. TI_UINT32 SumMacDelayUs; /**< For average calculation - the sum of packets MAC delay */
  157. } TTxDataCounters;
  158. /** \struct TIWLN_TX_STATISTICS
  159. * \brief TI WLAN TX Statistics
  160. *
  161. * \par Description
  162. * All Tx statistics of all Tx Queues Tx-queue
  163. *
  164. * \sa
  165. */
  166. typedef struct
  167. {
  168. TTxDataCounters txCounters[MAX_NUM_OF_AC]; /**< Table which holds Tx statistics of each Tx-queue */
  169. } TIWLN_TX_STATISTICS;
  170. /** \struct TDfsChannelRange
  171. * \brief DFS Channel Range
  172. *
  173. * \par Description
  174. * Range of Dynamic Frequency Selection Channel
  175. *
  176. * \sa
  177. */
  178. typedef struct
  179. {
  180. TI_UINT16 minDFS_channelNum; /**< Lower limit of DFS Channel Range */
  181. TI_UINT16 maxDFS_channelNum; /**< Higher limit of DFS Channel Range */
  182. } TDfsChannelRange;
  183. /** \struct TDebugRegisterReq
  184. * \brief Debug Register Request
  185. *
  186. * \par Description
  187. * Used for reading HW register (for debug)
  188. *
  189. * \sa
  190. */
  191. typedef struct
  192. {
  193. TI_UINT32 regSize; /**< Register Size */
  194. TI_UINT32 regAddr; /**< Register Address */
  195. TI_UINT32 regValue; /**< Register value read */
  196. } TDebugRegisterReq;
  197. /** \struct TIWLN_REG_RW
  198. * \brief TI WLAN Register R/W
  199. *
  200. * \par Description
  201. * Used for writing HW register (for debug)
  202. *
  203. * \sa
  204. */
  205. typedef struct
  206. {
  207. TI_UINT32 regSize; /**< Register Size */
  208. TI_UINT32 regAddr; /**< Register Address */
  209. TI_UINT32 regValue; /**< Register write value */
  210. } TIWLN_REG_RW;
  211. /** \struct TCountry
  212. * \brief Country Parameters
  213. *
  214. * \par Description
  215. * Parameters of Country Informatino Element
  216. *
  217. * \sa
  218. */
  219. typedef struct
  220. {
  221. TI_UINT8 elementId; /**< Country IE ID */
  222. TI_UINT8 len; /**< Country IE data length */
  223. dot11_countryIE_t countryIE; /**< Country IE (country string and tripple channel) */
  224. } TCountry;
  225. /** \struct TRates
  226. * \brief Rates Parameters
  227. *
  228. * \par Description
  229. * Site Manager Supported rates parameters
  230. *
  231. * \sa
  232. */
  233. typedef struct
  234. {
  235. TI_UINT8 len; /**< Number of entries in the rates list */
  236. TI_UINT8 ratesString[DOT11_MAX_SUPPORTED_RATES]; /**< Rates List. From each entry - a different bitrate (in bps) can be driven as followed:
  237. ((ratesString[i] & 0x7F) * 500000). Bits 1-7 are used for the bitrate and bit 8 is MASK used
  238. for indicating if NET Basic
  239. */
  240. } TRates;
  241. /** \struct TRxDataFilterRequest
  242. * \brief RX Data Filter Request
  243. *
  244. * \par Description
  245. * Use for handling RX Data Filter (Add, Remove, parse, usage)
  246. *
  247. * \sa
  248. */
  249. typedef struct
  250. {
  251. TI_UINT8 offset; /**< Pattern Start Offset (0-255) */
  252. TI_UINT8 maskLength; /**< Byte-Mask Length, 1-8 bytes of mask, 0- match all packets */
  253. TI_UINT8 patternLength; /**< Should correspond to the number of asserted bits in the Byte-Mask */
  254. TI_UINT8 mask[RX_DATA_FILTER_MAX_MASK_SIZE]; /**< Byte-Mask */
  255. TI_UINT8 pattern[RX_DATA_FILTER_MAX_PATTERN_SIZE];/**< Data Filter PAttern */
  256. } TRxDataFilterRequest;
  257. /** \struct TIWLN_COUNTERS
  258. * \brief TI WLAN Counters
  259. *
  260. * \par Description
  261. * Use for handling RX Data Filter (Add, Remove, parse, usage)
  262. *
  263. * \sa
  264. */
  265. typedef struct
  266. {
  267. TI_UINT32 RecvOk; /**< Number of frames that the NIC receives without errors */
  268. TI_UINT32 RecvError; /**< Number of frames that a NIC receives but does not indicate to the protocols due to errors */
  269. TI_UINT32 RecvNoBuffer; /**< Number of frames that the NIC cannot receive due to lack of NIC receive buffer space */
  270. TI_UINT32 DirectedBytesRecv; /**< Number of bytes in directed packets that are received without errors */
  271. TI_UINT32 DirectedFramesRecv; /**< Number of directed packets that are received without errors */
  272. TI_UINT32 MulticastBytesRecv; /**< Number of bytes in multicast/functional packets that are received without errors */
  273. TI_UINT32 MulticastFramesRecv; /**< Number of multicast/functional packets that are received without errors */
  274. TI_UINT32 BroadcastBytesRecv; /**< Number of bytes in broadcast packets that are received without errors. */
  275. TI_UINT32 BroadcastFramesRecv; /**< Number of broadcast packets that are received without errors. */
  276. TI_UINT32 FragmentsRecv; /**< Number of Fragments Received */
  277. TI_UINT32 FrameDuplicates; /**< Number of Farme Duplicates */
  278. TI_UINT32 FcsErrors; /**< Number of frames that a NIC receives but does not indicate to the protocols due to errors */
  279. TI_UINT32 BeaconsXmit; /**< Number of Beacons Sent */
  280. TI_UINT32 BeaconsRecv; /**< Number of Beacons Reveived */
  281. TI_UINT32 AssocRejects; /**< Number of Rejected Assoc. */
  282. TI_UINT32 AssocTimeouts; /**< Number of Assoc. Time Outs */
  283. TI_UINT32 AuthRejects; /**< Number of Authentication rejects */
  284. TI_UINT32 AuthTimeouts; /**< Number of Authentication Time Outs */
  285. } TIWLN_COUNTERS;
  286. /** \struct TPowerMgr_PowerMode
  287. * \brief Power Mode Parameters
  288. *
  289. * \par Description
  290. *
  291. * \sa
  292. */
  293. typedef struct
  294. {
  295. PowerMgr_PowerMode_e PowerMode; /**< Power Mode Type */
  296. PowerMgr_Priority_e PowerMngPriority; /**< Power Mode Priority */
  297. } TPowerMgr_PowerMode;
  298. /** \struct TWscMode
  299. * \brief WSC Mode
  300. *
  301. * \par Description
  302. * This structure is used whenever the WiFi Simple Configuration Mode is modified between ON and OFF.
  303. * Upon enabling the Simple Configuration, the user must fill the probeReqWSCIE fields
  304. *
  305. * \sa
  306. */
  307. typedef struct
  308. {
  309. TIWLN_SIMPLE_CONFIG_MODE WSCMode; /**< WiFi Simple Configuration mode */
  310. TI_UINT32 uWscIeSize; /**< Simple Config IE actual size (the part after the OUI) */
  311. TI_UINT8 probeReqWSCIE[DOT11_WSC_PROBE_REQ_MAX_LENGTH]; /**< Buffer which holds the parameters of ProbeReq - WSC IE */
  312. } TWscMode;
  313. /** \struct TKeepAliveTemplate
  314. * \brief Keep Alive Template
  315. *
  316. * \par Description
  317. * Used for Add/Remove to/from FW Keep Alive Configuration (Parameters & Template)
  318. *
  319. * \sa
  320. */
  321. typedef struct
  322. {
  323. TKeepAliveParams keepAliveParams; /**< Keep Alive Parameters */
  324. TI_UINT8 msgBuffer[ KEEP_ALIVE_TEMPLATE_MAX_LENGTH ]; /**< Buffer which holds the Keep Alive Template */
  325. TI_UINT32 msgBufferLength; /**< Length of Keep Alive Template */
  326. } TKeepAliveTemplate;
  327. /** \struct TKeepAliveConfig
  328. * \brief Keep Alive Configuration
  329. *
  330. * \par Description
  331. * Used for Get/Set Keep Alive Configuration (Parameters & Template)
  332. *
  333. * \sa
  334. */
  335. typedef struct
  336. {
  337. TI_UINT8 enaDisFlag; /**< Indicates if Keep Alive is Enabled/Disabled */
  338. TKeepAliveTemplate templates[ KEEP_ALIVE_MAX_USER_MESSAGES ]; /**< Buffer which holds the maximum Keep Alive Template
  339. * possible (according to maximum Keep Alive user messages
  340. possible)
  341. */
  342. } TKeepAliveConfig;
  343. #endif /* __TIWLNIF_H__*/