Home | History | Annotate | Download | only in hw_ctrl
      1 /****************************************************************************
      2 **+-----------------------------------------------------------------------+**
      3 **|                                                                       |**
      4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
      5 **| All rights reserved.                                                  |**
      6 **|                                                                       |**
      7 **| Redistribution and use in source and binary forms, with or without    |**
      8 **| modification, are permitted provided that the following conditions    |**
      9 **| are met:                                                              |**
     10 **|                                                                       |**
     11 **|  * Redistributions of source code must retain the above copyright     |**
     12 **|    notice, this list of conditions and the following disclaimer.      |**
     13 **|  * Redistributions in binary form must reproduce the above copyright  |**
     14 **|    notice, this list of conditions and the following disclaimer in    |**
     15 **|    the documentation and/or other materials provided with the         |**
     16 **|    distribution.                                                      |**
     17 **|  * Neither the name Texas Instruments nor the names of its            |**
     18 **|    contributors may be used to endorse or promote products derived    |**
     19 **|    from this software without specific prior written permission.      |**
     20 **|                                                                       |**
     21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     32 **|                                                                       |**
     33 **+-----------------------------------------------------------------------+**
     34 ****************************************************************************/
     35 
     36 /****************************************************************************
     37  *
     38  *   MODULE:  whalHwMboxConfig.h
     39  *   PURPOSE: wlan hardware configuration information elements
     40  *
     41  ****************************************************************************/
     42 
     43 #ifndef _WHAl_HW_MBOX_CONFIG_H
     44 #define _WHAl_HW_MBOX_CONFIG_H
     45 
     46 #include "whalCommon.h"
     47 #include "whalHwDefs.h"
     48 #include "whalCtrl_api.h"
     49 
     50 
     51 #define MAX_CONFIG_TX_QUEUES 5
     52 #define MAX_CONFIG_RX_QUEUES 5
     53 
     54 
     55 typedef struct
     56 {
     57 	UINT32 HwQueueAddr;
     58 	UINT8  HwQueueAttr;
     59 } QueueParams_T;
     60 
     61 
     62 typedef struct
     63 {
     64 	UINT32 BaseAddr;
     65 	UINT32 TxQueuesAddr;
     66 	UINT32 TxQueuesSize;
     67 	UINT32 RxQueuesAddr;
     68 	UINT32 RxQueuesSize;
     69 	UINT32 QindicatorAddr;
     70 	UINT32 QindicatorSize;
     71 	UINT32 NumTxQueues;
     72 	UINT32 NumRxQueues;
     73 	QueueParams_T TxQueuesParams[MAX_CONFIG_TX_QUEUES];
     74 	QueueParams_T RxQueuesParams[MAX_CONFIG_RX_QUEUES];
     75 } MemQueueParams_T;
     76 
     77 
     78 typedef struct _HwMboxConfig_T
     79 {
     80     TI_HANDLE           hCmdMboxQueue;
     81     TI_HANDLE           hOs;
     82     TI_HANDLE           hReport;
     83     ACXStatistics_t     pAcxStatistic;
     84     MemoryMap_t         MemMap;
     85 } HwMboxConfig_T;
     86 
     87 
     88 HwMboxConfig_T* whal_hwMboxConfig_Create (TI_HANDLE hOs);
     89 int  whal_hwMboxConfig_Destroy               (HwMboxConfig_T *pHwMboxConfig);
     90 int  whal_hwMboxConfig_Config                (HwMboxConfig_T *pHwMboxConfig, TI_HANDLE hCmdMboxQueue, TI_HANDLE hReport);
     91 int  whal_hwInfoElemMemoryMapSet             (HwMboxConfig_T *pHwMboxConfig, MemoryMap_t *apMap);
     92 int  whal_hwInfoElemMemoryMapGet             (HwMboxConfig_T *pHwMboxConfig, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb);
     93 void whal_hwInfoElemMemoryMapPrint           (HwMboxConfig_T *pHwMboxConfig);
     94 int  whal_hwInfoElemRxConfigSet              (HwMboxConfig_T *pHwMboxConfig, UINT32* apRxConfigOption, UINT32* apRxFilterOption);
     95 int whal_hwInfoElemBETSet(HwMboxConfig_T* pHwMboxConfig, UINT8 Enable, UINT8 MaximumConsecutiveET);
     96 int  whal_hwInfoElemSetRxDataFiltersParams   (HwMboxConfig_T *pHwMboxConfig, BOOL enabled, filter_e defaultAction);
     97 int  whal_hwInfoElemSetRxDataFilter          (HwMboxConfig_T *pHwMboxConfig, UINT8 index, UINT8 command, filter_e action, UINT8 numFieldPatterns, UINT8 lenFieldPatterns, UINT8 * fieldPatterns);
     98 int  whal_hwInfoElemGetRxDataFiltersStatistics(HwMboxConfig_T * pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
     99 int  whal_hwInfoElemStationIdSet             (HwMboxConfig_T *pHwMboxConfig, UINT8* apStationId);
    100 int  whal_hwInfoElemStationIdGet             (HwMboxConfig_T *pHwMboxConfig, void *fCb, TI_HANDLE hCb, void *pCb);
    101 int  whal_hwInfoElemConfigOptionsRead        (HwMboxConfig_T *pHwMboxConfig, void* pElm);
    102 int  whal_hwInfoElemAcxRevisionGet           (HwMboxConfig_T *pHwMboxConfig, void *fCb, TI_HANDLE hCb, void *pCb);
    103 int  whal_hwInfoElemWepDefaultKeyIdSet       (HwMboxConfig_T *pHwMboxConfig, UINT8* apKeyVal, void *CB_Func, TI_HANDLE CB_handle);
    104 int  whal_hwInfoElemWepDefaultKeyIdGet       (HwMboxConfig_T *pHwMboxConfig, UINT8* apKeyVal, void *CB_Func, TI_HANDLE CB_handle);
    105 int  whal_hwInfoElemStatisticsPrint          (HwMboxConfig_T *pHwMboxConfig);
    106 int  whal_hwInfoElemFcsErrorCntGet           (HwMboxConfig_T *pHwMboxConfig, UINT32* pFcsErrCnt);
    107 int  whal_hwInfoElemAcxPMConfigSet           (HwMboxConfig_T *pHwMboxConfig, ACXConfigPM_t* pWlanElm_PowerMgmtOptions);
    108 int  whal_hwInfoElemAcxSleepAuthoSet         (HwMboxConfig_T *pHwMboxConfig, ACXSleepAuth_t* pWlanElm_SleepAutho);
    109 int  whal_hwInfoElemAcxwakeUpConditionSet    (HwMboxConfig_T *pHwMboxConfig, WakeUpCondition_t* pWlanElm_wakeUpCondition);
    110 int  whal_hwInfoElemFeatureConfigSet         (HwMboxConfig_T *pHwMboxConfig, UINT32 Options, UINT32 DataFlowOptions);
    111 int  whal_hwInfoElemAcxBeaconFilterOptionsSet(HwMboxConfig_T *pHwMboxConfig, ACXBeaconFilterOptions_t* pWlanElm_BeaconFilterOptions);
    112 int  whal_hwInfoElemAcxBeaconFilterIETableSet(HwMboxConfig_T *pHwMboxConfig, UINT8* numberOfIEs, UINT8* IETable, UINT8* IETableSize);
    113 int  whal_hwInfoElemarpIpAddressesTableSet   (HwMboxConfig_T *pHwMboxConfig, IpAddress_t *IP_addr, UINT32 isFilteringEnabled);
    114 int  whal_hwInfoElemGroupAdressesTableSet    (HwMboxConfig_T *pHwMboxConfig, UINT8* numGroupAddrs, macAddress_t *Group_addr, UINT8* isEnabled);
    115 int  whal_hwInfoElemAidSet                   (HwMboxConfig_T *pHwMboxConfig, UINT16* apAidVal);
    116 int  whal_hwInfoElemTxPowerSet				 (HwMboxConfig_T *pHwMboxConfig, UINT8 *TxPowerDbm);
    117 int  whal_hwInfoElemNoiseHistogramResultsGet (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t noiseHistCBParams);
    118 int  whal_hwInfoElemPowerLevelTableGet		 (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t powerLevelCBParams);
    119 int  whal_hwInfoElemStationIdForRecoveryGet  (HwMboxConfig_T *pHwMboxConfig, void *CB_Func,TI_HANDLE CB_handle, dot11StationIDStruct *CB_Buf);
    120 int  whal_hwInfoElemSoftGeminiEnableSet      (HwMboxConfig_T *pHwMboxConfig, SoftGeminiEnableModes_e SoftGeminiEnableModes);
    121 int  whal_hwInfoElemSoftGeminiParamsSet      (HwMboxConfig_T *pHwMboxConfig, SoftGeminiParam_t *SoftGeminiParam);
    122 int  whal_hwInfoElemSoftGeminiParamsGet      (HwMboxConfig_T *pHwMboxConfig, void *CB_Func, TI_HANDLE CB_handle, void* CB_Buf);
    123 int  whal_hwInfoElemAcxLowSNRThresholdSet    (HwMboxConfig_T *pHwMboxConfig, ACXLowSNRTriggerParameters_t* AcxElm_LowThresholdOptions);
    124 int  whal_hwInfoElemAcxLowRSSIThresholdSet   (HwMboxConfig_T *pHwMboxConfig, ACXLowRSSITriggerParameters_t* pWlanElm_LowRSSIThresholdOptions);
    125 int  whal_hwInfoElemAcxGetAverageRSSIGet     (HwMboxConfig_T *pHwMboxConfig, INT8* averageRSSI);
    126 int  whal_hwInfoElemAcxBssLossTsfThresholdSet(HwMboxConfig_T *pHwMboxConfig, AcxConnectionMonitorOptions* pWlanElm_BssLossTsfSynchronize);
    127 int  whal_hwInfoElemMiscTableSet             (HwMboxConfig_T *pHwMboxConfig, ACXMisc_t *pCfg);
    128 int  whal_hwInfoElemMiscTableGet             (HwMboxConfig_T *pHwMboxConfig, ACXMisc_t *pCfg, void *fCb, TI_HANDLE hCb);
    129 int  whal_hwInfoElemConfigMemorySet          (HwMboxConfig_T *pHwMboxConfig, DmaParams_T *pDmaParams);
    130 int  whal_hwInfoElemQueueHeadGet             (HwMboxConfig_T *pHwMboxConfig, int NumTxQueues, int pElem, void *fCb, TI_HANDLE hCb);
    131 int  whal_hwInfoElemSlotTimeSet              (HwMboxConfig_T *pHwMboxConfig, UINT8* apSlotTime);
    132 int  whal_hwInfoElemPreambleSet              (HwMboxConfig_T *pHwMboxConfig, UINT8* apPreamble);
    133 int  whal_hwInfoElemGeneratedFrameRateSet    (HwMboxConfig_T *pHwMboxConfig, UINT8* txCtrlFrmRate, UINT8* txCtrlFrmMod, UINT8* txMgmtFrmRate, UINT8* txMgmtFrmMod);
    134 int  whal_hwInfoElemAntennaDiversitySet      (HwMboxConfig_T *pHwMboxConfig, whalCtrl_antennaDiversityOptions_t* pAntennaDiversityOptions, UINT32 antNum );
    135 int  whal_hwInfoElemAcxStatisiticsGet        (HwMboxConfig_T *pHwMboxConfig, acxStatisitcs_t *acxStatisitcs);
    136 int  whal_hwInfoElemAcxReadGwsiStatisiticsGet(HwMboxConfig_T *pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
    137 int  whal_hwInfoElemAcxReadGwsiCountersGet   (HwMboxConfig_T *pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
    138 int  whal_hwInfoElemAcxStatisiticsSet        (HwMboxConfig_T *pHwMboxConfig);
    139 int  whal_hwInfoElemMediumOccupancyGet       (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t  interogateCmdCBParams);
    140 int  whal_hwInfoElemTfsDtimGet               (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t  interogateCmdCBParams);
    141 int  whal_hwInfoElemEventMaskSet             (HwMboxConfig_T *pHwMboxConfig, UINT32 MaskVector);
    142 int  whal_hwInfoElemPacketDetectionThresholdSet
    143                                              (HwMboxConfig_T *pHwMboxConfig, UINT32* pPdThreshold);
    144 int  whal_hwInfoElemCcaThresholdSet          (HwMboxConfig_T *pHwMboxConfig, UINT16* ccaThreshold, BOOL bTxEnergyDetection);
    145 int  whal_hwInfoElemDtimPeriodSet            (HwMboxConfig_T *pHwMboxConfig, UINT8* dtimPeriod, UINT16*TBTT);
    146 int  whal_hwInfoElemDtimPeriodGet            (HwMboxConfig_T *pHwMboxConfig, UINT8* dtimPeriod, UINT16*TBTT);
    147 int  whal_hwInfoElemTxRatePolicyConfigurationSet
    148                                              (HwMboxConfig_T *pHwMboxConfig, txRatePolicy_t *pTxRatePolicy);
    149 int  whal_hwInfoElemACIConfigurationSet      (HwMboxConfig_T *pHwMboxConfig, UINT8 ACIMode, UINT8 inputCCA, UINT8 qualifiedCCA, UINT8 stompForRx, UINT8 stompForTx, UINT8 txCCA);
    150 int  whal_hwInfoElemRSSIGet                  (HwMboxConfig_T *pHwMboxConfig, void *CB_Func, TI_HANDLE CB_handle, PUINT8 CB_Buf);
    151 int  whal_hwInfoElemTxConfigOptionsSet       (HwMboxConfig_T *pHwMboxConfig, UINT8 txCompleteThreshold, UINT16 txCompleteTimeout);
    152 int  whal_hwInfoElemRtsThresholdSet          (HwMboxConfig_T *pHwMboxConfig, UINT16 RtsThreshold);
    153 int  whal_hwInfoElemCtsToSelfSet             (HwMboxConfig_T *pHwMboxConfig, UINT8 CtsToSelf);
    154 int  whal_hwInfoElemAcxBcnBrcOptionsSet      (HwMboxConfig_T *pHwMboxConfig, ACXBeaconAndBroadcastOptions_t* pWlanElm_BcnBrcOptions);
    155 int  whal_hwInfoElemAcxBcnBrcOptionsGet      (HwMboxConfig_T *pHwMboxConfig, ACXBeaconAndBroadcastOptions_t* pWlanElm_BcnBrcOptions);
    156 int  whal_hwInfoElemWiFiWmmPSWASet           (HwMboxConfig_T *pHwMboxConfig, BOOL enableWA);
    157 
    158 
    159 int whalCtrl_getConsumptionStatistics        (HwMboxConfig_T * pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
    160 
    161 
    162 /*
    163  *	Data Path Configure API
    164  */
    165 int  whal_hwInfoElemDataPathParamsSet        (HwMboxConfig_T *pHwMboxConfig, UINT16 rxPacketRingChunkSize, UINT16 txPacketRingChunkSize, UINT8 rxPacketRingChunkNum, UINT8 txPacketRingChunkNum, UINT8 txCompleteThreshold, UINT8 txCompleteRingDepth,UINT32 txCompleteTimeOut);
    166 int  whal_hwInfoElemDataPathParamsGet        (HwMboxConfig_T *pHwMboxConfig, ACXDataPathParamsResp_t* apDataPathParams, void *fCb, TI_HANDLE hCb);
    167 int  whal_hwInfoElemQueueConfigurationSet    (HwMboxConfig_T *pHwMboxConfig, queueTrafficParams_t *pQtrafficParams);
    168 int  whal_hwInfoElemAcParamsConfigurationSet (HwMboxConfig_T *pHwMboxConfig, configureCmdCBParams_t *pConfigureCommand);
    169 int  whal_hwInfoElemAcParamsConfigurationGet (HwMboxConfig_T *pHwMboxConfig, configureCmdCBParams_t *pConfigureCommand);
    170 int  whal_hwInfoElemAcxSetMaxTxRetrySet      (HwMboxConfig_T *pHwMboxConfig, ACXConsTxFailureTriggerParameters_t* pWlanElm_SetMaxTxRetry);
    171 int  whal_hwInfoElemTxQueueCfgSet            (HwMboxConfig_T *pHwMboxConfig, acQueuesParams_t* pAcQueuesParams, UINT32 numOfTxBlk);
    172 int  whal_hwInfoElemRxTimeOutSet             (HwMboxConfig_T *pHwMboxConfig, rxTimeOut_t* pRxTimeOut);
    173 int  whal_hwInfoElemRxMsduLifeTimeSet        (HwMboxConfig_T *pHwMboxConfig, UINT32 RxMsduLifeTime);
    174 
    175 
    176 #endif
    177 
    178