Home | History | Annotate | Download | only in Inc
      1 /*******************************************************************************
      2 **+--------------------------------------------------------------------------+**
      3 **|                                                                          |**
      4 **| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/         |**
      5 **|                                                                          |**
      6 **| Licensed under the Apache License, Version 2.0 (the "License");          |**
      7 **| you may not use this file except in compliance with the License.         |**
      8 **| You may obtain a copy of the License at                                  |**
      9 **|                                                                          |**
     10 **|     http://www.apache.org/licenses/LICENSE-2.0                           |**
     11 **|                                                                          |**
     12 **| Unless required by applicable law or agreed to in writing, software      |**
     13 **| distributed under the License is distributed on an "AS IS" BASIS,        |**
     14 **| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |**
     15 **| See the License for the specific language governing permissions and      |**
     16 **| limitations under the License.                                           |**
     17 **|                                                                          |**
     18 **+--------------------------------------------------------------------------+**
     19 *******************************************************************************/
     20 
     21 /*--------------------------------------------------------------------------*/
     22 /* Module:		TI_AdapterDBG.h*/
     23 /**/
     24 /* Purpose:		*/
     25 /**/
     26 /*--------------------------------------------------------------------------*/
     27 
     28 #ifndef TI_ADAPTER_DBG_H
     29 #define TI_ADAPTER_DBG_H
     30 
     31 #ifdef __cplusplus
     32 extern "C" {
     33 #endif
     34 
     35 /******************************************************************************
     36 
     37     Name:   TI_DisplayStats
     38     Desc:	This function calls the driver internal debug function with the
     39             supplied information.
     40     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
     41             puDbgBuffer - A buffer holding debug parameter. The first 4-byte
     42                           word is the debug function to call, and the second
     43                           word is an optional parameter, whose value depends
     44                           on the debug function
     45             uBuffSize - The size of the buffer.
     46     Return:	TI_RESULT_OK on success. Any other value indicates an error.
     47 
     48 ******************************************************************************/
     49 tiINT32     TI_DisplayStats                 (TI_HANDLE  hAdapter,
     50                                              tiUINT8*  puDbgBuffer,
     51                                              tiUINT32  uBuffSize  );
     52 
     53     /************** logging control in linux *****************************************/
     54 /******************************************************************************
     55 
     56     Name:   TI_SetReportModule
     57     Desc:	This function sets the modules which reporting is performed.
     58     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
     59             pData - A pointer to the bitmask defining the modules for which report
     60                     information will be printed (see TIWlanModuleLogName_e)
     61     Return:	TI_RESULT_OK on success. Any other value indicates an error.
     62 
     63 ******************************************************************************/
     64 tiINT32     TI_SetReportModule              (TI_HANDLE  hAdapter,
     65                                              tiUINT8 *pData);
     66 
     67 /******************************************************************************
     68 
     69     Name:   TI_GetReportModule
     70     Desc:	This function retrieves the modules which reporting is performed.
     71     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
     72             pData - A pointer to the bitmask defining the modules for which report
     73                     information will be printed (see TIWlanModuleLogName_e)
     74     Return:	TI_RESULT_OK on success. Any other value indicates an error.
     75 
     76 ******************************************************************************/
     77 tiINT32     TI_GetReportModule              (TI_HANDLE  hAdapter,
     78                                              tiUINT8 *pData);
     79 
     80 /******************************************************************************
     81 
     82     Name:   TI_SetReportSeverity
     83     Desc:	This function sets the severities for which report information will
     84             be available. To request the information for a severity level to be
     85             available, include "1 << desired severity value" in the bitmask.
     86     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
     87             pData - A pointer to a 1-byte bitmask of the severities:
     88                      WLAN_SEVERITY_INIT         1
     89                      WLAN_SEVERITY_INFORMATION  2
     90                      WLAN_SEVERITY_WARNING      3
     91                      WLAN_SEVERITY_ERROR        4
     92                      WLAN_SEVERITY_FATAL_ERROR  5
     93                      WLAN_SEVERITY_SM           6
     94                      WLAN_SEVERITY_CONSOLE      7
     95     Return:	TI_RESULT_OK on success. Any other value indicates an error.
     96 
     97 ******************************************************************************/
     98 tiINT32     TI_SetReportSeverity            (TI_HANDLE  hAdapter,
     99                                              tiUINT8* pData);
    100 
    101 /******************************************************************************
    102 
    103     Name:   TI_GetReportSeverity
    104     Desc:	This function retrieves the report severities bit mask.
    105     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    106             pData - A pointer to a 1-byte word in which severity bitmask will
    107             be written.
    108     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    109 
    110 ******************************************************************************/
    111 tiINT32     TI_GetReportSeverity            (TI_HANDLE  hAdapter,
    112                                              tiUINT8* pData);
    113 
    114 
    115 /******************************************************************************
    116 
    117     Name:   TI_SetOsDbgState
    118     Desc:	Set OS adaptation layer debug state
    119     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    120             uData - .
    121     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    122 
    123 ******************************************************************************/
    124 tiINT32     TI_SetOsDbgState				(TI_HANDLE  hAdapter,
    125                                              tiUINT32 uData);
    126 
    127 /******************************************************************************
    128 
    129     Name:   TI_GetOsDbgState
    130     Desc:	Get OS adaptation layer debug state
    131     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    132             uData - .
    133     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    134 
    135 ******************************************************************************/
    136 tiINT32     TI_GetOsDbgState				(TI_HANDLE  hAdapter,
    137                                              tiUINT32* puData);
    138 
    139 
    140 /******************************************************************************
    141 
    142     Name:   TI_SetReportPPMode
    143     Desc:
    144     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    145             uData - .
    146     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    147 
    148 ******************************************************************************/
    149 tiINT32     TI_SetReportPPMode				(TI_HANDLE  hAdapter,
    150                                              tiUINT32 uData);
    151 
    152 /******************************************************************************
    153 
    154     Name:   TI_hwWriteRegister
    155     Desc:	This debug command writes a value to a register.
    156     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    157             uRegisterAddr -
    158             dwValue -
    159     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    160 
    161 ******************************************************************************/
    162 tiINT32     TI_hwWriteRegister              (TI_HANDLE  hAdapter,
    163                                              tiUINT32 uRegisterAddr,
    164                                              tiUINT32 dwValue );
    165 
    166 /******************************************************************************
    167 
    168     Name:   TI_hwReadRegister
    169     Desc:	This debug command reads a value of a register.
    170     Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    171             uRegisterAddr -
    172             puValue -
    173     Return:	TI_RESULT_OK on success. Any other value indicates an error.
    174 
    175 ******************************************************************************/
    176 tiINT32     TI_hwReadRegister               (TI_HANDLE  hAdapter,
    177                                              tiUINT32 uRegisterAddr,
    178                                              tiUINT32* puValue );
    179 
    180 
    181 #ifdef __cplusplus
    182 }
    183 #endif
    184 
    185 #endif /* TI_ADAPTER_DBG_H*/
    186