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

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

http://github.com/CyanogenMod/cm-kernel
C Header | 116 lines | 53 code | 22 blank | 41 comment | 0 complexity | cbc1b4ff5b130b1d77edd70a519882bb 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: whalHwMboxCmdBit.h
  38. * PURPOSE: wlan hardware BIT(Built-In Test) commands header file
  39. *
  40. ****************************************************************************/
  41. #ifndef _WHAL_HW_MBOX_CMD_BIT_H
  42. #define _WHAL_HW_MBOX_CMD_BIT_H
  43. #include "whalCommon.h"
  44. #include "CmdQueue_api.h"
  45. /* Function prototypes */
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. typedef struct
  50. {
  51. void* CB_Func; /* Pointer to callback function to be called with the results, if working in Async mode (GWSI).*/
  52. TI_HANDLE CB_Handle;
  53. PLT_RxPerCmd_e CB_RxPerCmd; /* Enumerator of the invoked PLT command*/
  54. PltRxPer_t PltRxPer; /* The accumulated FCS error and total packets counts */
  55. ACXErrorCounters_t ACXErrCountTable; /* Last F.W. counters results */
  56. } HwMboxCmdBit_RxPer_t;
  57. typedef struct
  58. {
  59. void* CB_Func; /* Pointer to callback function to be called with the results, if working in Async mode (GWSI).*/
  60. TI_HANDLE CB_Handle;
  61. TI_STATUS lastStatus;
  62. } HwMboxCmdBit_RxTxCal_t;
  63. typedef union
  64. {
  65. HwMboxCmdBit_RxPer_t RxPer;
  66. HwMboxCmdBit_RxTxCal_t RxTxCal;
  67. }HwMboxCmdBit_u;
  68. typedef struct _HwMboxCmdBit_T
  69. {
  70. HwMboxCmdBit_u PltData;
  71. TI_HANDLE hCmdQueue;
  72. TI_HANDLE hOs;
  73. TI_HANDLE hReport;
  74. TI_HANDLE hWhalCtr;
  75. } HwMboxCmdBit_T;
  76. extern HwMboxCmdBit_T *whal_hwMboxCmdBit_Create(TI_HANDLE hOs);
  77. extern int whal_hwMboxCmdBit_Destroy(HwMboxCmdBit_T *this);
  78. extern int whal_hwMboxCmdBit_Config(TI_HANDLE hWhalCtr, HwMboxCmdBit_T *pHwMboxCmdBit, TI_HANDLE hCmdQueue, TI_HANDLE hReport);
  79. int whal_hwCmdBit_ReadRegister(HwMboxCmdBit_T *pHwMboxCmdBit, TI_HANDLE CB_Handle, void *CB_Func, void *CB_Buf);
  80. int whal_hwCmdBit_WriteRegister(HwMboxCmdBit_T *pHwMboxCmdBit, TI_HANDLE CB_Handle, void *CB_Func, void *Command_Buf);
  81. int whal_hwCmdBit_RxPER(HwMboxCmdBit_T *pHwMboxCmdBit, PLT_RxPerCmd_e eRxPerCmd, TI_HANDLE CB_Handle, void *CB_Func);
  82. int whal_hwCmdBit_TestCmd(HwMboxCmdBit_T *pHwMboxCmdBit, void *CB_Func, TI_HANDLE CB_handle, TestCmd_t* pTestCmd_Buf);
  83. void whal_hwCmdBit_GetPltRxCalibrationStatus( TI_HANDLE objectHandle, TI_STATUS* pLastStatus );
  84. int whal_hwCmdBit_Fcc(HwMboxCmdBit_T *pHwMboxCmdBit,
  85. int chID, int rate, int preamble,int bandID,
  86. int InterPacketDelay, int TestMode, uint32 numFrames,
  87. uint32 seqNumMode, uint32 frameBodySize, uint8 *PeerMacAddr,
  88. void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf);
  89. int whal_hwCmdBit_Telec(HwMboxCmdBit_T *pHwMboxCmdBit, int chID, int bandID, void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf);
  90. int whal_hwCmdBit_perTxStop(HwMboxCmdBit_T *pHwMboxCmdBit, void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf);
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif /* _WHAL_HW_MBOX_CMD_BIT_H */