1 #ifndef __WINBOND_LOCALPARA_H
2 #define __WINBOND_LOCALPARA_H
5 * =============================================================
7 * =============================================================
10 #include "mac_structures.h"
12 /* Define the local ability */
14 #define LOCAL_DEFAULT_BEACON_PERIOD 100 /* ms */
15 #define LOCAL_DEFAULT_ATIM_WINDOW 0
16 #define LOCAL_DEFAULT_ERP_CAPABILITY 0x0431 /*
19 * 0x0020: short preamble
20 * 0x0400: short slot time
22 #define LOCAL_DEFAULT_LISTEN_INTERVAL 5
24 #define LOCAL_DEFAULT_24_CHANNEL_NUM 13 /* channel 1..13 */
25 #define LOCAL_DEFAULT_5_CHANNEL_NUM 8 /* channel 36..64 */
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 */
36 #define psLOCAL (&(adapter->sLocalPara))
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
45 #define BAND_TYPE_DSSS 0
46 #define BAND_TYPE_OFDM_24 1
47 #define BAND_TYPE_OFDM_5 2
49 /* refer Bitmap2RateValue table */
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,
64 #define LOCAL_11A_BASIC_RATE_BITMAP 0x01001040 /* 6, 12, 24 */
65 #define LOCAL_11A_OPERATION_RATE_BITMAP 0x120c0200 /* 9, 18, 36,
72 #define PWR_TX_IDLE_CYCLE 6
74 /* bPreambleMode and bSlotTimeMode */
78 /* Region definition */
79 #define REGION_AUTO 0xff
80 #define REGION_UNKNOWN 0
81 #define REGION_EUROPE 1 /* ETSI */
82 #define REGION_JAPAN 2 /* MKK */
83 #define REGION_USA 3 /* FCC */
84 #define REGION_FRANCE 4 /* FRANCE */
85 #define REGION_SPAIN 5 /* SPAIN */
86 #define REGION_ISRAEL 6 /* ISRAEL */
88 #define MAX_BSS_DESCRIPT_ELEMENT 32
89 #define MAX_PMKID_CandidateList 16
92 * High byte : Event number, low byte : reason
96 #define EVENT_RCV_DEAUTH 0x0100
97 #define EVENT_JOIN_FAIL 0x0200
98 #define EVENT_AUTH_FAIL 0x0300
99 #define EVENT_ASSOC_FAIL 0x0400
100 #define EVENT_LOST_SIGNAL 0x0500
101 #define EVENT_BSS_DESCRIPT_LACK 0x0600
102 #define EVENT_COUNTERMEASURE 0x0700
103 #define EVENT_JOIN_FILTER 0x0800
105 #define EVENT_RX_BUFF_UNAVAILABLE 0x4100
107 #define EVENT_CONNECT 0x8100
108 #define EVENT_DISCONNECT 0x8200
109 #define EVENT_SCAN_REQ 0x8300
111 /* Reason of Event */
112 #define EVENT_REASON_FILTER_BASIC_RATE 0x0001
113 #define EVENT_REASON_FILTER_PRIVACY 0x0002
114 #define EVENT_REASON_FILTER_AUTH_MODE 0x0003
115 #define EVENT_REASON_TIMEOUT 0x00ff
117 /* Due to[E id][Length][OUI][Data] may be 257 bytes */
118 #define MAX_IE_APPEND_SIZE (256 + 4)
130 struct wb_local_para
{
131 /* read from EPROM, manufacture set for each NetCard */
132 u8 PermanentAddress
[MAC_ADDR_LENGTH
+ 2];
133 /* the driver will use this one actually. */
134 u8 ThisMacAddress
[MAC_ADDR_LENGTH
+ 2];
135 u32 MTUsize
; /* Ind to Uplayer, Max transmission unit size */
136 u8 region_INF
; /* region setting from INF */
137 u8 region
; /* real region setting of the device */
140 /* power-save variables */
141 u8 iPowerSaveMode
; /* 0 indicates on, 1 indicates off */
143 u8 ExcludeUnencrypted
;
144 /* Unit time count for the decision to enter PS mode */
146 u8 boHasTxActivity
;/* tx activity has occurred */
147 u8 boMacPsValid
; /* Power save mode obtained
148 * from H/W is valid or not
153 * Initial, input from Registry,
154 * may be updated by GUI
155 * Tx Rate Mode: auto(DTO on), max, 1M, 2M, ..
157 u8 CurrentTxRate
; /* The current Tx rate */
158 u8 CurrentTxRateForMng
; /*
159 * The current Tx rate for management
160 * frames. It will be decided before
161 * connection succeeds.
163 u8 CurrentTxFallbackRate
;
165 /* for Rate handler */
166 u8 BRateSet
[32]; /* basic rate set */
167 u8 SRateSet
[32]; /* support rate set */
171 u8 NumOfDsssRateInSRate
; /* number of DSSS rates in
176 u32 dwBasicRateBitmap
; /* bit map of basic rates */
178 u32 dwSupportRateBitmap
; /* bit map of all support rates
179 * including basic and operational
184 /* For SME/MLME handler */
186 u16 wOldSTAindex
; /* valid when boHandover=TRUE,
187 * store old connected STA index
189 u16 wConnectedSTAindex
; /* Index of peerly connected AP or
190 * IBSS in the descriptionset.
192 u16 Association_ID
; /* The Association ID in the
193 * (Re)Association Response frame.
195 u16 ListenInterval
; /* The listen interval when SME invoking
196 * MLME_ (Re)Associate_Request().
199 struct radio_off RadioOffStatus
;
201 u8 boMsRadioOff
; /* Ndis demands to be true when set
202 * Disassoc. OID and be false when
205 u8 bAntennaNo
; /* which antenna */
206 u8 bConnectFlag
; /* the connect status flag for
213 struct chan_info CurrentChan
; /* Current channel no. and channel band.
214 * It may be changed by scanning.
216 u8 boHandover
; /* Roaming, Handover to other AP. */
219 u16 CWMax
; /* It may not be the real value
222 u8 CWMin
; /* 255: set according to 802.11 spec. */
226 u8 bMacOperationMode
; /* operation in 802.11b or 802.11g */
227 u8 bSlotTimeMode
; /* AUTO, s32 */
228 u8 bPreambleMode
; /* AUTO, s32 */
231 u8 boProtectMechanism
; /* H/W will take the necessary action
232 * based on this variable
234 u8 boShortPreamble
; /* Same here */
235 u8 boShortSlotTime
; /* Same here */
242 u8 HwBssid
[MAC_ADDR_LENGTH
+ 2];
246 u8 BssListCount
; /* Total count of valid
249 u8 boReceiveUncorrectInfo
; /* important settings in beacon/probe
250 * resp. have been changed
255 /* Store the valid descriptor indexes obtained from scannings */
256 u8 BssListIndex
[(MAX_BSS_DESCRIPT_ELEMENT
+ 3) & ~0x03];
258 * Save the BssDescriptor index in this IBSS.
259 * The index 0 is local descriptor (psLOCAL->wConnectedSTAindex).
260 * If CONNECTED : NoOfJoinerInIbss >= 2
261 * else : NoOfJoinerInIbss <= 1
263 u8 JoinerInIbss
[(MAX_BSS_DESCRIPT_ELEMENT
+ 3) & ~0x03];
265 /* General Statistics, count at Rx_handler or
266 * Tx_callback interrupt handler
268 u64 GS_XMIT_OK
; /* Good Frames Transmitted */
269 u64 GS_RCV_OK
; /* Good Frames Received */
270 u32 GS_RCV_ERROR
; /* Frames received with crc error */
271 u32 GS_XMIT_ERROR
; /* Bad Frames Transmitted */
272 u32 GS_RCV_NO_BUFFER
; /* Receive Buffer underrun */
273 u32 GS_XMIT_ONE_COLLISION
; /* one collision */
274 u32 GS_XMIT_MORE_COLLISIONS
;/* more collisions */
277 * ================================================================
278 * Statistics (no matter whether it had done successfully) -wkchen
279 * ================================================================
283 u32 _dot11WEPExcludedCount
;
284 u32 _dot11WEPUndecryptableCount
;
285 u32 _dot11FrameDuplicateCount
;
287 struct chan_info IbssChanSetting
; /* 2B. Start IBSS Channel
288 * setting by registry or
291 u8 reserved_5
[2]; /* It may not be used after
292 * considering RF type, region
293 * and modulation type.
296 u8 reserved_6
[2]; /* two variables are for wep
297 * key error detection
300 u32 bToSelfPacketReceived
;
301 u32 WepKeyDetectTimerCount
;
306 u8 IE_Append_data
[MAX_IE_APPEND_SIZE
];