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