PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/hal/hl_ctrl/whalCtrl.h

http://github.com/CyanogenMod/cm-kernel
C Header | 120 lines | 59 code | 23 blank | 38 comment | 0 complexity | bb62cd795aff37dd6176d4b27a975c13 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_H
  36. #define _WHAL_CTRL_H
  37. #include "whalCommon.h"
  38. #include "whalParams.h"
  39. #include "whalHwCtrl.h"
  40. #include "rxXfer_api.h"
  41. /* CLASS WHAL_CTRL*/
  42. typedef struct _WHAL_CTRL
  43. {
  44. WhalParams_T* pWhalParams;
  45. ReadWriteCommand_t printRegsBuf;
  46. scanCompleteCB_t ScanCmplt_CB;
  47. void* ScanCmplt_CB_handle;
  48. MacStatusCB_t MacStatusCB_CB;
  49. void* MacStatusCB_CB_handle;
  50. HealthReportCB_t HealthReportCB_CB;
  51. void* HealthReportCB_handle;
  52. AciIndicationCB_t AciIndicationCB_CB;
  53. void* AciIndicationCB_handle;
  54. failureEventCB_t FailureEvent_CB;
  55. void* FailureEvent_CB_handle;
  56. BOOL EncDecEnableFlag; /* flag to designates whether the Hw encrypt and decrypt
  57. facility on WEP options IE already enabled*/
  58. TI_HANDLE hOs;
  59. TI_HANDLE hReport;
  60. TI_HANDLE hTNETW_Driver;
  61. TI_HANDLE hFwEvent;
  62. TI_HANDLE hTxXfer;
  63. TI_HANDLE hTxResult;
  64. TI_HANDLE hTxHwQueue;
  65. TI_HANDLE hRxXfer;
  66. TI_HANDLE hEventMbox;
  67. struct _WHAL_SECURITY* pWhalSecurity;
  68. struct _HwCtrl_T *pHwCtrl; /* Pointer to the LL_HAL acxCtrl module*/
  69. TI_HANDLE hWhalBus; /* Pointer to the LL_HAL acxCtrl module*/
  70. TI_HANDLE hCmdQueue;
  71. /* Init stage callback function pointer and handle */
  72. void *fCb;
  73. TI_HANDLE hCb;
  74. ACXMisc_t misc;
  75. #ifdef TI_DBG
  76. TI_HANDLE hDebugTrace;
  77. #endif /* TI_DBG */
  78. } WHAL_CTRL;
  79. WhalParams_T *whalCtrl_GetWhalParamsHandle(WHAL_CTRL *pWhalCtrl);
  80. void whalCtrl_MacStatus_CB(TI_HANDLE hWhalCtrl, char* MacStatus , UINT32 strLen);
  81. void whalCtrl_HealthReoprt_CB(TI_HANDLE hWhalCtrl, char* MacStatus , UINT32 strLen);
  82. void whalCtrl_registerDump(TI_HANDLE hWhalCtrl);
  83. int whalCtrl_RegisterCmdCompleteGenericCB(TI_HANDLE hWhalCtrl, void *CbFunc ,void *CbObj);
  84. int whalCtrl_RegisterErrorsCallbacks(TI_HANDLE hWhalCtrl);
  85. int whalCtrl_ReJoinBss (TI_HANDLE hWhalCtrl);
  86. TI_STATUS whalCtrl_getRadioNumber(TI_HANDLE hWhalCtrl, UINT32 *outRadioType, UINT32 *outRadioNumber);
  87. TI_STATUS whalCtrl_FinalizeDownload(TI_HANDLE hWhalCtrl);
  88. /* Used for Memory or Registers reading/writing*/
  89. typedef enum
  90. {
  91. TNETW_INTERNAL_RAM = 0,
  92. TNETW_MAC_REGISTERS = 1,
  93. TNETW_PHY_REGISTERS = 2,
  94. } readWrite_MemoryType_e;
  95. void whalCtrl_Print_Mem_Regs (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 len, readWrite_MemoryType_e memType);
  96. int whalCtrl_Set_Mem_Regs (TI_HANDLE hWhalCtrl, UINT32 address, UINT32 len, UINT32 aWriteVal, readWrite_MemoryType_e memType);
  97. #endif /* _WHAL_CTRL_H*/