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