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