PageRenderTime 47ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/inc/commonTypes.h

http://github.com/CyanogenMod/cm-kernel
C Header | 1133 lines | 786 code | 179 blank | 168 comment | 2 complexity | cfbb2e2ca93c2d8271224f2a80ef5f22 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. #ifndef __COMMON_TYPES_H__
  36. #define __COMMON_TYPES_H__
  37. #include "osTIType.h"
  38. #include "osDot11.h"
  39. #include "tiwlnif.h"
  40. #include "paramMng.h"
  41. #include "whalDefaultParams.h"
  42. /*****************************************************************************
  43. ** **
  44. ** **
  45. ** CONSTANTS **
  46. ** **
  47. ** **
  48. *****************************************************************************/
  49. /************************************/
  50. /* Report Module values */
  51. /************************************/
  52. #define CONFIG_MGR_MODULE_LOG (0x00)
  53. #define SME_SM_MODULE_LOG (0x01)
  54. #define SITE_MGR_MODULE_LOG (0x02)
  55. #define CONN_MODULE_LOG (0x03)
  56. #define MLME_SM_MODULE_LOG (0x04)
  57. #define AUTH_MODULE_LOG (0x05)
  58. #define ASSOC_MODULE_LOG (0x06)
  59. #define RX_DATA_MODULE_LOG (0x07)
  60. #define TX_DATA_MODULE_LOG (0x08)
  61. #define CTRL_DATA_MODULE_LOG (0x09)
  62. #define RSN_MODULE_LOG (0x0A)
  63. #define HAL_RX_MODULE_LOG (0x0B)
  64. #define HAL_TX_MODULE_LOG (0x0C)
  65. #define HAL_CTRL_MODULE_LOG (0x0D)
  66. #define HAL_SECURITY_MODULE_LOG (0x0E)
  67. #define MEM_MGR_MODULE_LOG (0x0F)
  68. #define REPORT_MODULE_LOG (0x10)
  69. #define SITE_UPDATE_MODULE_LOG (0x11)
  70. #define REGULATORY_DOMAIN_MODULE_LOG (0x12)
  71. #define MEASUREMENT_MNGR_MODULE_LOG (0x13)
  72. #define MEASUREMENT_SRV_MODULE_LOG (0x14)
  73. #define SOFT_GEMINI_MODULE_LOG (0x15)
  74. #define SC_MODULE_LOG (0x16)
  75. #define EXC_MANAGER_MODULE_LOG (0x17)
  76. #define ROAMING_MANAGER_MODULE_LOG (0x18)
  77. #define QOS_MANAGER_MODULE_LOG (0x19)
  78. #define TRAFFIC_ADM_CTRL_MODULE_LOG (0x1A)
  79. #define POWER_MANAGER_MODULE_LOG (0x1B)
  80. #define POWER_CONTROL_MODULE_LOG (0x1C)
  81. #define POWER_SERVER_MODULE_LOG (0x1D)
  82. #define ELP_MODULE_LOG (0x1E)
  83. #define SCR_MODULE_LOG (0x1F)
  84. #define SCAN_SRV_MODULE_LOG (0x20)
  85. #define SCAN_CNCN_MODULE_LOG (0x21)
  86. #define SCAN_MNGR_MODULE_LOG (0x22)
  87. #define GWSI_ADAPT_MODULE_LOG (0x23)
  88. #define GWSI_ADAPT_CB_MODULE_LOG (0x24)
  89. #define CORE_ADAPT_MODULE_LOG (0x25)
  90. #define TX_HW_QUEUE_MODULE_LOG (0x26)
  91. #define TX_CTRL_BLK_MODULE_LOG (0x27)
  92. #define TX_RESULT_MODULE_LOG (0x28)
  93. #define TNETW_IF_MODULE_LOG (0x29)
  94. #define TNETW_ARBITER_MODULE_LOG (0x2a)
  95. #define CURR_BSS_MODULE_LOG (0x2b)
  96. #define FW_EVENT_MODULE_LOG (0x2c)
  97. #define CMD_MBOX_MODULE_LOG (0x2d)
  98. #define CMDQUEUE_MODULE_LOG (0x2e)
  99. #define EVENT_MBOX_MODULE_LOG (0x2f)
  100. #define TNETW_DRV_MODULE_LOG (0x30)
  101. #define TNETW_XFER_MODULE_LOG (0x31)
  102. #define RECOVERY_MGR_MODULE_LOG (0x32)
  103. #define RECOVERY_CTRL_MODULE_LOG (0x33)
  104. #define HW_INIT_MODULE_LOG (0x34)
  105. #define WLAN_MAX_LOG_MODULES (HW_INIT_MODULE_LOG + 1)
  106. /************************************/
  107. /* Report Severity values */
  108. /************************************/
  109. #define WLAN_SEVERITY_INIT 1
  110. #define WLAN_SEVERITY_INFORMATION 2
  111. #define WLAN_SEVERITY_WARNING 3
  112. #define WLAN_SEVERITY_ERROR 4
  113. #define WLAN_SEVERITY_FATAL_ERROR 5
  114. #define WLAN_SEVERITY_SM 6
  115. #define WLAN_SEVERITY_CONSOLE 7
  116. #define WLAN_SEVERITY_DEBUG_RX 8
  117. #define WLAN_SEVERITY_DEBUG_TX 9
  118. #define WLAN_SEVERITY_DEBUG_CONTROL 10
  119. #define WLAN_SEVERITY_GWSI_RECORDING 11
  120. #define WLAN_MAX_SEVERITIES (WLAN_SEVERITY_GWSI_RECORDING + 1)
  121. #define MAX_INFO_ELEMENT_LEN (32)
  122. #define IP_ADDR_LEN 4
  123. #define IP_V4_ADDR_LEN 4
  124. #define IP_V6_ADDR_LEN 6
  125. #define MAX_MULTICAST_GROUP_ADDRS 8
  126. #define NUM_OF_NOISE_HISTOGRAM_COUNTERS (8)
  127. #define MAX_SUPPORTED_RATES 32
  128. #define RATES_SET_LEN 2
  129. #define MIN_DEFAULT_KEY_ID 0
  130. #define MAX_DEFAULT_KEY_ID 3
  131. #define KEY_RSC_LEN 8
  132. #define MIN_KEY_LEN 5
  133. #define MAX_KEY_LEN 32
  134. #define MAX_IDENTITY_LEN 64
  135. #define MAX_PASSWD_LEN 128
  136. #define MAX_NUM_OUI 16
  137. #define DOT11_OUI_LEN 3
  138. /* The maximum number of multiple SSIDs that can be used in a single scan command */
  139. #define SCAN_MAX_SSID_NUM (1)
  140. /* The maximum number of information elements that sent in an active scan probe request
  141. including the SSID */
  142. #define SCAN_MAX_INFO_ELEMENTS (3)
  143. /* WoneIndex value when running as station */
  144. #define STATION_WONE_INDEX (0)
  145. /* Power translation table definitions */
  146. #define NUM_POWER_LEVELS (4)
  147. #define MAX_POWER_LEVEL (0)
  148. #define MIN_POWER_LEVEL (NUM_POWER_LEVELS - 1)
  149. #define DBM_TO_TX_POWER_FACTOR 10
  150. /* TX_POWER is in Dbm/10 units */
  151. #define MAX_TX_POWER 255
  152. #define MIN_TX_POWER 0
  153. #define NUM_SUB_BANDS_FOR_POWER_TABLE 5
  154. #define BAND_2_4_POWER_TABLE 0
  155. #define MAX_NUM_OF_TX_RATE_CLASS_POLICIES 8 /* max num of policies */
  156. #define MAX_PARAM_MODULE_NUMBER (GET_PARAM_MODULE_NUMBER(MAX_PARAM_MODULE_PARAM)) /*19*/
  157. #define FW_VERSION_LEN 20
  158. #ifndef TI_STATUS
  159. #define TI_STATUS systemStatus_e
  160. #endif
  161. #define NUM_OF_MAX_TRIPLET_CHANNEL (32)
  162. #define COUNTRY_STRING_LEN 3
  163. /* Definitions for Rx Filter MIB. */
  164. #define PLT_MIB_RX_FILTER_PROMISCOUS_SET (UINT8) 0x01 /* set ? Enable: Forward all frames to host driver*/
  165. #define PLT_MIB_RX_FILTER_PROMISCOUS_CLEAR (UINT8) 0x00 /* cleared ? Disable: Do not orward all frames to the host driver*/
  166. #define PLT_MIB_RX_FILTER_BSSID_SET (UINT8) 0x02 /* set ? filter enabled: receive only those frames that match the BSSID given in the Join command*/
  167. #define PLT_MIB_RX_FILTER_BSSID_CLEAR (UINT8) 0x00 /* cleared ? filter disabled: ignore BSSID in receiving*/
  168. /*****************************************************************************
  169. ** **
  170. ** **
  171. ** ENUMS **
  172. ** **
  173. ** **
  174. *****************************************************************************/
  175. typedef enum
  176. {
  177. txPolicy54 = 0,
  178. txPolicy48,
  179. txPolicy36,
  180. txPolicy24,
  181. txPolicy22,
  182. txPolicy18,
  183. txPolicy12,
  184. txPolicy11,
  185. txPolicy9,
  186. txPolicy6,
  187. txPolicy5_5,
  188. txPolicy2,
  189. txPolicy1,
  190. MAX_NUM_OF_TX_RATES_IN_CLASS
  191. }txRateClassId_e;
  192. typedef enum{
  193. DROP_NEW_PACKET = 0,
  194. DROP_OLD_PACKET
  195. }qOvFlowPolicy_e;
  196. typedef enum
  197. {
  198. SG_ENABLE = 0,
  199. SG_DISABLE ,
  200. SG_SENSE_NO_ACTIVITY ,
  201. SG_SENSE_ACTIVE
  202. } SoftGeminiEnableModes_e;
  203. typedef enum
  204. {
  205. IP_VER_4 = 0,
  206. IP_VER_6
  207. } IPver_e;
  208. typedef enum
  209. {
  210. DRV_MODULATION_NONE = 0,
  211. DRV_MODULATION_CCK = 1,
  212. DRV_MODULATION_PBCC = 2,
  213. DRV_MODULATION_QPSK = 3,
  214. DRV_MODULATION_OFDM = 4,
  215. } modulationType_e;
  216. /* tx antenna */
  217. typedef enum
  218. {
  219. TX_ANTENNA_2 = 0,
  220. TX_ANTENNA_1 = 1
  221. } txAntenna_e;
  222. /* rx antenna */
  223. typedef enum
  224. {
  225. RX_ANTENNA_1 = 0,
  226. RX_ANTENNA_2 = 1,
  227. RX_ANTENNA_FULL = 2,
  228. RX_ANTENNA_PARTIAL = 3
  229. } rxAntenna_e;
  230. typedef enum
  231. {
  232. HW_CLOCK_40_MHZ = 40,
  233. HW_CLOCK_80_MHZ = 80
  234. } hwClock_e;
  235. typedef enum
  236. {
  237. MAXIM = 0,
  238. RFMD = 1,
  239. RADIA_BG = 2,
  240. RADIA_ABG = 3,
  241. UNKNOWN_RADIO_TYPE = 4
  242. } radioType_e;
  243. /** Available cipher suites for admission control */
  244. typedef enum
  245. {
  246. RSN_CIPHER_NONE = 0, /**< no chpiher suite */
  247. RSN_CIPHER_WEP = 1, /**< WEP-40 chpiher suite */
  248. RSN_CIPHER_TKIP = 2, /**< TKIP chpiher suite */
  249. RSN_CIPHER_AES_WRAP = 3, /**< AES WRAP chpiher suite */
  250. RSN_CIPHER_AES_CCMP = 4, /**< AES CCMP chpiher suite */
  251. RSN_CIPHER_WEP104 = 5, /**< WEP-104 chpiher suite */
  252. RSN_CIPHER_CKIP = 6, /**< CKIP chpiher suite */
  253. RSN_CIPHER_UNKNOWN = 255 /**< UNKNOWN chpiher suite */
  254. } cipherSuite_e;
  255. /** RSN supported authentication suites */
  256. typedef enum
  257. {
  258. RSN_AUTH_OPEN = 0, /*< Legacy Open authentication suite */
  259. RSN_AUTH_SHARED_KEY = 1, /*< Legacy Shared Key authentication suite */
  260. RSN_AUTH_AUTO_SWITCH = 2, /*< Automatic authentication suite */
  261. RSN_AUTH_NONE = 255 /*< no authentication suite */
  262. } authSuite_e;
  263. /* Available External authentication modes for admission control */
  264. typedef enum
  265. {
  266. RSN_EXT_AUTH_MODE_OPEN = RSN_AUTH_OPEN,
  267. RSN_EXT_AUTH_MODE_SHARED_KEY = RSN_AUTH_SHARED_KEY,
  268. RSN_EXT_AUTH_MODE_AUTO_SWITCH = RSN_AUTH_AUTO_SWITCH,
  269. RSN_EXT_AUTH_MODE_WPA,
  270. RSN_EXT_AUTH_MODE_WPAPSK,
  271. RSN_EXT_AUTH_MODE_WPANONE,
  272. RSN_EXT_AUTH_MODE_WPA2,
  273. RSN_EXT_AUTH_MODE_WPA2PSK,
  274. RSN_EXT_AUTH_MODEMAX /* Not a real mode, defined as upper bound */
  275. } externalAuthMode_e;
  276. typedef enum
  277. {
  278. RSN_AUTH_STATUS_INVALID_TYPE = 0x0001,
  279. RSN_AUTH_STATUS_TIMEOUT = 0x0002,
  280. RSN_AUTH_STATUS_CHALLENGE_FROM_AP_FAILED = 0x0003,
  281. RSN_AUTH_STATUS_CHALLENGE_TO_AP_FAILED = 0x0004
  282. } authStatus_e;
  283. /************************************/
  284. /* System return values. */
  285. /************************************/
  286. #undef OK
  287. #undef NOK
  288. typedef enum
  289. {
  290. /* System section */
  291. #if !defined(OK) || (OK!=0)
  292. OK = 0,
  293. #endif
  294. #if !defined(NOK) || (NOK!=1)
  295. NOK = 1,
  296. #endif
  297. /* GWSI status */
  298. GWSI_FAILED = 1,
  299. PARAM_NOT_SUPPORTED = 2,
  300. PARAM_VALUE_NOT_VALID = 3,
  301. CONFIGURATION_NOT_VALID = 4,
  302. NO_SITE_SELECTED_YET = 5,
  303. RE_SCAN_NEEDED = 6,
  304. EXTERNAL_SET_PARAM_DENIED = 7,
  305. EXTERNAL_GET_PARAM_DENIED = 8,
  306. PARAM_MODULE_NUMBER_INVALID = 9,
  307. STATION_IS_NOT_RUNNING = 10,
  308. CARD_IS_NOT_INSTALLED = 11,
  309. /* Data path section */
  310. RX_MIC_FAILURE_ERROR = 12,
  311. RX_DECRYPT_FAILURE = 13,
  312. RX_STATUS_FAILURE = 14,
  313. TX_QUEUE_SELECTED_OK = 15,
  314. NO_TX_QUEUE_SELECTED = 16,
  315. TX_STATUS_PENDING = 17,
  316. TX_STATUS_NO_RESOURCES = 18,
  317. TX_STATUS_FAILURE = 19,
  318. TX_STATUS_OK = 20,
  319. /* 4x section */
  320. MAKE_CONCATENATION = 21,
  321. SEND_ONE_MSDU = 22,
  322. DO_NOT_SEND_MSDU = 23,
  323. FOUR_X_DISABLE = 24,
  324. /* Scanning section */
  325. NO_COUNTRY = 25,
  326. SCAN_ALREADY_IN_PROGRESS = 26,
  327. NO_SCAN_IN_PROGRESS = 27,
  328. /* Setting same power */
  329. TX_POWER_SET_SAME_VALUE = 28,
  330. /* changing service channel */
  331. CHANNEL_CHANGED = 29,
  332. SUPPORT_IMMEDIATE_MEASUREMENT_ONLY = 30,
  333. MEASUREMENT_TYPE_NOT_SUPPORT = 31,
  334. MEASUREMENT_CAN_NOT_EXECUTED_IN_PARALLEL = 32,
  335. MEASUREMENT_REQUEST_IGNORED = 33,
  336. CANNOT_SET_MEASUREMENT_PARAM_WHEN_ACTIVATED = 34,
  337. CANNOT_SET_CHANNEL_THAT_IS_NOT_SUPPORTED = 35,
  338. /* rsn */
  339. STATUS_BAD_KEY_PARAM = 36,
  340. STATUS_RX_MIC_FAIL = 37,
  341. /* site Manager */
  342. STATUS_FIRST_PRIMARY_SITE_SET = 38,
  343. /*
  344. Power Management
  345. */
  346. POWER_SAVE_802_11_SUCCESS = 39,
  347. POWER_SAVE_802_11_FAIL = 40,
  348. POWER_SAVE_802_11_NOT_ALLOWED = 41,
  349. PENDING = 42,
  350. /* GWSI TX packet sending status */
  351. SEND_COMPLETE_SUCCESS = 44,
  352. SEND_COMPLETE_RETRY_EXCEEDED = 45,
  353. SEND_COMPLETE_LIFETIME_EXCEEDED = 46,
  354. SEND_COMPLETE_NO_LINK = 47,
  355. SEND_COMPLETE_MAC_CRASHED = 48,
  356. /*POWER_SAVE_802_11_NOT_ALLOWED = 39,*/
  357. POWER_SAVE_802_11_IS_CURRENT = 49,
  358. /* GWSI TX Send-Packet status */
  359. SEND_PACKET_XFER_DONE = 50, /* Xfer completed, another packet can be sent, Xfer-Done won't be called. */
  360. SEND_PACKET_SUCCESS = 51, /* Xfer in process, another packet can be sent, Xfer-Done will be called. */
  361. SEND_PACKET_PENDING = 52, /* Xfer in process, another packet CAN-NOT be sent. Xfer-Done will be called. */
  362. SEND_PACKET_BUSY = 53, /* Packet rejected due to queue lack of resources.
  363. Should be sent again after resources are freed on Tx-complete. */
  364. SEND_PACKET_ERROR = 54, /* Packet rejected due to API violation (sending in PENDING state or wrong params. */
  365. SEND_PACKET_RECOVERY = 55, /* Recovery happened during Xfer */
  366. /* QoSMngr */
  367. TI_WLAN_QOS_RETURN_CODES, /* detailed in tiQosTypes.h */
  368. /* TNETWIF Return Errors */
  369. TNETWIF_NONE,
  370. TNETWIF_OK,
  371. TNETWIF_COMPLETE,
  372. TNETWIF_PENDING,
  373. TNETWIF_ERROR,
  374. TNETWIF_MORE,
  375. /* Rx Data Filters */
  376. RX_NO_AVAILABLE_FILTERS,
  377. RX_FILTER_ALREADY_EXISTS,
  378. RX_FILTER_DOES_NOT_EXIST,
  379. /* Soft Gemini */
  380. SG_REJECT_MEAS_SG_ACTIVE,
  381. } systemStatus_e;
  382. typedef enum
  383. {
  384. NO_FAILURE = -1,
  385. NO_SCAN_COMPLETE_FAILURE = 0,
  386. MBOX_FAILURE,
  387. HW_AWAKE_FAILURE,
  388. BUS_ERROR,
  389. DEVICE_ERROR,
  390. TX_STUCK,
  391. DISCONNECT_TIMEOUT,
  392. POWER_SAVE_FAILURE,
  393. MEASUREMENT_FAILURE,
  394. MAX_FAILURE_EVENTS
  395. } failureEvent_e;
  396. /** \enum TnetWakeOn_e */
  397. typedef enum
  398. {
  399. TNET_WAKE_ON_BEACON, /**< Indicate the wake on event of the HW - beacon.
  400. * In this event the HW configure to be awake on every beacon.
  401. */
  402. TNET_WAKE_ON_DTIM, /**< Indicate the wake on event of the HW - DTIM. In this event
  403. * the HW configure to be awake on every DITM (configure by the AP).
  404. */
  405. TNET_WAKE_ON_N_BEACON, /**< Indicate the wake on event of the HW - listen interval.
  406. * In this event the HW configure to be awake on every
  407. * configured number of beacons.
  408. */
  409. TNET_WAKE_ON_N_DTIM, /**< Indicate the wake on event of the HW - listen interval.
  410. * In this event the HW configure to be awake on every
  411. * configured number of beacons.
  412. */
  413. TNET_WAKE_ON_HOST /**< Indicate the wake on event of the HW - Host access only
  414. */
  415. }PowerMgr_TnetWakeOn_e;
  416. /** \enum PowerMgr_RequestFor_802_11_PS_e */
  417. typedef enum
  418. {
  419. REQUEST_TO_ENTER_POWER_SAVE_802_11, /**< request to enter to power save
  420. * of 802.11
  421. */
  422. REQUEST_NOT_TO_CHANGE_POWER_SAVE_802_11, /**< request to not change the
  423. * power save of 802.11
  424. */
  425. REQUEST_TO_EXIT_POWER_SAVE_802_11 /**< request to exit from power save
  426. * of 802.11
  427. */
  428. }PowerMgr_RequestFor_802_11_PS_e;
  429. typedef enum
  430. {
  431. POWER_SAVE_OFF, /**< power save of 802.11
  432. */
  433. POWER_SAVE_ON , /**< power save on 802.11
  434. */
  435. POWER_SAVE_KEEP_CURRENT /**< power save 802.11 don't change
  436. */
  437. }PowerMgr_802_11_PsMode_e;
  438. typedef enum
  439. {
  440. POWERAUTHO_POLICY_ELP = 0,
  441. POWERAUTHO_POLICY_PD = 1,
  442. POWERAUTHO_POLICY_AWAKE = 2,
  443. POWERAUTHO_POLICY_NUM
  444. } powerAutho_PowerPolicy_e;
  445. typedef enum
  446. {
  447. ELPCTRL_MODE_NORMAL = 0,
  448. ELPCTRL_MODE_KEEP_AWAKE
  449. } elpCtrl_Mode_e;
  450. /*
  451. * this enum defines the protocol modes of the QOS management object.
  452. */
  453. typedef enum{
  454. WME = 0,
  455. NONE_QOS,
  456. }qosProtocols_e;
  457. typedef enum
  458. {
  459. RX_PACKET_TYPE_DATA = 0,
  460. RX_PACKET_TYPE_MANAGEMENT
  461. }rxPacketType_e;
  462. typedef enum
  463. {
  464. DOT11_B_MODE = 1,
  465. DOT11_A_MODE = 2,
  466. DOT11_G_MODE = 3,
  467. DOT11_DUAL_MODE = 4,
  468. DOT11_MAX_MODE
  469. } dot11mode_e;
  470. /* hw access method*/
  471. typedef enum
  472. {
  473. HW_ACCESS_BUS_SLAVE_INDIRECT = 0,
  474. HW_ACCESS_BUS_SLAVE_DIRECT = 1,
  475. HW_ACCESS_BUS_MASTER = 2
  476. } hwAccessMethod_e;
  477. /*
  478. * this enum includes the header converting modes configured to dataCtrl object.
  479. */
  480. typedef enum{
  481. NO_CONVERT = 0,
  482. QOS_CONVERT,
  483. LEGACY_CONVERT,
  484. }headerConvetMode_e;
  485. /* * this enum defines the admission state configured to dataCtrl object.
  486. */
  487. typedef enum{
  488. ADMISSION_NOT_REQUIRED = 0,
  489. ADMISSION_REQUIRED = 1,
  490. }admissionState_e;
  491. /*****************************************************************************
  492. ** **
  493. ** **
  494. ** TYPEDEFS **
  495. ** **
  496. ** **
  497. *****************************************************************************/
  498. /**<
  499. * Callback for 802.11 PS - Success/Fail
  500. */
  501. typedef void (*ps802_11_NotificationCB_t)(TI_HANDLE module,
  502. TI_STATUS thePsSuccess);
  503. /**<
  504. * Asynchronous init mode callback function type
  505. */
  506. typedef void (*fnotify_t)(TI_HANDLE module, TI_STATUS status);
  507. typedef struct
  508. {
  509. UINT8 txRate[MAX_NUM_OF_TX_RATES_IN_CLASS];
  510. UINT8 shortRetryLimit;
  511. UINT8 longRetryLimit;
  512. UINT8 flags;
  513. }txRateClass_t;
  514. typedef struct
  515. {
  516. UINT32 numOfRateClasses;
  517. txRateClass_t rateClass[MAX_NUM_OF_TX_RATE_CLASS_POLICIES];
  518. }txRatePolicy_t;
  519. PACKED_STRUCT( e2Version_t,
  520. UINT16 major;
  521. UINT8 minor;
  522. UINT8 last;
  523. UINT16 bugfix;
  524. );
  525. PACKED_STRUCT( TripletCahnnel_t,
  526. UINT8 firstChannelNumber;
  527. UINT8 numberOfChannels;
  528. UINT8 maxTxPowerLevel;
  529. );
  530. PACKED_STRUCT( IpAddress_t,
  531. UINT8 addr[IP_ADDR_LEN];
  532. );
  533. PACKED_STRUCT( informationElementHeader_t,
  534. UINT8 eleId;
  535. UINT8 eleLen;
  536. );
  537. PACKED_STRUCT( informationElement_t,
  538. informationElementHeader_t hdr;
  539. UINT8 info[MAX_INFO_ELEMENT_LEN];
  540. );
  541. PACKED_STRUCT( countryIE_t,
  542. UINT8 CountryString[COUNTRY_STRING_LEN];
  543. TripletCahnnel_t tripletChannels[NUM_OF_MAX_TRIPLET_CHANNEL];
  544. );
  545. /* Struct retrieved from NVS */
  546. typedef struct
  547. {
  548. UINT8 uDbm[NUM_SUB_BANDS_FOR_POWER_TABLE][NUM_POWER_LEVELS];
  549. } powerLevelTable_t;
  550. PACKED_STRUCT( SoftGeminiParam_t,
  551. UINT32 wlanRxMinRateToRespectBtHp; /* Integer rate number. Note that Fw gets it in Index rate */
  552. UINT16 btHpMaxTime; /* the maximum length of time the BT HP will be respected*/
  553. UINT16 wlanHpMaxTime; /* the maximum length of time the WLAN HP will be respected*/
  554. UINT16 senseDisableTimer; /* the length of time when working in SENSE mode that the BT needs to be inactive in order to DISABLE the SG*/
  555. UINT16 protectiveRxTimeBeforeBtHp;
  556. UINT16 protectiveTxTimeBeforeBtHp;
  557. UINT16 protectiveRxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 1500*/
  558. UINT16 protectiveTxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 3000*/
  559. UINT16 protectiveWlanCycleTimeForFastAp; /*new range: 2000-65535 default: 8700*/
  560. UINT16 btAntiStarvationPeriod; /* 0 - 15000Msec */
  561. UINT16 timeoutNextBtLpPacket;
  562. UINT16 wakeUpTimeBeforeBeacon;
  563. UINT16 hpdmMaxGuardTime; /* 0-50000 */
  564. UINT16 timeoutNextWlanPacket;
  565. UINT8 sgAntennaType;
  566. UINT8 signalingType;
  567. UINT8 afhLeverageOn; /* specifies whether to use the AFH information from the BT */
  568. UINT8 numberQuietCycle;
  569. UINT8 maxNumCts;
  570. UINT8 numberOfWlanPackets;
  571. UINT8 numberOfBtPackets;
  572. UINT8 numberOfMissedRxForAvalancheTrigger; /*new range: 1-255 default: 5*/
  573. UINT8 wlanElpHpSupport; /* new range: 0-1 default: 1*/
  574. UINT8 btAntiStarvationNumberOfCyclesWithinThePeriod; /* 0 - 15 Cycles */
  575. UINT8 ackModeDuringBtLpInDualAnt;
  576. UINT8 allowPaSdToggleDuringBtActivityEnable;
  577. UINT8 sgAutoModeNoCts;
  578. UINT8 numOfBtHpRespectedReq;
  579. ); /* Parameters directly to FW */
  580. PACKED_STRUCT( interogateCmdHdr_t,
  581. UINT16 id;
  582. UINT16 len;
  583. );
  584. /* Struct for retrieving powerLevelTable_t with interrogate IE */
  585. typedef struct
  586. {
  587. interogateCmdHdr_t tPowerLevelResCmdHdr;
  588. powerLevelTable_t tTable;
  589. } powerLevelTableInterrogate_t;
  590. typedef struct
  591. {
  592. interogateCmdHdr_t noiseHistResCmdHdr;
  593. UINT32 counters[NUM_OF_NOISE_HISTOGRAM_COUNTERS];
  594. UINT32 numOfLostCycles;
  595. UINT32 numOfTxHwGenLostCycles;
  596. UINT32 numOfRxLostCycles;
  597. } noiseHistogramResults_t;
  598. /*
  599. * interogateCmdCBParams_t:
  600. * Note that this structure is used by the GWSI
  601. * both for setting (writing to the device) and
  602. * for retreiving (Reading from the device),
  603. * while being called with a completion CB
  604. */
  605. typedef struct
  606. {
  607. void* CB_Func; /* Completion CB function*/
  608. TI_HANDLE CB_handle; /* CB handle*/
  609. UINT8* CB_buf; /* Buffer contains the content to be written or the retrieved content*/
  610. } interogateCmdCBParams_t;
  611. typedef struct
  612. {
  613. void* CB_Func;
  614. TI_HANDLE CB_handle;
  615. UINT8* CB_buf;
  616. } configureCmdCBParams_t;
  617. PACKED_STRUCT( securityKeys_t,
  618. keyType_e keyType; /* key type (WEP, TKIP etc.) */
  619. UINT32 encLen;
  620. UINT8 encKey[MAX_KEY_LEN];
  621. UINT8 micRxKey[MAX_KEY_LEN];
  622. UINT8 micTxKey[MAX_KEY_LEN];
  623. UINT32 keyIndex; /* id=0 is broadcast key */
  624. macAddress_t macAddress;
  625. UINT8 keyRsc[KEY_RSC_LEN];
  626. );
  627. typedef struct
  628. {
  629. UINT8 queueID;
  630. UINT8 channelType;
  631. UINT8 tsid;
  632. UINT32 dot11EDCATableMSDULifeTime;
  633. UINT8 psScheme;
  634. UINT8 ackPolicy;
  635. UINT32 APSDConf[2];
  636. } queueTrafficParams_t;
  637. typedef struct
  638. {
  639. UINT8 ac;
  640. UINT8 cwMin;
  641. UINT16 cwMax;
  642. UINT8 aifsn;
  643. UINT16 txopLimit;
  644. }acQosParams_t;
  645. PACKED_STRUCT( rxTimeOut_t,
  646. UINT16 psPoll;
  647. UINT16 UPSD;
  648. );
  649. PACKED_STRUCT( QOS_AC_IE_ParametersRecord_t,
  650. UINT8 ACI_AIFSN;
  651. UINT8 ECWmin_ECWmax;
  652. UINT16 TXOPLimit;
  653. );
  654. PACKED_STRUCT( ACParameters_t,
  655. QOS_AC_IE_ParametersRecord_t ACBEParametersRecord;
  656. QOS_AC_IE_ParametersRecord_t ACBKParametersRecord;
  657. QOS_AC_IE_ParametersRecord_t ACVIParametersRecord;
  658. QOS_AC_IE_ParametersRecord_t ACVOParametersRecord;
  659. );
  660. typedef struct{
  661. UINT8 PsMode; /* power save mode. */
  662. UINT16 TxQueueSize;
  663. UINT8 QueueIndex;
  664. qOvFlowPolicy_e QueueOvFlowPolicy;
  665. UINT8 ackPolicy;
  666. UINT32 MsduLifeTime;
  667. }acTrfcCtrl_t;
  668. typedef struct{
  669. headerConvetMode_e headerConverMode; /* header converting mode */
  670. BOOL convertTagZeroFrames; /* flag for converting zero tags */
  671. trafficAdmState_e admissionState; /* AC admission state */
  672. admissionState_e admissionRequired; /* AC admission is mandatory. */
  673. acTrfcType_e tag_ToAcClsfrTable[MAX_NUM_OF_802_1d_TAGS]; /* tag to AC classification */
  674. }qosParams_t;
  675. typedef struct{
  676. acTrfcCtrl_t acTrfcCtrl;
  677. qosParams_t qosParams;
  678. UINT8 *tsrsArr;
  679. UINT8 tsrsArrLen;
  680. UINT8 acID;
  681. }txDataQosParams_t;
  682. typedef struct{
  683. UINT8 voiceTspecConfigure;
  684. UINT8 videoTspecConfigure;
  685. }TspecConfigure_t;
  686. /*************************************/
  687. /* TNETW Driver init table. */
  688. /*************************************/
  689. PACKED_STRUCT(whalCtrl_tx_Queue_t,
  690. UINT8 numDesc;
  691. UINT8 priority;
  692. );
  693. PACKED_STRUCT(whalCtrl_init_t,
  694. UINT8 hwAccessMethod;
  695. UINT8 maxSitesFragCollect;
  696. UINT8 packetDetectionThreshold;
  697. UINT32 blockSize;
  698. UINT8 rxDescNum;
  699. UINT8 txDescNum;
  700. UINT32 nullTemplateSize;
  701. UINT32 beaconTemplateSize;
  702. UINT32 probeRequestTemplateSize;
  703. UINT32 probeResponseTemplateSize;
  704. UINT32 PsPollTemplateSize;
  705. UINT32 qosNullDataTemplateSize;
  706. UINT32 tddRadioCalTimout;
  707. UINT32 CrtRadioCalTimout;
  708. int UseMboxInterrupt;
  709. int UseTxDataInterrupt;
  710. UINT32 TraceBufferSize;
  711. BOOLEAN bDoPrint;
  712. UINT8 StaMacAddress[MAC_ADDR_LEN];
  713. UINT8 UsePlcpHeader;
  714. UINT8 numTxQueues;
  715. whalCtrl_tx_Queue_t tx_attrib_queue[MAX_NUM_OF_TX_QUEUES];
  716. BOOL TxFlashEnable;
  717. UINT8 rxMemBlkNumber;
  718. UINT8 txMinMemBlkNumber;
  719. UINT16 txCompleteTimeout;
  720. UINT8 txCompleteThreshold;
  721. UINT8 TxBlocksHighPercentPerAc[MAX_NUM_OF_AC];
  722. UINT8 TxBlocksLowPercentPerAc[MAX_NUM_OF_AC];
  723. UINT16 BeaconRxTimeout;
  724. UINT16 BroadcastRxTimeout;
  725. UINT8 RxBroadcastInPs;
  726. UINT8 ConsecutivePsPollDeliveryFailureThreshold;
  727. );
  728. PACKED_STRUCT(halCtrlConfigParams_t,
  729. UINT8 halCtrlCalibrationChannel2_4;
  730. UINT8 halCtrlCalibrationChannel5_0;
  731. UINT16 halCtrlRtsThreshold;
  732. UINT16 halCtrlFragThreshold;
  733. UINT32 halCtrlMaxTxMsduLifetime;
  734. UINT32 halCtrlMaxRxMsduLifetime;
  735. UINT8 halCtrlRateFallbackRetry;
  736. UINT16 halCtrlListenInterval;
  737. BOOL halCtrlEnable4x;
  738. txAntenna_e halCtrlTxAntenna;
  739. rxAntenna_e halCtrlRxAntenna;
  740. UINT8 halCtrlMacClock;
  741. UINT8 halCtrlArmClock;
  742. BOOL halCtrlRxEnergyDetection;
  743. BOOL halCtrlTxEnergyDetection;
  744. BOOL halCtrlEepromLessEnable;
  745. UINT16 halCtrlBcnRxTime;
  746. BOOL halCtrlRxDisableBroadcast;
  747. BOOL halCtrlRecoveryEnable;
  748. BOOL halCtrlFirmwareDebug;
  749. /* hardware ACI parameters */
  750. UINT8 halCtrlACIMode;
  751. UINT8 halCtrlInputCCA;
  752. UINT8 halCtrlQualifiedCCA;
  753. UINT8 halCtrlStompForRx;
  754. UINT8 halCtrlStompForTx;
  755. UINT8 halCtrlTxCCA;
  756. rxTimeOut_t rxTimeOut;
  757. UINT8 halCtrlTxCompleteThreshold;
  758. BOOL WiFiWmmPS;
  759. );
  760. typedef struct
  761. {
  762. UINT16 gpioBitNumForRadioDisableFeature;
  763. }radioDisableParams_t;
  764. /* New Power*/
  765. PACKED_STRUCT(PowerSrvInitParams_t,
  766. /* powerMgmtConfig IE */
  767. UINT8 numNullPktRetries;
  768. UINT8 hangOverPeriod;
  769. );
  770. PACKED_STRUCT( scanSrvInitParams_t,
  771. UINT32 numberOfNoScanCompleteToRecovery;
  772. UINT32 uTriggeredScanTimeOut; /* i.e. split scan */
  773. );
  774. PACKED_STRUCT(reportInitParams_t,
  775. UINT8 SeverityTable[WLAN_MAX_SEVERITIES];
  776. UINT8 ModuleTable[WLAN_MAX_LOG_MODULES];
  777. );
  778. PACKED_STRUCT(beaconFilterParams_t,
  779. UINT8 desiredState;
  780. UINT8 currentState;
  781. UINT8 numOfStored;
  782. UINT8 IETable[BEACON_FILTER_IE_TABLE_MAX_SIZE];
  783. UINT8 numOfElements;
  784. UINT8 IETableSize;
  785. );
  786. PACKED_STRUCT(arpIpFilterParams_t,
  787. UINT8 isFilterEnabled;
  788. IpAddress_t arpIpInitParams;
  789. );
  790. PACKED_STRUCT(macAddrFilterParams_t,
  791. UINT8 isFilterEnabled;
  792. UINT8 numOfMacAddresses;
  793. macAddress_t macAddrTable[MAX_MULTICAST_GROUP_ADDRS];
  794. );
  795. PACKED_STRUCT(txXferInitParams_t,
  796. /* Duration in which HW buffer is full until recovery is triggered */
  797. UINT32 timeToTxStuckMs;
  798. );
  799. PACKED_STRUCT(macPreambleParams_t,
  800. UINT8 earlyWakeUp;
  801. );
  802. /*
  803. * TnetwDrv_InitParams_t:
  804. * This structure encapsulates the initialization data required by the TnetwDrv layer
  805. */
  806. PACKED_STRUCT(TnetwDrv_InitParams_t,
  807. whalCtrl_init_t whalCtrl_init;
  808. halCtrlConfigParams_t halCtrlConfigParams;
  809. reportInitParams_t reportParams;
  810. PowerSrvInitParams_t PowerSrvInitParams;
  811. scanSrvInitParams_t scanSrvInitParams;
  812. arpIpFilterParams_t arpIpFilterParams;
  813. macAddrFilterParams_t macAddrFilterParams;
  814. beaconFilterParams_t beaconFilterParams;
  815. txXferInitParams_t txXferInitParams;
  816. macPreambleParams_t macPreambleParams;
  817. );
  818. /* PLT*/
  819. typedef struct
  820. {
  821. UINT32 FCSErrorCount; /* increment when an FCS error is detected in a received MPDU*/
  822. UINT32 TotalFrameCount;/* increment for each packet.*/
  823. UINT32 PLCPErrorCount; /* increment when an PLCP error is detected in a received MPDU*/
  824. UINT32 SeqNumMissCount; /* Increment when an sequence number of arrived packet is not in order */
  825. UINT32 SeqNumMissCountRef; /* holds the reference value for seqNumMissCount test start */
  826. }PltRxPer_t;
  827. typedef struct
  828. {
  829. UINT32 chID; /* Channel number */
  830. UINT32 rate; /* index of the transmit */
  831. UINT32 InterPacketDelay;/*(ms) */
  832. UINT32 NumOfFrames;
  833. UINT32 aPacketLength;
  834. UINT32 aSeqNumMode; /* fixed / incremented */
  835. macAddress_t aPeerMacAddr;
  836. UINT8 preamble; /* {PREAMBLE_LONG | PREAMBLE_SHORT } */
  837. UINT8 band; /* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK } */
  838. UINT8 mode; /* {AUTO_SEQ_NUMBER | RANDOM_DATA | ZOZO_DATA} */
  839. UINT8 aPadding[3];
  840. }PltTxContinues_t;
  841. /* ChannelBand_t - */
  842. /* This structure holds the parameters for TX carrier test and radio tune*/
  843. typedef struct
  844. {
  845. UINT32 channel; /* Channel number*/
  846. UINT32 band; /* Band */
  847. } ChannelBand_t;
  848. /* PLT - MIBs structures */
  849. /* TMIB - */
  850. /* Specifies the type of a MIB element */
  851. typedef enum
  852. {
  853. PLT_MIB_dot11StationId = 0x1001,
  854. PLT_MIB_dot11MaxReceiveLifetime,
  855. PLT_MIB_dot11SlotTime,
  856. PLT_MIB_dot11GroupAddressesTable,
  857. PLT_MIB_dot11WepDefaultKeyId,
  858. PLT_MIB_dot11CurrentTxPowerLevel,
  859. PLT_MIB_dot11RTSThreshold,
  860. PLT_MIB_ctsToSelf = 0x1101,
  861. PLT_MIB_arpIpAddressesTable,
  862. PLT_MIB_templateFrame,
  863. PLT_MIB_rxFilter,
  864. PLT_MIB_beaconFilterIETable,
  865. PLT_MIB_beaconFilterEnable,
  866. PLT_MIB_sleepMode,
  867. PLT_MIB_wlanWakeUpInterval,
  868. PLT_MIB_beaconLostCount,
  869. PLT_MIB_rcpiThreshold,
  870. PLT_MIB_statisticsTable,
  871. PLT_MIB_ibssPsConfig,
  872. PLT_MIB_txRatePolicy,
  873. PLT_MIB_countersTable,
  874. PLT_MIB_btCoexsitenceMode,
  875. PLT_MIB_btCoexistenceParameters
  876. } PLT_MIB_e;
  877. #define PLT_MAX_MULTICAST_GROUP_ADDRS 8
  878. typedef struct
  879. {
  880. macAddress_t GroupTable[PLT_MAX_MULTICAST_GROUP_ADDRS];
  881. tiUINT8 bFilteringEnable;
  882. tiUINT8 nNumberOfAddresses;
  883. }PLT_MIB_GroupAdressTable_t;
  884. typedef struct
  885. {
  886. tiUINT32 FilteringEnable;
  887. UCHAR addr[IP_V4_ADDR_LEN];
  888. }PLT_MIB_ArpIpAddressesTable_t;
  889. /* TTemplateType - */
  890. /* Specifies the type of a templateFrame */
  891. typedef enum
  892. { /* Frame type: */
  893. PLT_TEMPLATE_TYPE_BEACON, /* 0 for beacon template, */
  894. PLT_TEMPLATE_TYPE_PROBE_REQUEST, /* 1 for probe request template,*/
  895. PLT_TEMPLATE_TYPE_NULL_FRAME, /* 2 for NULL data frame */
  896. PLT_TEMPLATE_TYPE_PROBE_RESPONSE, /* 3 for probe response frame */
  897. PLT_TEMPLATE_TYPE_QOS_NULL_FRAME, /* 4 for QOS NULL data frame */
  898. PLT_TEMPLATE_TYPE_PS_POLL, /* 5 for PS-Poll frame */
  899. } PLT_MIB_TemplateType_t;
  900. #define PLT_MIB_TEMPLATE_DATA_MAX_LEN 256
  901. typedef struct
  902. {
  903. PLT_MIB_TemplateType_t FrameType;
  904. tiUINT32 Rate;
  905. tiUINT16 Length;
  906. tiUINT8 Data[PLT_MIB_TEMPLATE_DATA_MAX_LEN];
  907. }PLT_TemplateFrame_t;
  908. typedef struct
  909. {
  910. tiUINT32 WakeUpInterval;
  911. tiUINT8 ListenInterval; /* Listen interval in unit of the beacon/DTIM */
  912. }PLT_MIB_WlanWakeUpInterval_t;
  913. typedef struct
  914. {
  915. tiUINT32 PLCPErrorCount;
  916. tiUINT32 FCSErrorCount;
  917. }PLT_MIB_CounterTable_t;
  918. /*the max table sized is : ( number of 221 * 8 bytes ) + ( non-221 * 2 bytes )
  919. Must be synchronized with the size of ACX defined in public_infoele.h interface
  920. with the FW
  921. */
  922. #define PLT_MIB_MAX_SIZE_OF_IE_TABLE 112
  923. /* NOTE: struct is only meant to be used as a pointer reference to an actual*/
  924. /* buffer. Table size is not a constant and is derived from the buffer*/
  925. /* size given with the WriteMIB command or readMIBComplete event */
  926. typedef struct
  927. {
  928. UINT8 iNumberOfIEs; /* number of information elements in table */
  929. UINT8 iIETable[PLT_MIB_MAX_SIZE_OF_IE_TABLE];
  930. }PLT_SBeaconFilterIETable_t;
  931. typedef union
  932. {
  933. macAddress_t StationId;
  934. tiUINT32 MaxReceiveLifeTime;
  935. UINT32 SlotTime;
  936. PLT_MIB_GroupAdressTable_t GroupAddressTable;
  937. tiUINT8 WepDefaultKeyId;
  938. tiUINT8 PowerLevel;
  939. tiUINT16 RTSThreshold;
  940. tiUINT32 CTSToSelfEnable;
  941. PLT_MIB_ArpIpAddressesTable_t ArpIpAddressesTable;
  942. PLT_TemplateFrame_t TemplateFrame;
  943. tiUINT8 RxFilter;
  944. PLT_MIB_WlanWakeUpInterval_t WlanWakeUpInterval;
  945. PLT_MIB_CounterTable_t CounterTable;
  946. PLT_SBeaconFilterIETable_t BeaconFilter;
  947. txRatePolicy_t txRatePolicy;
  948. }PLT_MIB_data_u;
  949. typedef struct{
  950. PLT_MIB_e aMib;
  951. UINT32 Length;
  952. PLT_MIB_data_u aData;
  953. }PLT_MIB_t;
  954. #endif /* __COMMON_TYPES_H__ */