PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/hal/hw_ctrl/whalHwMboxConfig.h

http://github.com/CyanogenMod/cm-kernel
C Header | 177 lines | 114 code | 20 blank | 43 comment | 0 complexity | fcafe6546fdacc99f18973967d65d3cb 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. /****************************************************************************
  36. *
  37. * MODULE: whalHwMboxConfig.h
  38. * PURPOSE: wlan hardware configuration information elements
  39. *
  40. ****************************************************************************/
  41. #ifndef _WHAl_HW_MBOX_CONFIG_H
  42. #define _WHAl_HW_MBOX_CONFIG_H
  43. #include "whalCommon.h"
  44. #include "whalHwDefs.h"
  45. #include "whalCtrl_api.h"
  46. #define MAX_CONFIG_TX_QUEUES 5
  47. #define MAX_CONFIG_RX_QUEUES 5
  48. typedef struct
  49. {
  50. UINT32 HwQueueAddr;
  51. UINT8 HwQueueAttr;
  52. } QueueParams_T;
  53. typedef struct
  54. {
  55. UINT32 BaseAddr;
  56. UINT32 TxQueuesAddr;
  57. UINT32 TxQueuesSize;
  58. UINT32 RxQueuesAddr;
  59. UINT32 RxQueuesSize;
  60. UINT32 QindicatorAddr;
  61. UINT32 QindicatorSize;
  62. UINT32 NumTxQueues;
  63. UINT32 NumRxQueues;
  64. QueueParams_T TxQueuesParams[MAX_CONFIG_TX_QUEUES];
  65. QueueParams_T RxQueuesParams[MAX_CONFIG_RX_QUEUES];
  66. } MemQueueParams_T;
  67. typedef struct _HwMboxConfig_T
  68. {
  69. TI_HANDLE hCmdMboxQueue;
  70. TI_HANDLE hOs;
  71. TI_HANDLE hReport;
  72. ACXStatistics_t pAcxStatistic;
  73. MemoryMap_t MemMap;
  74. } HwMboxConfig_T;
  75. HwMboxConfig_T* whal_hwMboxConfig_Create (TI_HANDLE hOs);
  76. int whal_hwMboxConfig_Destroy (HwMboxConfig_T *pHwMboxConfig);
  77. int whal_hwMboxConfig_Config (HwMboxConfig_T *pHwMboxConfig, TI_HANDLE hCmdMboxQueue, TI_HANDLE hReport);
  78. int whal_hwInfoElemMemoryMapSet (HwMboxConfig_T *pHwMboxConfig, MemoryMap_t *apMap);
  79. int whal_hwInfoElemMemoryMapGet (HwMboxConfig_T *pHwMboxConfig, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb);
  80. void whal_hwInfoElemMemoryMapPrint (HwMboxConfig_T *pHwMboxConfig);
  81. int whal_hwInfoElemRxConfigSet (HwMboxConfig_T *pHwMboxConfig, UINT32* apRxConfigOption, UINT32* apRxFilterOption);
  82. int whal_hwInfoElemBETSet(HwMboxConfig_T* pHwMboxConfig, UINT8 Enable, UINT8 MaximumConsecutiveET);
  83. int whal_hwInfoElemSetRxDataFiltersParams (HwMboxConfig_T *pHwMboxConfig, BOOL enabled, filter_e defaultAction);
  84. int whal_hwInfoElemSetRxDataFilter (HwMboxConfig_T *pHwMboxConfig, UINT8 index, UINT8 command, filter_e action, UINT8 numFieldPatterns, UINT8 lenFieldPatterns, UINT8 * fieldPatterns);
  85. int whal_hwInfoElemGetRxDataFiltersStatistics(HwMboxConfig_T * pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  86. int whal_hwInfoElemStationIdSet (HwMboxConfig_T *pHwMboxConfig, UINT8* apStationId);
  87. int whal_hwInfoElemStationIdGet (HwMboxConfig_T *pHwMboxConfig, void *fCb, TI_HANDLE hCb, void *pCb);
  88. int whal_hwInfoElemConfigOptionsRead (HwMboxConfig_T *pHwMboxConfig, void* pElm);
  89. int whal_hwInfoElemAcxRevisionGet (HwMboxConfig_T *pHwMboxConfig, void *fCb, TI_HANDLE hCb, void *pCb);
  90. int whal_hwInfoElemWepDefaultKeyIdSet (HwMboxConfig_T *pHwMboxConfig, UINT8* apKeyVal, void *CB_Func, TI_HANDLE CB_handle);
  91. int whal_hwInfoElemWepDefaultKeyIdGet (HwMboxConfig_T *pHwMboxConfig, UINT8* apKeyVal, void *CB_Func, TI_HANDLE CB_handle);
  92. int whal_hwInfoElemStatisticsPrint (HwMboxConfig_T *pHwMboxConfig);
  93. int whal_hwInfoElemFcsErrorCntGet (HwMboxConfig_T *pHwMboxConfig, UINT32* pFcsErrCnt);
  94. int whal_hwInfoElemAcxPMConfigSet (HwMboxConfig_T *pHwMboxConfig, ACXConfigPM_t* pWlanElm_PowerMgmtOptions);
  95. int whal_hwInfoElemAcxSleepAuthoSet (HwMboxConfig_T *pHwMboxConfig, ACXSleepAuth_t* pWlanElm_SleepAutho);
  96. int whal_hwInfoElemAcxwakeUpConditionSet (HwMboxConfig_T *pHwMboxConfig, WakeUpCondition_t* pWlanElm_wakeUpCondition);
  97. int whal_hwInfoElemFeatureConfigSet (HwMboxConfig_T *pHwMboxConfig, UINT32 Options, UINT32 DataFlowOptions);
  98. int whal_hwInfoElemAcxBeaconFilterOptionsSet(HwMboxConfig_T *pHwMboxConfig, ACXBeaconFilterOptions_t* pWlanElm_BeaconFilterOptions);
  99. int whal_hwInfoElemAcxBeaconFilterIETableSet(HwMboxConfig_T *pHwMboxConfig, UINT8* numberOfIEs, UINT8* IETable, UINT8* IETableSize);
  100. int whal_hwInfoElemarpIpAddressesTableSet (HwMboxConfig_T *pHwMboxConfig, IpAddress_t *IP_addr, UINT32 isFilteringEnabled);
  101. int whal_hwInfoElemGroupAdressesTableSet (HwMboxConfig_T *pHwMboxConfig, UINT8* numGroupAddrs, macAddress_t *Group_addr, UINT8* isEnabled);
  102. int whal_hwInfoElemAidSet (HwMboxConfig_T *pHwMboxConfig, UINT16* apAidVal);
  103. int whal_hwInfoElemTxPowerSet (HwMboxConfig_T *pHwMboxConfig, UINT8 *TxPowerDbm);
  104. int whal_hwInfoElemNoiseHistogramResultsGet (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t noiseHistCBParams);
  105. int whal_hwInfoElemPowerLevelTableGet (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t powerLevelCBParams);
  106. int whal_hwInfoElemStationIdForRecoveryGet (HwMboxConfig_T *pHwMboxConfig, void *CB_Func,TI_HANDLE CB_handle, dot11StationIDStruct *CB_Buf);
  107. int whal_hwInfoElemSoftGeminiEnableSet (HwMboxConfig_T *pHwMboxConfig, SoftGeminiEnableModes_e SoftGeminiEnableModes);
  108. int whal_hwInfoElemSoftGeminiParamsSet (HwMboxConfig_T *pHwMboxConfig, SoftGeminiParam_t *SoftGeminiParam);
  109. int whal_hwInfoElemSoftGeminiParamsGet (HwMboxConfig_T *pHwMboxConfig, void *CB_Func, TI_HANDLE CB_handle, void* CB_Buf);
  110. int whal_hwInfoElemAcxLowSNRThresholdSet (HwMboxConfig_T *pHwMboxConfig, ACXLowSNRTriggerParameters_t* AcxElm_LowThresholdOptions);
  111. int whal_hwInfoElemAcxLowRSSIThresholdSet (HwMboxConfig_T *pHwMboxConfig, ACXLowRSSITriggerParameters_t* pWlanElm_LowRSSIThresholdOptions);
  112. int whal_hwInfoElemAcxGetAverageRSSIGet (HwMboxConfig_T *pHwMboxConfig, INT8* averageRSSI);
  113. int whal_hwInfoElemAcxBssLossTsfThresholdSet(HwMboxConfig_T *pHwMboxConfig, AcxConnectionMonitorOptions* pWlanElm_BssLossTsfSynchronize);
  114. int whal_hwInfoElemMiscTableSet (HwMboxConfig_T *pHwMboxConfig, ACXMisc_t *pCfg);
  115. int whal_hwInfoElemMiscTableGet (HwMboxConfig_T *pHwMboxConfig, ACXMisc_t *pCfg, void *fCb, TI_HANDLE hCb);
  116. int whal_hwInfoElemConfigMemorySet (HwMboxConfig_T *pHwMboxConfig, DmaParams_T *pDmaParams);
  117. int whal_hwInfoElemQueueHeadGet (HwMboxConfig_T *pHwMboxConfig, int NumTxQueues, int pElem, void *fCb, TI_HANDLE hCb);
  118. int whal_hwInfoElemSlotTimeSet (HwMboxConfig_T *pHwMboxConfig, UINT8* apSlotTime);
  119. int whal_hwInfoElemPreambleSet (HwMboxConfig_T *pHwMboxConfig, UINT8* apPreamble);
  120. int whal_hwInfoElemGeneratedFrameRateSet (HwMboxConfig_T *pHwMboxConfig, UINT8* txCtrlFrmRate, UINT8* txCtrlFrmMod, UINT8* txMgmtFrmRate, UINT8* txMgmtFrmMod);
  121. int whal_hwInfoElemAntennaDiversitySet (HwMboxConfig_T *pHwMboxConfig, whalCtrl_antennaDiversityOptions_t* pAntennaDiversityOptions, UINT32 antNum );
  122. int whal_hwInfoElemAcxStatisiticsGet (HwMboxConfig_T *pHwMboxConfig, acxStatisitcs_t *acxStatisitcs);
  123. int whal_hwInfoElemAcxReadGwsiStatisiticsGet(HwMboxConfig_T *pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  124. int whal_hwInfoElemAcxReadGwsiCountersGet (HwMboxConfig_T *pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  125. int whal_hwInfoElemAcxStatisiticsSet (HwMboxConfig_T *pHwMboxConfig);
  126. int whal_hwInfoElemMediumOccupancyGet (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t interogateCmdCBParams);
  127. int whal_hwInfoElemTfsDtimGet (HwMboxConfig_T *pHwMboxConfig, interogateCmdCBParams_t interogateCmdCBParams);
  128. int whal_hwInfoElemEventMaskSet (HwMboxConfig_T *pHwMboxConfig, UINT32 MaskVector);
  129. int whal_hwInfoElemPacketDetectionThresholdSet
  130. (HwMboxConfig_T *pHwMboxConfig, UINT32* pPdThreshold);
  131. int whal_hwInfoElemCcaThresholdSet (HwMboxConfig_T *pHwMboxConfig, UINT16* ccaThreshold, BOOL bTxEnergyDetection);
  132. int whal_hwInfoElemDtimPeriodSet (HwMboxConfig_T *pHwMboxConfig, UINT8* dtimPeriod, UINT16*TBTT);
  133. int whal_hwInfoElemDtimPeriodGet (HwMboxConfig_T *pHwMboxConfig, UINT8* dtimPeriod, UINT16*TBTT);
  134. int whal_hwInfoElemTxRatePolicyConfigurationSet
  135. (HwMboxConfig_T *pHwMboxConfig, txRatePolicy_t *pTxRatePolicy);
  136. int whal_hwInfoElemACIConfigurationSet (HwMboxConfig_T *pHwMboxConfig, UINT8 ACIMode, UINT8 inputCCA, UINT8 qualifiedCCA, UINT8 stompForRx, UINT8 stompForTx, UINT8 txCCA);
  137. int whal_hwInfoElemRSSIGet (HwMboxConfig_T *pHwMboxConfig, void *CB_Func, TI_HANDLE CB_handle, PUINT8 CB_Buf);
  138. int whal_hwInfoElemTxConfigOptionsSet (HwMboxConfig_T *pHwMboxConfig, UINT8 txCompleteThreshold, UINT16 txCompleteTimeout);
  139. int whal_hwInfoElemRtsThresholdSet (HwMboxConfig_T *pHwMboxConfig, UINT16 RtsThreshold);
  140. int whal_hwInfoElemCtsToSelfSet (HwMboxConfig_T *pHwMboxConfig, UINT8 CtsToSelf);
  141. int whal_hwInfoElemAcxBcnBrcOptionsSet (HwMboxConfig_T *pHwMboxConfig, ACXBeaconAndBroadcastOptions_t* pWlanElm_BcnBrcOptions);
  142. int whal_hwInfoElemAcxBcnBrcOptionsGet (HwMboxConfig_T *pHwMboxConfig, ACXBeaconAndBroadcastOptions_t* pWlanElm_BcnBrcOptions);
  143. int whal_hwInfoElemWiFiWmmPSWASet (HwMboxConfig_T *pHwMboxConfig, BOOL enableWA);
  144. int whalCtrl_getConsumptionStatistics (HwMboxConfig_T * pHwMboxConfig, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf);
  145. /*
  146. * Data Path Configure API
  147. */
  148. int whal_hwInfoElemDataPathParamsSet (HwMboxConfig_T *pHwMboxConfig, UINT16 rxPacketRingChunkSize, UINT16 txPacketRingChunkSize, UINT8 rxPacketRingChunkNum, UINT8 txPacketRingChunkNum, UINT8 txCompleteThreshold, UINT8 txCompleteRingDepth,UINT32 txCompleteTimeOut);
  149. int whal_hwInfoElemDataPathParamsGet (HwMboxConfig_T *pHwMboxConfig, ACXDataPathParamsResp_t* apDataPathParams, void *fCb, TI_HANDLE hCb);
  150. int whal_hwInfoElemQueueConfigurationSet (HwMboxConfig_T *pHwMboxConfig, queueTrafficParams_t *pQtrafficParams);
  151. int whal_hwInfoElemAcParamsConfigurationSet (HwMboxConfig_T *pHwMboxConfig, configureCmdCBParams_t *pConfigureCommand);
  152. int whal_hwInfoElemAcParamsConfigurationGet (HwMboxConfig_T *pHwMboxConfig, configureCmdCBParams_t *pConfigureCommand);
  153. int whal_hwInfoElemAcxSetMaxTxRetrySet (HwMboxConfig_T *pHwMboxConfig, ACXConsTxFailureTriggerParameters_t* pWlanElm_SetMaxTxRetry);
  154. int whal_hwInfoElemTxQueueCfgSet (HwMboxConfig_T *pHwMboxConfig, acQueuesParams_t* pAcQueuesParams, UINT32 numOfTxBlk);
  155. int whal_hwInfoElemRxTimeOutSet (HwMboxConfig_T *pHwMboxConfig, rxTimeOut_t* pRxTimeOut);
  156. int whal_hwInfoElemRxMsduLifeTimeSet (HwMboxConfig_T *pHwMboxConfig, UINT32 RxMsduLifeTime);
  157. #endif