Commit | Line | Data |
---|---|---|
80aba536 PE |
1 | #ifndef __WINBOND_LOCALPARA_H |
2 | #define __WINBOND_LOCALPARA_H | |
3 | ||
9bf10920 LL |
4 | /* |
5 | * ============================================================= | |
6 | * LocalPara.h - | |
7 | * ============================================================= | |
8 | */ | |
80aba536 PE |
9 | |
10 | #include "mac_structures.h" | |
11 | ||
9bf10920 | 12 | /* Define the local ability */ |
66101de1 | 13 | |
9bf10920 LL |
14 | #define LOCAL_DEFAULT_BEACON_PERIOD 100 /* ms */ |
15 | #define LOCAL_DEFAULT_ATIM_WINDOW 0 | |
16 | #define LOCAL_DEFAULT_ERP_CAPABILITY 0x0431 /* | |
17 | * 0x0001: ESS | |
18 | * 0x0010: Privacy | |
19 | * 0x0020: short preamble | |
20 | * 0x0400: short slot time | |
21 | */ | |
22 | #define LOCAL_DEFAULT_LISTEN_INTERVAL 5 | |
66101de1 | 23 | |
9bf10920 LL |
24 | #define LOCAL_DEFAULT_24_CHANNEL_NUM 13 /* channel 1..13 */ |
25 | #define LOCAL_DEFAULT_5_CHANNEL_NUM 8 /* channel 36..64 */ | |
66101de1 | 26 | |
9bf10920 LL |
27 | #define LOCAL_USA_24_CHANNEL_NUM 11 |
28 | #define LOCAL_USA_5_CHANNEL_NUM 12 | |
29 | #define LOCAL_EUROPE_24_CHANNEL_NUM 13 | |
30 | #define LOCAL_EUROPE_5_CHANNEL_NUM 19 | |
31 | #define LOCAL_JAPAN_24_CHANNEL_NUM 14 | |
32 | #define LOCAL_JAPAN_5_CHANNEL_NUM 11 | |
33 | #define LOCAL_UNKNOWN_24_CHANNEL_NUM 14 | |
34 | #define LOCAL_UNKNOWN_5_CHANNEL_NUM 34 /* not include 165 */ | |
66101de1 | 35 | |
9bf10920 | 36 | #define psLOCAL (&(adapter->sLocalPara)) |
66101de1 PM |
37 | |
38 | #define MODE_802_11_BG 0 | |
39 | #define MODE_802_11_A 1 | |
40 | #define MODE_802_11_ABG 2 | |
41 | #define MODE_802_11_BG_IBSS 3 | |
42 | #define MODE_802_11_B 4 | |
9bf10920 | 43 | #define MODE_AUTO 255 |
66101de1 PM |
44 | |
45 | #define BAND_TYPE_DSSS 0 | |
46 | #define BAND_TYPE_OFDM_24 1 | |
47 | #define BAND_TYPE_OFDM_5 2 | |
48 | ||
9bf10920 LL |
49 | /* refer Bitmap2RateValue table */ |
50 | ||
51 | /* the bitmap value of all the H/W supported rates: */ | |
52 | /* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */ | |
53 | #define LOCAL_ALL_SUPPORTED_RATES_BITMAP 0x130c1a66 | |
54 | /* the bitmap value of all the H/W supported rates except to non-OFDM rates: */ | |
55 | /* 6, 9, 12, 18, 24, 36, 48, 54 */ | |
56 | #define LOCAL_OFDM_SUPPORTED_RATES_BITMAP 0x130c1240 | |
57 | #define LOCAL_11B_SUPPORTED_RATE_BITMAP 0x826 | |
58 | #define LOCAL_11B_BASIC_RATE_BITMAP 0x826 | |
59 | #define LOCAL_11B_OPERATION_RATE_BITMAP 0x826 | |
60 | #define LOCAL_11G_BASIC_RATE_BITMAP 0x826 /* 1, 2, 5.5, 11 */ | |
61 | #define LOCAL_11G_OPERATION_RATE_BITMAP 0x130c1240 /* 6, 9, 12, 18, 24, 36, 48, 54 */ | |
62 | #define LOCAL_11A_BASIC_RATE_BITMAP 0x01001040 /* 6, 12, 24 */ | |
63 | #define LOCAL_11A_OPERATION_RATE_BITMAP 0x120c0200 /* 9, 18, 36, 48, 54 */ | |
64 | ||
65 | ||
66 | #define PWR_ACTIVE 0 | |
67 | #define PWR_SAVE 1 | |
66101de1 PM |
68 | #define PWR_TX_IDLE_CYCLE 6 |
69 | ||
9bf10920 LL |
70 | /* bPreambleMode and bSlotTimeMode */ |
71 | #define AUTO_MODE 0 | |
72 | #define LONG_MODE 1 | |
73 | ||
74 | /* Region definition */ | |
75 | #define REGION_AUTO 0xff | |
76 | #define REGION_UNKNOWN 0 | |
77 | #define REGION_EUROPE 1 /* ETSI */ | |
78 | #define REGION_JAPAN 2 /* MKK */ | |
79 | #define REGION_USA 3 /* FCC */ | |
80 | #define REGION_FRANCE 4 /* FRANCE */ | |
81 | #define REGION_SPAIN 5 /* SPAIN */ | |
82 | #define REGION_ISRAEL 6 /* ISRAEL */ | |
66101de1 PM |
83 | |
84 | #define MAX_BSS_DESCRIPT_ELEMENT 32 | |
9bf10920 LL |
85 | #define MAX_PMKID_CandidateList 16 |
86 | ||
87 | /* | |
88 | * High byte : Event number, low byte : reason | |
89 | * Event definition | |
90 | * -- SME/MLME event | |
91 | */ | |
92 | #define EVENT_RCV_DEAUTH 0x0100 | |
93 | #define EVENT_JOIN_FAIL 0x0200 | |
94 | #define EVENT_AUTH_FAIL 0x0300 | |
95 | #define EVENT_ASSOC_FAIL 0x0400 | |
96 | #define EVENT_LOST_SIGNAL 0x0500 | |
97 | #define EVENT_BSS_DESCRIPT_LACK 0x0600 | |
98 | #define EVENT_COUNTERMEASURE 0x0700 | |
99 | #define EVENT_JOIN_FILTER 0x0800 | |
100 | /* -- TX/RX event */ | |
101 | #define EVENT_RX_BUFF_UNAVAILABLE 0x4100 | |
102 | ||
103 | #define EVENT_CONNECT 0x8100 | |
104 | #define EVENT_DISCONNECT 0x8200 | |
105 | #define EVENT_SCAN_REQ 0x8300 | |
106 | ||
107 | /* Reason of Event */ | |
66101de1 | 108 | #define EVENT_REASON_FILTER_BASIC_RATE 0x0001 |
9bf10920 | 109 | #define EVENT_REASON_FILTER_PRIVACY 0x0002 |
66101de1 | 110 | #define EVENT_REASON_FILTER_AUTH_MODE 0x0003 |
9bf10920 | 111 | #define EVENT_REASON_TIMEOUT 0x00ff |
66101de1 | 112 | |
9bf10920 LL |
113 | /* Due to[E id][Length][OUI][Data] may be 257 bytes */ |
114 | #define MAX_IE_APPEND_SIZE (256 + 4) | |
66101de1 | 115 | |
9bf10920 LL |
116 | struct chan_info { |
117 | u8 band; | |
118 | u8 ChanNo; | |
440a233d | 119 | }; |
66101de1 | 120 | |
9bf10920 LL |
121 | struct radio_off { |
122 | u8 boHwRadioOff; | |
123 | u8 boSwRadioOff; | |
92ce4703 | 124 | }; |
66101de1 | 125 | |
9bf10920 LL |
126 | struct wb_local_para { |
127 | /* read from EPROM, manufacture set for each NetCard */ | |
128 | u8 PermanentAddress[MAC_ADDR_LENGTH + 2]; | |
129 | /* the driver will use this one actually. */ | |
130 | u8 ThisMacAddress[MAC_ADDR_LENGTH + 2]; | |
131 | u32 MTUsize; /* Ind to Uplayer, Max transmission unit size */ | |
132 | u8 region_INF; /* region setting from INF */ | |
133 | u8 region; /* real region setting of the device */ | |
134 | u8 Reserved_1[2]; | |
135 | ||
136 | /* power-save variables */ | |
137 | u8 iPowerSaveMode; /* 0 indicates on, 1 indicates off */ | |
138 | u8 ATIMmode; | |
139 | u8 ExcludeUnencrypted; | |
140 | /* Unit ime count for the decision to enter PS mode */ | |
141 | u16 CheckCountForPS; | |
142 | u8 boHasTxActivity;/* tx activity has occurred */ | |
143 | u8 boMacPsValid; /* Power save mode obtained from H/W is valid or not */ | |
144 | ||
145 | /* Rate */ | |
146 | u8 TxRateMode; /* | |
147 | * Initial, input from Registry, | |
148 | * may be updated by GUI | |
149 | * Tx Rate Mode: auto(DTO on), max, 1M, 2M, .. | |
150 | */ | |
151 | u8 CurrentTxRate; /* The current Tx rate */ | |
152 | u8 CurrentTxRateForMng; /* | |
153 | * The current Tx rate for management | |
154 | * frames. It will be decided before | |
155 | * connection succeeds. | |
156 | */ | |
157 | u8 CurrentTxFallbackRate; | |
158 | ||
159 | /* for Rate handler */ | |
160 | u8 BRateSet[32]; /* basic rate set */ | |
161 | u8 SRateSet[32]; /* support rate set */ | |
162 | ||
163 | u8 NumOfBRate; | |
164 | u8 NumOfSRate; | |
165 | u8 NumOfDsssRateInSRate; /* number of DSSS rates in supported rate set */ | |
166 | u8 reserved1; | |
167 | ||
168 | u32 dwBasicRateBitmap; /* bit map of basic rates */ | |
169 | ||
170 | u32 dwSupportRateBitmap; /* bit map of all support rates including basic and operational rates */ | |
171 | ||
172 | ||
173 | /* For SME/MLME handler */ | |
174 | ||
175 | u16 wOldSTAindex; /* valid when boHandover=TRUE, store old connected STA index */ | |
176 | u16 wConnectedSTAindex; /* Index of peerly connected AP or IBSS in the descriptionset. */ | |
177 | u16 Association_ID; /* The Association ID in the (Re)Association Response frame. */ | |
178 | u16 ListenInterval; /* The listen interval when SME invoking MLME_ (Re)Associate_Request(). */ | |
179 | ||
180 | struct radio_off RadioOffStatus; | |
181 | u8 Reserved0[2]; | |
182 | u8 boMsRadioOff; /* Ndis demands to be true when set Disassoc. OID and be false when set SSID OID. */ | |
183 | u8 bAntennaNo; /* which antenna */ | |
184 | u8 bConnectFlag; /* the connect status flag for roaming task */ | |
185 | ||
186 | u8 RoamStatus; | |
187 | u8 reserved7[3]; | |
188 | ||
189 | struct chan_info CurrentChan; /* Current channel no. and channel band. It may be changed by scanning. */ | |
190 | u8 boHandover; /* Roaming, Hnadover to other AP. */ | |
191 | u8 boCCAbusy; | |
192 | ||
193 | u16 CWMax; /* It may not be the real value that H/W used */ | |
194 | u8 CWMin; /* 255: set according to 802.11 spec. */ | |
195 | u8 reserved2; | |
196 | ||
197 | /* 11G: */ | |
198 | u8 bMacOperationMode; /* operation in 802.11b or 802.11g */ | |
199 | u8 bSlotTimeMode; /* AUTO, s32 */ | |
200 | u8 bPreambleMode; /* AUTO, s32 */ | |
201 | u8 boNonERPpresent; | |
202 | ||
203 | u8 boProtectMechanism; /* H/W will take the necessary action based on this variable */ | |
204 | u8 boShortPreamble; /* Same here */ | |
205 | u8 boShortSlotTime; /* Same here */ | |
206 | u8 reserved_3; | |
207 | ||
208 | u32 RSN_IE_Bitmap; | |
209 | u32 RSN_OUI_Type; | |
210 | ||
211 | /* For the BSSID */ | |
212 | u8 HwBssid[MAC_ADDR_LENGTH + 2]; | |
213 | u32 HwBssidValid; | |
214 | ||
215 | /* For scan list */ | |
216 | u8 BssListCount; /* Total count of valid descriptor indexes */ | |
217 | u8 boReceiveUncorrectInfo; /* important settings in beacon/probe resp. have been changed */ | |
218 | u8 NoOfJoinerInIbss; | |
219 | u8 reserved_4; | |
220 | ||
221 | /* Store the valid descriptor indexes obtained from scannings */ | |
222 | u8 BssListIndex[(MAX_BSS_DESCRIPT_ELEMENT + 3) & ~0x03]; | |
223 | /* | |
224 | * Save the BssDescriptor index in this IBSS. | |
225 | * The index 0 is local descriptor (psLOCAL->wConnectedSTAindex). | |
226 | * If CONNECTED : NoOfJoinerInIbss >= 2 | |
227 | * else : NoOfJoinerInIbss <= 1 | |
228 | */ | |
229 | u8 JoinerInIbss[(MAX_BSS_DESCRIPT_ELEMENT + 3) & ~0x03]; | |
230 | ||
231 | /* General Statistics, count at Rx_handler or Tx_callback interrupt handler */ | |
232 | u64 GS_XMIT_OK; /* Good Frames Transmitted */ | |
233 | u64 GS_RCV_OK; /* Good Frames Received */ | |
234 | u32 GS_RCV_ERROR; /* Frames received with crc error */ | |
235 | u32 GS_XMIT_ERROR; /* Bad Frames Transmitted */ | |
236 | u32 GS_RCV_NO_BUFFER; /* Receive Buffer underrun */ | |
237 | u32 GS_XMIT_ONE_COLLISION; /* one collision */ | |
238 | u32 GS_XMIT_MORE_COLLISIONS;/* more collisions */ | |
239 | ||
240 | /* | |
241 | * ================================================================ | |
242 | * Statistics (no matter whether it had done successfully) -wkchen | |
243 | * ================================================================ | |
244 | */ | |
245 | u32 _NumRxMSDU; | |
246 | u32 _NumTxMSDU; | |
247 | u32 _dot11WEPExcludedCount; | |
248 | u32 _dot11WEPUndecryptableCount; | |
249 | u32 _dot11FrameDuplicateCount; | |
250 | ||
251 | struct chan_info IbssChanSetting; /* 2B. Start IBSS Channel setting by registry or WWU. */ | |
252 | u8 reserved_5[2]; /* It may not be used after considering RF type, region and modulation type. */ | |
253 | ||
254 | u8 reserved_6[2]; /* two variables are for wep key error detection */ | |
255 | u32 bWepKeyError; | |
256 | u32 bToSelfPacketReceived; | |
257 | u32 WepKeyDetectTimerCount; | |
258 | ||
259 | u16 SignalLostTh; | |
260 | u16 SignalRoamTh; | |
261 | ||
66101de1 PM |
262 | u8 IE_Append_data[MAX_IE_APPEND_SIZE]; |
263 | u16 IE_Append_size; | |
264 | u16 reserved_7; | |
1bc5e651 | 265 | }; |
66101de1 | 266 | |
80aba536 | 267 | #endif |