• 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:  whalCommon.h
39  *   PURPOSE: common whal definitions
40  *
41  ****************************************************************************/
42 
43 #ifndef WHAL_COMMON_H
44 #define WHAL_COMMON_H
45 
46 #include "osTIType.h"
47 /*#include "osApi.h"*/
48 /*#include "paramIn.h"*/
49 /*#include "paramOut.h"*/
50 #include "report.h"
51 #include "utils.h"
52 /*#include "ti_types.h"*/
53 
54 /*
55  * hal reports
56  */
57 #define WLAN_REPORT_REPLY			WLAN_REPORT_CONSOLE
58 #define HAL_HW_CTRL_MODULE_LOG		HAL_CTRL_MODULE_LOG
59 #define HAL_HW_RX_MODULE_LOG		HAL_RX_MODULE_LOG
60 #define HAL_HW_TX_MODULE_LOG		HAL_TX_MODULE_LOG
61 #define HAL_HW_DATA_MODULE_LOG		HAL_TX_MODULE_LOG
62 #define HAL_TEST_MODULE_LOG			HAL_CTRL_MODULE_LOG
63 
64 
65 #if defined(HAL_ON_WIN)
66 
67 #ifdef HAL_ON_DRIVER
68 #define os_report	DbgPrint
69 #endif
70 
71 
72 /* whal utilities */
73 int  whalUtils_ConvertHwRate			(UINT8 HwRate, UINT8 HwModulation, rate_e *AppRate, modulationType_e *AppModulation);
74 int  whalUtils_ConvertAppRatesBitmap (UINT32 AppRatesBitmap, UINT32 AppModulation, UINT16 *HwRatesBitmap);
75 int  whalUtils_ConvertAppRate        (UINT32 AppRate, UINT32 AppModulation, UINT8 *HwRate);
76 int  whalUtils_ConvertHwRatesBitmap  (UINT8 HwRatesBitmap, UINT8 HwModulation, UINT32 *AppRate, UINT32 *AppModulation);
77 void  whalUtils_ConvertBitmapToMaxRate(UINT16 HwRatesBitmap, UINT8 *HwModulation, UINT8 *HwRate);
78 int  whalUtils_FindHwModulationByDrvRate (UINT32 AppRate, UINT8 *HwModu, UINT8 preamble);
79 #else
80 int  whalUtils_ConvertAppRate        (rate_e AppRate, UINT8 *HwRate);
81 int  whalUtils_FindHwModulationByDrvRate (rate_e AppRate, UINT8 *HwModu, UINT8 preamble);
82 int  whalUtils_ConvertAppRatesBitmap (UINT32 AppRatesBitmap, UINT32 AppModulation, UINT16 *HwRatesBitmap);
83 #endif /*HAL_ON_WIN*/
84 
85 UINT32  whalUtils_GwsiRate2DRV_RATE (UINT32 gwsiRate);
86 rateMask_e  whalUtils_GwsiRate2DRV_RATE_MASK (UINT32 gwsiRate);
87 UINT32  whalUtils_DRV_RATE2GwsiRate (UINT32 Rate);
88 UINT32  whalUtils_DRV_RATE_MASK2GwsiRate (rateMask_e rateMask);
89 
90 
91 /* User Callback for Queue */
92 typedef void (*CmdQueue_InterrogateCB_t )(TI_HANDLE objectHandle,UINT16 MboxStatus,void *InterrogateParamsBuf);
93 typedef void (*CmdQueue_CB_t )(TI_HANDLE objectHandle,UINT16 MboxStatus);
94 typedef void (*CmdQueue_GenericCB_t )(TI_HANDLE objectHandle, UINT16 CmdType, UINT16 CmdID, UINT32 aStatus);
95 
96 
97 #endif
98