PageRenderTime 50ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/hal/Export_Inc/whalCtrl_api.h

http://github.com/CyanogenMod/cm-kernel
C Header | 900 lines | 580 code | 158 blank | 162 comment | 0 complexity | 42f5f8e940ac80db53b0bc35ece9212a 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 _WHAL_CTRL_API_H
  36. #define _WHAL_CTRL_API_H
  37. #include "whalCtrl_prm.h"
  38. #include "public_infoele.h"
  39. #include "whalBus_Defs.h"
  40. #include "MacServices_api.h"
  41. #define MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES 8
  42. #define MAX_CHANNELS_IN_REG_DOMAIN 40
  43. #define CTS_TO_SELF_DISABLE 0
  44. #define CTS_TO_SELF_ENABLE 1
  45. #define MAX_TEMPLATE_SIZE 256
  46. typedef struct
  47. {
  48. UINT32 Size;
  49. UINT8 Buffer[MAX_TEMPLATE_SIZE];
  50. } TemplateParams_T;
  51. typedef enum
  52. {
  53. NULL_DATA_TEMPLATE = 0,
  54. BEACON_TEMPLATE,
  55. PROBE_REQUEST_TEMPLATE,
  56. PROBE_RESPONSE_TEMPLATE,
  57. QOS_NULL_DATA_TEMPLATE,
  58. PS_POLL_TEMPLATE,
  59. } whalCtrl_templateType_e;
  60. typedef enum{
  61. WHAL_WME = 0,
  62. WHAL_NONE_QOS,
  63. }whalCtrl_qosProtocols_e;
  64. /* Do not change the order */
  65. typedef enum
  66. {
  67. PS_DISABLE = 0,
  68. PS_ENABLE = 1,
  69. } whalCtrl_psState_e;
  70. typedef enum
  71. {
  72. PS_POLL_ACCESS_MNGR_GEN= 0,
  73. PS_POLL_HOST_ECPU_GEN,
  74. } whalCtrl_psPollGen_e;
  75. typedef enum
  76. {
  77. ENTER_PS_FAIL,
  78. ENTER_PS_SUCCESS,
  79. EXIT_PS_FAIL,
  80. EXIT_PS_SUCCESS,
  81. }Hw_Event_PS_Status;
  82. /** Available cipher suites for admission control */
  83. typedef enum
  84. {
  85. HAL_CTRL_CIPHER_NONE = 0, /**< no chpiher suite */
  86. HAL_CTRL_CIPHER_WEP = 1, /**< WEP-40 chpiher suite */
  87. HAL_CTRL_CIPHER_TKIP = 2, /**< TKIP chpiher suite */
  88. HAL_CTRL_CIPHER_AES_WRAP = 3, /**< AES WRAP chpiher suite */
  89. HAL_CTRL_CIPHER_AES_CCMP = 4, /**< AES CCMP chpiher suite */
  90. HAL_CTRL_CIPHER_WEP104 = 5, /**< WEP-104 chpiher suite */
  91. HAL_CTRL_CIPHER_CKIP = 6, /**< CKIP chpiher suite */
  92. HAL_CTRL_CIPHER_UNKNOWN = 255 /**< UNKNOWN chpiher suite */
  93. } halCtrl_CipherSuite_e;
  94. /*
  95. * The Event Mail Box ID : Clients That expected an event should
  96. * register,Mask/UnMask Events with this ID
  97. */
  98. typedef enum
  99. {
  100. /*Regular events*/
  101. HAL_EVENT_MEASUREMENT_START, /*0*/
  102. HAL_EVENT_SCAN_CMPLT, /*1*/
  103. HAL_EVENT_CALIB_CMPLT, /*2*/
  104. HAL_EVENT_RSSI_LEVEL, /*3*/
  105. HAL_EVENT_PS_REPORT, /*4*/
  106. HAL_EVENT_SYNCHRONIZATION_TIMEOUT, /*5*/
  107. HAL_EVENT_HEALTH_REPORT, /*6*/
  108. HAL_EVENT_ACI, /*7*/
  109. HAL_EVENT_DEBUG_MESSAGE, /*8*/
  110. HAL_EVENT_MAC_STATUS, /*9*/
  111. HAL_EVENT_DISCONNECT_COMPLETE, /*10*/
  112. HAL_EVENT_JOIN_CMPLT, /*11*/
  113. HAL_EVENT_SWITCH_CHANNEL_CMPLT, /*12*/
  114. HAL_EVENT_BSS_LOSE, /*13*/
  115. HAL_EVENT_MAX_TX_RETRY, /*14*/
  116. HAL_EVENT_MEASUREMENT_COMPLETE, /*15*/
  117. HAL_EVENT_AP_DISCOVERY_COMPLETE, /*16*/
  118. HAL_EVENT_SPS_SCAN_CMPLT, /*17*/
  119. HAL_EVENT_BSS_REGAIN, /*18*/
  120. HAL_EVENT_RSSI_LEVEL_REGAIN, /*19*/
  121. HAL_EVENT_LOW_SNR, /*20*/
  122. HAL_EVENT_SOFT_GEMINI_SENSE, /*21*/
  123. HAL_EVENT_SOFT_GEMINI_PREDICTION, /*22*/
  124. HAL_EVENT_SOFT_GEMINI_AVALANCHE, /*23*/
  125. HAL_EVENT_PLT_RX_CALIBRATION_COMPLETE, /*24*/
  126. HAL_EVENT_PSPOLL_DELIVERY_FAILURE, /*25*/
  127. HAL_EVENT_BSS_RESET, /*26*/
  128. HAL_EVENT_ALL, /* 27 */
  129. MAX_NUM_OF_EVENT, /* 28 */
  130. }Hw_Event_ID;
  131. typedef struct
  132. {
  133. macAddress_t macAddress;
  134. preamble_e preamble;
  135. radioType_e radioType;
  136. radioBand_e radioBand;
  137. UINT8 fwVer[FW_VERSION_LEN]; /* Firmware version - null terminated string*/
  138. e2Version_t e2Ver; /* EEPROM version*/
  139. } whalCtrl_chip_t;
  140. typedef struct
  141. {
  142. TI_HANDLE hRxXfer;
  143. TI_HANDLE hTxXfer;
  144. TI_HANDLE hTxResult;
  145. TI_HANDLE hTxHwQueue;
  146. TI_HANDLE hReport;
  147. TI_HANDLE hMemMgr;
  148. TI_HANDLE hEventMbox;
  149. TI_HANDLE hFwEvent;
  150. TI_HANDLE hCmdQueue;
  151. #ifdef TI_DBG
  152. TI_HANDLE hDebugTrace;
  153. #endif /* TI_DBG */
  154. } whalCtrl_config_t;
  155. typedef struct
  156. {
  157. bssType_e bssType;
  158. UINT16 beaconInterval;
  159. UINT16 dtimInterval;
  160. UINT8 channel;
  161. UINT8* pBSSID;
  162. UINT8* pSSID;
  163. UINT8 ssidLength;
  164. rate_e hwGenCtrlTxRate;
  165. rate_e hwGenMgmtTxRate; /* Beacon and Probe-Response Tx rate (in IBSS). */
  166. UINT16 basicRateSet;
  167. UINT16 supportedRateSet;
  168. radioBand_e radioBand;
  169. preamble_e preamble;
  170. } whalCtrl_joinBss_t;
  171. typedef struct
  172. {
  173. whalCtrl_templateType_e templateType;
  174. UINT8* pTemplate;
  175. UINT32 templateLen;
  176. } whalCtrl_setTemplate_t;
  177. PACKED_STRUCT( whalCtrl_antennaDiversityOptions_t,
  178. uint8 enableRxDiversity;
  179. uint8 rxSelectedAntenna;
  180. uint8 enableTxDiversity;
  181. uint8 txSelectedAntenna;
  182. uint8 rxTxSharedAnts;
  183. );
  184. typedef enum
  185. {
  186. STOP_NOISE_HIST = 0,
  187. START_NOISE_HIST = 1
  188. } NoiseHistogramCmd_e;
  189. typedef struct
  190. {
  191. NoiseHistogramCmd_e cmd;
  192. UINT16 sampleInterval;
  193. UINT8 ranges[MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES];
  194. } whalCtrl_noiseHistogram_t;
  195. /* use this struct when expecting a CB after a CONFIGURE_ACTION */
  196. PACKED_STRUCT( acxStatisitcs_t,
  197. UINT32 FWpacketReceived;
  198. UINT32 HALpacketReceived;
  199. );
  200. PACKED_STRUCT( mediumOccupancy_t,
  201. interogateCmdHdr_t mediumOccupCmdHdr;
  202. UINT32 MediumUsage;
  203. UINT32 Period;
  204. );
  205. PACKED_STRUCT( tsf_dtim_mib_t,
  206. interogateCmdHdr_t tsf_dtim_mibCmdHdr;
  207. uint32 CurrentTSFHigh;
  208. uint32 CurrentTSFLow;
  209. uint32 lastTBTTHigh;
  210. uint32 lastTBTTLow;
  211. uint8 LastDTIMCount;
  212. uint8 Reserved[3];
  213. );
  214. typedef struct
  215. {
  216. UINT16 BeaconRxTimeout;
  217. UINT16 BroadcastRxTimeout;
  218. UINT8 RxBroadcastInPs;
  219. } BcnBrcOptions_t;
  220. typedef struct
  221. {
  222. UINT8 numberOfIEs;
  223. UINT8 IETable[BEACON_FILTER_TABLE_MAX_SIZE];
  224. UINT8 IETableSize;
  225. } beaconFilterIETable_t;
  226. typedef struct
  227. {
  228. UINT8 beaconListenInterval;
  229. UINT8 beaconFiltering;
  230. UINT8 DTIMListenInterval;
  231. UINT8 NConsecutiveBeaconMiss;
  232. UINT8 hangoverPeriod;
  233. UINT8 HwPsPollResponseTimeout;
  234. UINT32 BaseBandWakeUpTime;
  235. UINT32 beaconReceiveTime;
  236. BOOLEAN beaconMissInterruptEnable;
  237. BOOLEAN rxBroadcast;
  238. BOOLEAN hwPsPoll;
  239. /* powerMgmtConfig IE */
  240. BOOLEAN ps802_11Enable;
  241. UINT8 needToSendNullData;
  242. UINT8 numNullPktRetries;
  243. UINT8 hangOverPeriod;
  244. UINT16 NullPktRateModulation;
  245. /* PMConfigStruct */
  246. BOOLEAN ELPEnable;
  247. UINT32 BBWakeUpTime;
  248. UINT32 PLLlockTime;
  249. /* AcxBcnBrcOptions */
  250. BcnBrcOptions_t BcnBrcOptions;
  251. /* ACXWakeUpCondition */
  252. PowerMgr_TnetWakeOn_e tnetWakeupOn;
  253. UINT8 listenInterval;
  254. /* No answer after Ps-Poll work-around */
  255. UINT8 ConsecutivePsPollDeliveryFailureThreshold;
  256. } whalCtrl_powerMgmtConfig_t;
  257. typedef struct
  258. {
  259. /* powerMgmtConfig IE */
  260. BOOLEAN ps802_11Enable;
  261. UINT8 needToSendNullData;
  262. UINT8 numNullPktRetries;
  263. UINT8 hangOverPeriod;
  264. UINT16 NullPktRateModulation;
  265. void * powerSaveCBObject;
  266. MacServices_powerSaveCmdResponseCB_t powerSavecmdResponseCB;
  267. } whalCtrl_powerSaveParams_t;
  268. /*MULTIPLE QUEUES STRUCTURE */
  269. typedef struct
  270. {
  271. UINT16 txopLimit;
  272. UINT16 rxTimeout;
  273. UINT8 aifsn;
  274. UINT8 cwMin;
  275. UINT16 cwMax;
  276. UINT8 acId;
  277. UINT8 shortRetryLimit;
  278. UINT8 longRetryLimit;
  279. UINT8 retryPreemption;
  280. UINT8 txopContinuation;
  281. UINT8 PsParameters;
  282. } whaCtrl_acTrafficParams_t;
  283. typedef struct
  284. {
  285. UINT8 acId;
  286. UINT8 qId;
  287. UINT16 percentOfBlockHighThreshold; /* Sum of ACs > numTxMemBlks in ~10% */
  288. UINT16 percentOfBlockLowThreshold; /* Sum of ACs < numTxMemBlks */
  289. } acQueuesParams_t;
  290. typedef enum{
  291. HAL_CTRL_AC_NOT_ADMITTED,
  292. HAL_CTRL_AC_WAIT_ADMISSION,
  293. HAL_CTRL_AC_ADMITTED
  294. } whalCtrl_trafficAdmState_e;
  295. typedef enum{
  296. HAL_CTRL_UNIDIRECTION,
  297. HAL_CTRL_BIDIRECTION,
  298. } whalCtrl_streamDirection_e;
  299. typedef enum{
  300. HAL_CTRL_ADDTS_RESPONSE_ACCEPT = 0,
  301. /* HAL_CTRL_ADDTS_RESPONSE_REJECT, - according to the standard*/
  302. HAL_CTRL_ADDTS_RESPONSE_AP_PARAM_INVALID = 253,
  303. HAL_CTRL_ADDTS_RESPONSE_TIMEOUT = 254,
  304. HAL_CTRL_TSPEC_DELETED_BY_AP = 255,
  305. } whalCtrl_addtsRaeasonCode_e;
  306. typedef enum{
  307. HAL_CTRL_HIGH_THRESHOLD_CROSS,
  308. HAL_CTRL_LOW_THRESHOLD_CROSS,
  309. } whalCtrl_thresholdCross_e;
  310. typedef enum{
  311. HAL_CTRL_CROSS_ABOVE,
  312. HAL_CTRL_CROSS_BELOW,
  313. } whalCtrl_thresholdCrossDirection_e;
  314. typedef struct{
  315. UINT32 acID;
  316. thresholdCross_e thresholdCross;
  317. } tspecRateCross_t;
  318. typedef struct{
  319. UINT32 acID;
  320. UINT32 thresholdCross;
  321. UINT32 thresholdCrossDirection;
  322. } mediumTimeCross_t;
  323. /************************************/
  324. /* QOS edcf params */
  325. /************************************/
  326. /*=================== Mesurement =====================*/
  327. typedef struct
  328. {
  329. uint32 ConfigOptions;
  330. uint32 FilterOptions;
  331. uint32 duration;
  332. Channel_e channel;
  333. RadioBand_e band;
  334. } whalCtrl_MeasurementParameters_t;
  335. typedef struct
  336. {
  337. uint32 ConfigOptions;
  338. uint32 FilterOptions;
  339. uint32 scanDuration;
  340. uint16 scanOptions;
  341. uint8 numOfProbRqst;
  342. TxdRateSet_t txdRateSet;
  343. uint8 txPowerDbm;
  344. } whalCtrl_ApDiscoveryParameters_t;
  345. /*=======================================================*/
  346. typedef struct
  347. {
  348. /* ACXLowRSSITriggerParameters */
  349. INT8 rssiThreshold;
  350. UINT8 rssiFilterWeight;
  351. UINT8 rssiFilterDepth;
  352. UINT8 lowRSSIEventType;
  353. /* ACXLowSNRTriggerParameters */
  354. UINT8 snrThreshold;
  355. UINT8 snrFilterWeight;
  356. UINT8 snrFilterDepth;
  357. UINT8 lowSNREventType;
  358. /* ACXConsNackTriggerParameters */
  359. UINT8 maxTxRetry;
  360. /* ACXBssLossTsfSynchronize */
  361. UINT16 TsfMissThreshold;
  362. UINT16 BssLossTimeout;
  363. } whalCtrl_roamingTriggerCmd_t;
  364. typedef struct
  365. {
  366. UINT8 channelNumber;
  367. UINT8 switchTime;
  368. UINT8 txFlag;
  369. UINT8 flush;
  370. } whalCtrl_switchChannelCmd_t;
  371. typedef scan_Params_t whalCtrl_scan_t;
  372. PACKED_STRUCT( whalCtrl_counters_t,
  373. UINT32 RecvError; /* the number of frames that a NIC receives but does not indicate to the protocols due to errors*/
  374. UINT32 RecvNoBuffer; /* the number of frames that the NIC cannot receive due to lack of NIC receive buffer space */
  375. UINT32 FragmentsRecv;
  376. UINT32 FrameDuplicates;
  377. UINT32 FcsErrors;
  378. );
  379. /*
  380. PACKED_STRUCT(whalCtrl_PLT_TX_Continues_t,
  381. UINT8 rate;
  382. UINT8 chID;
  383. UINT8 preamble;
  384. UINT8 bandID;
  385. UINT8 Modulation;
  386. UINT8 TestMode;
  387. );
  388. PACKED_STRUCT(whalCtrl_PLT_TX_CW_t,
  389. UINT8 chID;
  390. UINT8 bandID;
  391. );
  392. */
  393. PACKED_STRUCT(whalCtrl_WriteRegister_t,
  394. UINT32 RegAdress;
  395. UINT32 RegData;
  396. );
  397. typedef struct
  398. {
  399. uint8 channel;
  400. int8 maxRegPower;
  401. } whalCtrl_RegulatoryChannelPowerConstraint_t;
  402. typedef struct
  403. {
  404. uint8 numberOfChannels;
  405. RadioBand_e band;
  406. whalCtrl_RegulatoryChannelPowerConstraint_t channelListConstraint[MAX_CHANNELS_IN_REG_DOMAIN];
  407. } whalCtrl_RegulatoryPowerConstraint_t;
  408. typedef struct
  409. {
  410. INFO_ELE_HDR
  411. int8 powerConstraintOnBss; /* The attenuation from the regulatory */
  412. /* power constraint as declared by the AP */
  413. /* Units: dBm*/
  414. /* Range: -20 - 30*/
  415. } whalCtrl_ApPowerConstraint_t;
  416. typedef struct
  417. {
  418. INFO_ELE_HDR
  419. uint8 attenuation; /* Attenuation from the maximum radio transmit */
  420. /* power as declared by the driver/application*/
  421. /* Units: dB*/
  422. /* Range: 0 - 20*/
  423. } whalCtrl_PowerAttenuation_t;
  424. typedef struct
  425. {
  426. INFO_ELE_HDR
  427. int8 currentTransmitPower; /* Current transmit power of the radio.*/
  428. /* Units: dBm*/
  429. } whalCtrl_GetCurrentTxPower_t;
  430. /*
  431. * TX Ack Policy
  432. */
  433. typedef struct
  434. {
  435. AckPolicy_e AckPolicy;
  436. UINT8 AcId;
  437. }AcAckPolicy_t;
  438. typedef union
  439. {
  440. /* HAL Control section */
  441. UINT16 halCtrlRtsThreshold;
  442. UINT8 halCtrlCtsToSelf;
  443. rxTimeOut_t halCtrlRxTimeOut;
  444. UINT16 halCtrlFragThreshold;
  445. UINT16 halCtrlListenInterval;
  446. UINT16 halCtrlCurrentBeaconInterval;
  447. UINT8 halCtrlTxPowerDbm;
  448. txAntenna_e halCtrlTxAntenna;
  449. rxAntenna_e halCtrlRxAntenna;
  450. UINT8 halCtrlAifs;
  451. BOOL halCtrlTxMemPoolQosAlgo;
  452. BOOL halCtrlClkRunEnable;
  453. whalCtrl_counters_t halCtrlCounters;
  454. PltTxContinues_t PltTxContinues;
  455. TestCmdChannelBand_t PltCW;
  456. PLT_MIB_t PltMib;
  457. UINT8 halCtrlCurrentChannel;
  458. UINT8 earlyWakeup;
  459. /* tx data qos related parameters */
  460. txDataQosParams_t txDataQosParams;
  461. /*
  462. * WME Tx Parameters
  463. */
  464. /* ac queues parameters */
  465. acQueuesParams_t acQueuesParams;
  466. /* Access Category Ack Policy */
  467. AcAckPolicy_t AcAckPolicy;
  468. /* Qos Type For Tx Descriptor */
  469. qosProtocols_e halCtrlTxQosType;
  470. /* ac traffic parameters */
  471. whaCtrl_acTrafficParams_t acTrafficParams;
  472. /* queue params */
  473. acQueuesParams_t acQueuesParam;
  474. /* ac Qos parameters */
  475. queueTrafficParams_t *pQueueTrafficParams;
  476. /* Security related parameters */
  477. #ifdef EXC_MODULE_INCLUDED
  478. BOOL rsnExcSwEncFlag;
  479. BOOL rsnExcMicFieldFlag;
  480. #endif
  481. halCtrl_CipherSuite_e rsnEncryptionStatus;
  482. UINT8 rsnHwEncDecrEnable; /* 0- disable, 1- enable*/
  483. securityKeys_t *pRsnKey;
  484. UINT8 rsnDefaultKeyID;
  485. /*
  486. Power Control
  487. */
  488. powerAutho_PowerPolicy_e minPowerPolicy;
  489. /* Measurements section */
  490. acxStatisitcs_t acxStatisitics;
  491. mediumOccupancy_t mediumOccupancy;
  492. BOOLEAN halTxOpContinuation;
  493. tsf_dtim_mib_t fwTsfDtimInfo;
  494. interogateCmdCBParams_t interogateCmdCBParams;
  495. configureCmdCBParams_t configureCmdCBParams;
  496. txRatePolicy_t *pTxRatePlicy;
  497. /* Antenna diversity options */
  498. whalCtrl_antennaDiversityOptions_t antennaDiversityOptions;
  499. UINT8 antennaNum;
  500. /* WARNING!!! This section is used to set/get internal params only. */
  501. UINT16 halCtrlAid;
  502. SoftGeminiEnableModes_e SoftGeminiEnable;
  503. SoftGeminiParam_t SoftGeminiParam;
  504. UINT32 halCtrlMaxRxMsduLifetime;
  505. /* Utils section */
  506. UINT8 SeverityTable[WLAN_MAX_SEVERITIES];
  507. UINT8 ModuleTable[WLAN_MAX_LOG_MODULES];
  508. UINT32 reportPPMode;
  509. UINT32 osDbgState;
  510. /* Beacon Broadcast options */
  511. BcnBrcOptions_t BcnBrcOptions;
  512. /* PLT tests */
  513. TI_STATUS PltRxCalibrationStatus;
  514. }whalParamContents;
  515. typedef struct{
  516. UINT32 paramType;
  517. UINT32 paramLength;
  518. whalParamContents content;
  519. }whalParamInfo_t;
  520. typedef enum
  521. {
  522. GWSI_TX_CB_MODULE_OWNER = 0x0100, /* WHAL TX MODULE */
  523. GWSI_RX_CB_MODULE_OWNER = 0x0200, /* WHAL RX MODULE */
  524. GWSI_EVENT_IND_CB_MODULE_OWNER = 0x0400, /* WHAL HW EVENT MBOX */
  525. /*
  526. Last CB module owner- DO NOT TOUCH!
  527. */
  528. GWSI_CB_LAST_MODULE_OWNER = 0x0500
  529. } GwsiCB_ModuleOwner_e;
  530. typedef enum
  531. {
  532. PLT_RX_PER_START,
  533. PLT_RX_PER_STOP,
  534. PLT_RX_PER_CLEAR,
  535. PLT_RX_PER_GETRESULTS,
  536. PLT_RX_PER_START_PH2,
  537. PLT_RX_PER_MAX /* Must be last*/
  538. }PLT_RxPerCmd_e;
  539. typedef enum
  540. {
  541. /* Tx Data Path Callbacks */
  542. GWSI_TX_SEND_PACKET_TRANSFER_CB = GWSI_TX_CB_MODULE_OWNER | 0x01, /* WHAL TX MODULE */
  543. GWSI_TX_SEND_PACKET_COMPLETE_CB = GWSI_TX_CB_MODULE_OWNER | 0x02, /* WHAL TX MODULE */
  544. GWSI_TX_QUEUE_FREE_EVENT_CB = GWSI_TX_CB_MODULE_OWNER | 0x03, /* WHAL TX MODULE */
  545. /* Rx Data Path Callbacks */
  546. GWSI_RX_REQUEST_FOR_BUFFER_CB = GWSI_RX_CB_MODULE_OWNER | 0x01, /* WHAL RX MODULE */
  547. GWSI_RX_RECEIVE_PACKET_CB = GWSI_RX_CB_MODULE_OWNER | 0x02, /* WHAL RX MODULE */
  548. }GwsiCB_Type_e;
  549. typedef enum
  550. {
  551. /* Tx Data Path Callbacks */
  552. HAL_INT_SEND_PACKET_TRANSFER = 0x00 , /* WHAL TX MODULE */
  553. HAL_INT_SEND_PACKET_COMPLETE , /* WHAL TX MODULE */
  554. HAL_INT_QUEUE_FREE_EVENT , /* WHAL TX MODULE */
  555. /* Rx Data Path Callbacks */
  556. HAL_INT_RECEIVE_PACKET = 0x10 , /* WHAL RX MODULE */
  557. HAL_INT_REQUEST_FOR_BUFFER , /* WHAL RX MODULE */
  558. /* Ctrl Callbacks */
  559. HAL_INT_COMMAND_COMPLETE = 0x20 ,
  560. HAL_INTERNAL_EVENT_FAILURE
  561. }Hw_RegisterID_e;
  562. /*
  563. * WHAL CTRL Class API
  564. */
  565. TI_HANDLE whalCtrl_Create (TI_HANDLE hOs);
  566. int whalCtrl_Stop (TI_HANDLE hWhalCtrl);
  567. TI_STATUS whalCtrl_Config (TI_HANDLE hWhalCtrl, TI_HANDLE hTNETW_Driver, whalCtrl_config_t* pWhalCtrlCfg,UINT32 *pFWImage);
  568. TI_HANDLE whalCtrl_GetTnetwifHandle (TI_HANDLE hWhalCtrl);
  569. TI_HANDLE whalCtrl_GetWhalParams (TI_HANDLE hWhalCtrl);
  570. int whalCtrl_ConfigHw (TI_HANDLE hWhalCtrl, TnetwDrv_InitParams_t* pInitParams, void *fCb, TI_HANDLE hCb);
  571. int whalCtrl_ReConfig (TI_HANDLE hWhalCtrl, int DoReJoin);
  572. void whalCtrl_RecoveryEnded (TI_HANDLE hWhalCtrl);
  573. int whalCtrl_Destroy (TI_HANDLE pWhalCtrl);
  574. void whalCtrl_Register_CB (TI_HANDLE pWhalCtrl,tiUINT32 CallBackID,void *CBFunc,TI_HANDLE CBObj);
  575. void whalCtrl_PreRecoveryProcess(TI_HANDLE hWhalCtrl);
  576. TI_STATUS whalCtrl_FinalizeDownload (TI_HANDLE hWhalCtrl);
  577. TI_STATUS whalCtrl_FinalizeOnFailure (TI_HANDLE hWhalCtrl);
  578. /*
  579. * Set/Get API
  580. */
  581. int whalCtrl_setRxFilters (TI_HANDLE hWhalCtrl, UINT32 RxConfigOption, UINT32 RxFilterOption);
  582. int whalCtrl_GetRxFilters (TI_HANDLE hWhalCtrl, UINT32* pRxConfigOption, UINT32* pRxFilterOption);
  583. int whalCtrl_setRxDataFiltersParams(TI_HANDLE hWhalCtrl, BOOL enabled, filter_e defaultAction);
  584. int whalCtrl_setRxDataFilter (TI_HANDLE hWhalCtrl, UINT8 index, UINT8 command, filter_e action, UINT8 numFieldPatterns, UINT8 lenFieldPatterns, UINT8 * fieldPatterns);
  585. int whalCtrl_getRxDataFiltersStatistics(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  586. int whalCtrl_SetMacAddress (TI_HANDLE hWhalCtrl, macAddress_t *macAddr);
  587. int whalCtrl_SetTemplate (TI_HANDLE pWhalCtrl, whalCtrl_setTemplate_t* pTemplateParams);
  588. int whalCtrl_SetTemplateWithCB (TI_HANDLE hWhalCtrl, whalCtrl_setTemplate_t* pTemplateParams,void *CBFunc,TI_HANDLE CBObj);
  589. TemplateParams_T * whalCtrl_GetTemplate(TI_HANDLE hWhalCtrl, whalCtrl_templateType_e templateType);
  590. int whalCtrl_SetSlotTime (TI_HANDLE hWhalCtrl, slotTime_e SlotTimeVal);
  591. int whalCtrl_SetPreamble (TI_HANDLE hWhalCtrl, preamble_e preambleVal);
  592. int whalCtrl_SetFrameRate (TI_HANDLE hWhalCtrl, rate_e txFrmRate, BOOL bCtrlFrame);
  593. int whalCtrl_SetBeaconFiltering (TI_HANDLE hWhalCtrl, UINT8 beaconFilteringStatus, UINT8 numOfBeaconsToBuffer);
  594. int whalCtrl_GetBeaconFiltering (TI_HANDLE hWhalCtrl);
  595. int whalCtrl_SetBeaconFilterIETable(TI_HANDLE hWhalCtrl, UINT8* numberOfIEs, UINT8 * IETable, UINT8* IETableSize);
  596. int whalCtrl_GetBeaconFilterIETable(TI_HANDLE hWhalCtrl, UINT8* numberOfIEs, UINT8 * IETable, UINT8* IETableSize);
  597. int whalCtrl_SetarpIpAddressesTable(TI_HANDLE hWhalCtrl, IpAddress_t * IP_addr, UINT8 isEnabled , IPver_e IP_ver);
  598. int whalCtrl_SetarpIpFilterEnabled(TI_HANDLE hWhalCtrl,UINT8 isEnabled );
  599. int whalCtrl_SetGroupAddressesTable(TI_HANDLE hWhalCtrl, UINT8 numGroupAddrs, macAddress_t *Group_addr,UINT8 isEnabled);
  600. int whalCtrl_GetGroupAddressesTable(TI_HANDLE hWhalCtrl, UINT8* pisEnabled, UINT8* pnumGroupAddrs, macAddress_t *Group_addr);
  601. int whalCtrl_SetCwMin (TI_HANDLE hWhalCtrl, UINT8 CwMin);
  602. int whalCtrl_getSend4xWackInfo (TI_HANDLE hWhalCtrl, UINT8 *Send4xWackInfo);
  603. int whalCtrl_setSend4xWackInfo (TI_HANDLE hWhalCtrl, UINT8 Send4xWackInfo);
  604. void whalCtrl_SetBeaconInterval (TI_HANDLE hWhalCtrl , UINT16 Val);
  605. UINT16 whalCtrl_GetBeaconInterval (TI_HANDLE hWhalCtrl);
  606. void whalCtrl_SetInfoElemEventMask(TI_HANDLE hWhalCtrl,UINT32 eventMask);
  607. int whalCtrl_getTsf (TI_HANDLE hwHalCtrl, UINT32 *pTsf);
  608. int whalCtrl_setDtimPeriod (TI_HANDLE hWhalCtrl, UINT8 dtimPeriod, UINT16 TBTT);
  609. UINT8 whalCtrl_GetDtimCount (TI_HANDLE hWhalCtrl);
  610. TI_STATUS whalCtrl_SetParam (TI_HANDLE pWhalCtrl, whalParamInfo_t* pParamInfo);
  611. TI_STATUS whalCtrl_GetParam (TI_HANDLE pWhalCtrl, whalParamInfo_t* pParamInfo);
  612. int whalCtrl_ElpCtrl_SetMode(TI_HANDLE hWhalCtrl, elpCtrl_Mode_e mode);
  613. int whalCtrl_setBetParams(TI_HANDLE hWhalCtrl, UINT8 Enable, UINT8 MaximumConsecutiveET);
  614. /*
  615. * Read/Write Reg API
  616. */
  617. UINT32 whalCtrlReadMacReg (TI_HANDLE hWhalCtrl, UINT32 addr);
  618. void whalCtrlWriteMacReg (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 val);
  619. UINT32 whalCtrlReadPhyReg (TI_HANDLE hWhalCtrl, UINT32 addr);
  620. void whalCtrlWritePhyReg (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 val);
  621. int whalCtrl_GetRadioStandByState(TI_HANDLE hWhalCtrl);
  622. TI_STATUS whalCtrl_GetFWInfo (TI_HANDLE hWhalCtrl, whalCtrl_chip_t *pChip_Version);
  623. /*
  624. * Rx API
  625. */
  626. int whalCtrl_resetMacRx (TI_HANDLE hWhalCtrl);
  627. /*
  628. * Tx API
  629. */
  630. int whalCtrl_DisableTx (TI_HANDLE hWhalCtrl);
  631. int whalCtrl_EnableTx (TI_HANDLE hWhalCtrl);
  632. UINT32 whalCtrl_GetTime (TI_HANDLE hWhalCtrl);
  633. void whalCtrl_resetTxCounters (TI_HANDLE hWhalCtrl);
  634. void whalCtrl_updateSecuritySeqNum(TI_HANDLE hWhalCtrl, UINT8 securitySeqNumLsByte);
  635. /*
  636. * Radio Handle API
  637. */
  638. int whalCtrl_SetRadioBand (TI_HANDLE hWhalCtrl, radioBand_e RadioBand);
  639. int whalCtrl_SwitchChannel (TI_HANDLE hWhalCtrl , UINT8 channel);
  640. /*
  641. * Recovery API
  642. */
  643. int whalCtrl_CheckMailboxCb (TI_HANDLE hWhalCtrl,UINT16 MboxStatus,char *InterrogateParamsBuf);
  644. int whalCtrl_SetPacketDetectionThreshold (TI_HANDLE hWhalCtrl, UINT8 PDThreshold);
  645. int whalCtrl_SetEnergyDetection (TI_HANDLE hWhalCtrl, BOOL energyDetection);
  646. int whalCtrl_CheckHwStatus (TI_HANDLE hWhalCtrl);
  647. int whalCtrl_InitHwStatus (TI_HANDLE hWhalCtrl);
  648. int whalCtrl_PrintHwStatus (TI_HANDLE hWhalCtrl);
  649. int whalCtrl_PeriodicCheckMailboxCb(TI_HANDLE hWhalCtrl,UINT16 MboxStatus,char *InterrogateParamsBuf);
  650. void whalCtrl_ResetBusAfterHardBoot(TI_HANDLE hWhalCtrl);
  651. /*
  652. * Event Mail Box API
  653. */
  654. int whalCtrl_EventMbox_RegisterForEvent(TI_HANDLE hWhalCtrl, int EventBit, void *CbFunc, void *CbObj);
  655. int whalCtrl_EventMbox_Disable (TI_HANDLE hWhalCtrl, int EventBit);
  656. int whalCtrl_EventMbox_Enable (TI_HANDLE hWhalCtrl, int EventBit);
  657. /*
  658. * LNA API
  659. */
  660. int whalCtrl_LNAControl (TI_HANDLE hWhalCtrl, UINT8 LNAControlField);
  661. /*
  662. * HW Interrupt API
  663. */
  664. void whalCtrl_HandleBusTxn_Complete(TI_HANDLE hWhalCtrl);
  665. int whalCtrl_HandleInterrupts (TI_HANDLE pWhalCtrl);
  666. void whalCtrl_EnableInterrupts (TI_HANDLE pWhalCtrl);
  667. void whalCtrl_DisableInterrupts (TI_HANDLE pWhalCtrl);
  668. UINT32 whalCtrl_CheckInterrupts (TI_HANDLE pWhalCtrl);
  669. void whalCtr_SlaveAckMaskNotification (TI_HANDLE hWhalCtrl);
  670. /*
  671. * Power Ctrl API
  672. */
  673. TI_STATUS whalCtrl_powerMgmtConfig(TI_HANDLE theWhalCtrlHandle,
  674. whalCtrl_powerSaveParams_t* powerSaveParams);
  675. /* whalCtrl_powerMgmtConfig_t thePowerMgmtConfig);*/
  676. TI_STATUS whalCtrl_wakeUpCondition(TI_HANDLE theWhalCtrlHandle,
  677. whalCtrl_powerMgmtConfig_t thePowerMgmtConfig);
  678. TI_STATUS whalCtrl_PMConfig(TI_HANDLE theWhalCtrlHandle,
  679. whalCtrl_powerMgmtConfig_t thePowerMgmtConfig);
  680. TI_STATUS whalCtrl_BcnBrcOptions(TI_HANDLE theWhalCtrlHandle,
  681. whalCtrl_powerMgmtConfig_t thePowerMgmtConfig);
  682. TI_STATUS whalCtrl_SetMinPowerLevel(TI_HANDLE theWhalCtrlHandle,
  683. powerAutho_PowerPolicy_e minPowerPolicy);
  684. TI_STATUS whalCtrl_GetMinPowerLevel(TI_HANDLE theWhalCtrlHandle,
  685. powerAutho_PowerPolicy_e* minPowerPolicy);
  686. /*
  687. * Measurement API
  688. */
  689. int whalCtrl_NoiseHistogramCmd (TI_HANDLE hWhalCtrl, whalCtrl_noiseHistogram_t* pNoiseHistParams);
  690. INT8 whalCtrl_convertRSSIToRxLevel(TI_HANDLE hWhalCtrl, INT32 rssiVal);
  691. int whalCtrl_getMaxNumberOfCommandsInQueue (TI_HANDLE hWhalCtrl);
  692. int whalCtrl_InterrogateGwsiStatisitics(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  693. int whalCtrl_InterrogateGwsiCounters(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  694. int whalCtrl_InterrogateMbox(TI_HANDLE hWhalCtrl , void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf);
  695. int whalCtrl_JoinBss (TI_HANDLE pWhalCtrl, whalCtrl_joinBss_t* pJoinBssParams);
  696. int whalCtrl_ReJoin (TI_HANDLE hWhalCtrl);
  697. BOOL whalCtrl_isCardIn (TI_HANDLE hWhalCtrl);
  698. int whalCtrl_SendGenCmd (TI_HANDLE hWhalCtrl, char* pBuf, UINT32 Length);
  699. void whalCtrl_exitFromInitMode(TI_HANDLE hWhalCtrl);
  700. void whalCtrl_exitFromInitModePart1(TI_HANDLE hWhalCtrl);
  701. void whalCtrl_exitFromInitModePart2(TI_HANDLE hWhalCtrl);
  702. int whalCtrl_IsCardInstalled (TI_HANDLE hWhalCtrl) ;
  703. /* ----------------------------------------------------------------------------------
  704. Scan Functions
  705. ----------------------------------------------------------------------------------*/
  706. int whalCtrl_StartScan (TI_HANDLE hWhalCtrl, whalCtrl_scan_t* pScanVals, BOOLEAN bHighPriority , void* ScanCommandResponseCB, TI_HANDLE CB_handle);
  707. int whalCtrl_StartSPSScan (TI_HANDLE hWhalCtrl, whalCtrl_scan_t* pScanVals , void* ScanCommandResponseCB, TI_HANDLE CB_handle);
  708. int whalCtrl_StopScan (TI_HANDLE pWhalCtrl ,void* ScanCommandResponseCB, TI_HANDLE CB_handle);
  709. int whalCtrl_StopSPSScan (TI_HANDLE hWhalCtrl , void* ScanCommandResponseCB, TI_HANDLE CB_handle);
  710. TI_STATUS whalCtrl_SetSplitScanTimeOut (TI_HANDLE hWhalCtrl, UINT32 uTimeOut);
  711. int whalCtrl_SwitchChannelCmd (TI_HANDLE hWhalCtrl, whalCtrl_switchChannelCmd_t* pSwitchChannelCmd);
  712. int whalCtrl_SwitchChannelCancelCmd (TI_HANDLE hWhalCtrl, UINT8 channel);
  713. /* ----------------------------------------------------------------------------------
  714. Roaming Trigger Functions
  715. ----------------------------------------------------------------------------------*/
  716. int whalCtrl_SetSNRParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd);
  717. int whalCtrl_SetRSSIParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd);
  718. int whalCtrl_SetMaxTxRetryParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd);
  719. int whalCtrl_SetBssLossTsfThresholdParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd);
  720. int whalCtrl_GetAverageRSSI (TI_HANDLE hWhalCtrl, INT8* averageRSSI);
  721. int whalCtrl_FwDisconnect(TI_HANDLE hWhalCtrl, UINT32 ConfigOptions, UINT32 FilterOptions);
  722. int whalCtrl_GetAsynRSSI (TI_HANDLE hWhalCtrl,void *CB_Func, TI_HANDLE CB_handle, PUINT8 CB_Buf);
  723. /* ----------------------------------------------------------------------------------
  724. Measurement Functions
  725. ----------------------------------------------------------------------------------*/
  726. int whalCtrl_measurementCmd (TI_HANDLE hWhalCtrl, whalCtrl_MeasurementParameters_t* pMeasurementParams,
  727. void* CommandResponseCB, TI_HANDLE CB_handle);
  728. int whalCtrl_measurementStop (TI_HANDLE hWhalCtrl, void* CommandResponseCB, TI_HANDLE CB_handle);
  729. int whalCtrl_ApDiscoveryCmd (TI_HANDLE hWhalCtrl, whalCtrl_ApDiscoveryParameters_t* pMeasurementParams);
  730. int whalCtrl_ApDiscoveryStop (TI_HANDLE hWhalCtrl);
  731. /* ----------------------------------------------------------------------------------
  732. PLT Functions
  733. ----------------------------------------------------------------------------------*/
  734. int whalCtrl_RxPER(TI_HANDLE hWhalCtrl, PLT_RxPerCmd_e eRxPerCmd, TI_HANDLE CB_Handle, void *CB_Func);
  735. int whalCtrl_TxCW(TI_HANDLE hWhalCtrl, TestCmdChannelBand_t* PltTxCarrier, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  736. int whalCtrl_TxContinues(TI_HANDLE hWhalCtrl, PltTxContinues_t* pPLT_TX_Continues, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  737. int whalCtrl_WriteRegister(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf);
  738. int whalCtrl_ReadRegister(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf);
  739. int whalCtrl_ReadMib(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf);
  740. int whalCtrl_WriteMib(TI_HANDLE hWhalCtrl, PLT_MIB_t* pMib);
  741. #endif /* _WHAL_CTRL_API_H*/