|
1 /* |
|
2 * WlanDrvCommon.h |
|
3 * |
|
4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved. |
|
5 * All rights reserved. |
|
6 * |
|
7 * This program and the accompanying materials are made available under the |
|
8 * terms of the Eclipse Public License v1.0 or BSD License which accompanies |
|
9 * this distribution. The Eclipse Public License is available at |
|
10 * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below. |
|
11 * |
|
12 * Redistribution and use in source and binary forms, with or without |
|
13 * modification, are permitted provided that the following conditions |
|
14 * are met: |
|
15 * |
|
16 * * Redistributions of source code must retain the above copyright |
|
17 * notice, this list of conditions and the following disclaimer. |
|
18 * * Redistributions in binary form must reproduce the above copyright |
|
19 * notice, this list of conditions and the following disclaimer in |
|
20 * the documentation and/or other materials provided with the |
|
21 * distribution. |
|
22 * * Neither the name Texas Instruments nor the names of its |
|
23 * contributors may be used to endorse or promote products derived |
|
24 * from this software without specific prior written permission. |
|
25 * |
|
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
30 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
31 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
37 */ |
|
38 |
|
39 |
|
40 |
|
41 /** \file WlanDrvCommon.h |
|
42 * \brief Defines WlanDrvIf objects common to all OS types. |
|
43 * |
|
44 * \see WlanDrvIf.h |
|
45 */ |
|
46 |
|
47 #ifndef __WLAN_DRV_COMMON_H__ |
|
48 #define __WLAN_DRV_COMMON_H__ |
|
49 |
|
50 |
|
51 #include "tidef.h" |
|
52 #include "TWDriver.h" |
|
53 |
|
54 #define DRV_ADDRESS_SIZE (sizeof(TI_INT32)) |
|
55 #define MAX_CHUNKS_IN_FILE (1000) |
|
56 #define OS_SPECIFIC_RAM_ALLOC_LIMIT (0xFFFFFFFF) /* assume OS never reach that limit */ |
|
57 |
|
58 /* Driver steady states - for driver external users */ |
|
59 typedef enum |
|
60 { |
|
61 DRV_STATE_IDLE, |
|
62 DRV_STATE_RUNNING, |
|
63 DRV_STATE_STOPPED, |
|
64 DRV_STATE_FAILED |
|
65 } EDriverSteadyState; |
|
66 |
|
67 |
|
68 /* The driver Start/Stop actions */ |
|
69 typedef enum |
|
70 { |
|
71 ACTION_TYPE_NONE, |
|
72 ACTION_TYPE_START, |
|
73 ACTION_TYPE_STOP |
|
74 } EActionType; |
|
75 |
|
76 /* Initialization file info */ |
|
77 typedef struct |
|
78 { |
|
79 void *pImage; |
|
80 unsigned long uSize; |
|
81 } TInitImageInfo; |
|
82 |
|
83 /* WlanDrvIf object common part (included by TWlanDrvIfObj from each OS abstraction layer) */ |
|
84 typedef struct |
|
85 { |
|
86 /* Other modules handles */ |
|
87 void *hDrvMain; |
|
88 void *hCmdHndlr; |
|
89 void *hContext; |
|
90 void *hTxDataQ; |
|
91 void *hTxMgmtQ; |
|
92 void *hTxCtrl; |
|
93 void *hTWD; |
|
94 |
|
95 /* Initialization files info */ |
|
96 TInitImageInfo tIniFile; |
|
97 TInitImageInfo tNvsImage; |
|
98 TInitImageInfo tFwImage; |
|
99 |
|
100 EDriverSteadyState eDriverState; /* The driver state as presented to the OS */ |
|
101 TI_UINT32 uLinkSpeed; |
|
102 |
|
103 } TWlanDrvIfCommon; |
|
104 |
|
105 |
|
106 /* The loader files interface */ |
|
107 typedef struct |
|
108 { |
|
109 TI_UINT32 uNvsFileLength; |
|
110 TI_UINT32 uFwFileLength; |
|
111 TI_UINT32 uIniFileLength; |
|
112 char data[1]; |
|
113 /* eeprom image follows */ |
|
114 /* firmware image follows */ |
|
115 /* init file follows */ |
|
116 } TLoaderFilesData; |
|
117 |
|
118 |
|
119 |
|
120 #endif /* __WLAN_DRV_COMMON_H__ */ |