Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
localpara.h
Go to the documentation of this file.
1 #ifndef __WINBOND_LOCALPARA_H
2 #define __WINBOND_LOCALPARA_H
3 
4 /*
5  * =============================================================
6  * LocalPara.h -
7  * =============================================================
8  */
9 
10 #include "mac_structures.h"
11 
12 /* Define the local ability */
13 
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
23 
24 #define LOCAL_DEFAULT_24_CHANNEL_NUM 13 /* channel 1..13 */
25 #define LOCAL_DEFAULT_5_CHANNEL_NUM 8 /* channel 36..64 */
26 
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 */
35 
36 #define psLOCAL (&(adapter->sLocalPara))
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
43 #define MODE_AUTO 255
44 
45 #define BAND_TYPE_DSSS 0
46 #define BAND_TYPE_OFDM_24 1
47 #define BAND_TYPE_OFDM_5 2
48 
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
68 #define PWR_TX_IDLE_CYCLE 6
69 
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 */
83 
84 #define MAX_BSS_DESCRIPT_ELEMENT 32
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
107 /* Reason of Event */
108 #define EVENT_REASON_FILTER_BASIC_RATE 0x0001
109 #define EVENT_REASON_FILTER_PRIVACY 0x0002
110 #define EVENT_REASON_FILTER_AUTH_MODE 0x0003
111 #define EVENT_REASON_TIMEOUT 0x00ff
113 /* Due to[E id][Length][OUI][Data] may be 257 bytes */
114 #define MAX_IE_APPEND_SIZE (256 + 4)
115 
116 struct chan_info {
119 };
120 
121 struct radio_off {
124 };
127  /* read from EPROM, manufacture set for each NetCard */
129  /* the driver will use this one actually. */
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 */
135 
136  /* power-save variables */
137  u8 iPowerSaveMode; /* 0 indicates on, 1 indicates off */
140  /* Unit time count for the decision to enter PS mode */
142  u8 boHasTxActivity;/* tx activity has occurred */
143  u8 boMacPsValid; /* Power save mode obtained from H/W is valid or not */
144 
145  /* Rate */
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 */
153  * The current Tx rate for management
154  * frames. It will be decided before
155  * connection succeeds.
156  */
159  /* for Rate handler */
160  u8 BRateSet[32]; /* basic rate set */
161  u8 SRateSet[32]; /* support rate set */
162 
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 */
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(). */
180  struct radio_off RadioOffStatus;
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 */
187  u8 reserved7[3];
189  struct chan_info CurrentChan; /* Current channel no. and channel band. It may be changed by scanning. */
190  u8 boHandover; /* Roaming, Handover 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. */
197  /* 11G: */
198  u8 bMacOperationMode; /* operation in 802.11b or 802.11g */
199  u8 bSlotTimeMode; /* AUTO, s32 */
200  u8 bPreambleMode; /* AUTO, s32 */
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;
210 
211  /* For the BSSID */
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 */
219  u8 reserved_4;
220 
221  /* Store the valid descriptor indexes obtained from scannings */
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  */
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;
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 */
261 
264  u16 reserved_7;
265 };
266 
267 #endif