Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wl3501.h
Go to the documentation of this file.
1 #ifndef __WL3501_H__
2 #define __WL3501_H__
3 
4 #include <linux/spinlock.h>
5 #include <linux/ieee80211.h>
6 
7 /* define for WLA 2.0 */
8 #define WL3501_BLKSZ 256
9 /*
10  * ID for input Signals of DRIVER block
11  * bit[7-5] is block ID: 000
12  * bit[4-0] is signal ID
13 */
38 /*
39  * ID for input Signals of MLME block
40  * bit[7-5] is block ID: 010
41  * bit[4-0] is signal ID
42  */
61 };
62 
158 };
159 
164 };
165 
169 };
170 
175 };
176 
180 };
181 
189 };
190 
191 #define WL3501_MGMT_CAPABILITY_ESS 0x0001 /* see 802.11 p.58 */
192 #define WL3501_MGMT_CAPABILITY_IBSS 0x0002 /* - " - */
193 #define WL3501_MGMT_CAPABILITY_CF_POLLABLE 0x0004 /* - " - */
194 #define WL3501_MGMT_CAPABILITY_CF_POLL_REQUEST 0x0008 /* - " - */
195 #define WL3501_MGMT_CAPABILITY_PRIVACY 0x0010 /* - " - */
196 
197 #define IW_REG_DOMAIN_FCC 0x10 /* Channel 1 to 11 USA */
198 #define IW_REG_DOMAIN_DOC 0x20 /* Channel 1 to 11 Canada */
199 #define IW_REG_DOMAIN_ETSI 0x30 /* Channel 1 to 13 Europe */
200 #define IW_REG_DOMAIN_SPAIN 0x31 /* Channel 10 to 11 Spain */
201 #define IW_REG_DOMAIN_FRANCE 0x32 /* Channel 10 to 13 France */
202 #define IW_REG_DOMAIN_MKK 0x40 /* Channel 14 Japan */
203 #define IW_REG_DOMAIN_MKK1 0x41 /* Channel 1-14 Japan */
204 #define IW_REG_DOMAIN_ISRAEL 0x50 /* Channel 3 - 9 Israel */
205 
206 #define IW_MGMT_RATE_LABEL_MANDATORY 128 /* MSB */
207 
213 };
214 
216  IW_MGMT_INFO_ELEMENT_SSID, /* Service Set Identity */
221  IW_MGMT_INFO_ELEMENT_CS_TIM, /* Traffic Information Map */
223  /* 7-15: Reserved, unused */
225  /* 17-31 Reserved for challenge text extension */
226  /* 32-255 Reserved, unused */
227 };
228 
230  u8 id; /* one of enum iw_mgmt_info_element_ids,
231  but sizeof(enum) > sizeof(u8) :-( */
233  u8 data[0];
234 } __packed;
235 
239 } __packed;
240 
241 /*
242  * According to 802.11 Wireless Netowors, the definitive guide - O'Reilly
243  * Pg 75
244  */
245 #define IW_DATA_RATE_MAX_LABELS 8
246 
250 } __packed;
251 
255 } __packed;
256 
263 } __packed;
264 
268 } __packed;
269 
272  u8 sync[16];
285 };
286 
294  char time[8];
306 };
307 
322 };
323 
332 };
333 
339 };
340 
345 };
346 
354 };
355 
363 };
364 
370 };
371 
378  u8 mib_value[100];
379 };
380 
401 };
402 
408 };
409 
416 };
417 
423 };
424 
436 };
437 
443  char timestamp[8];
444  char localtime[8];
456 };
457 
463 };
464 
475 };
476 
488 };
489 
498 };
499 
503 };
504 
505 /* Definitions for supporting clone adapters. */
506 /* System Interface Registers (SIR space) */
507 #define WL3501_NIC_GCR ((u8)0x00) /* SIR0 - General Conf Register */
508 #define WL3501_NIC_BSS ((u8)0x01) /* SIR1 - Bank Switching Select Reg */
509 #define WL3501_NIC_LMAL ((u8)0x02) /* SIR2 - Local Mem addr Reg [7:0] */
510 #define WL3501_NIC_LMAH ((u8)0x03) /* SIR3 - Local Mem addr Reg [14:8] */
511 #define WL3501_NIC_IODPA ((u8)0x04) /* SIR4 - I/O Data Port A */
512 #define WL3501_NIC_IODPB ((u8)0x05) /* SIR5 - I/O Data Port B */
513 #define WL3501_NIC_IODPC ((u8)0x06) /* SIR6 - I/O Data Port C */
514 #define WL3501_NIC_IODPD ((u8)0x07) /* SIR7 - I/O Data Port D */
515 
516 /* Bits in GCR */
517 #define WL3501_GCR_SWRESET ((u8)0x80)
518 #define WL3501_GCR_CORESET ((u8)0x40)
519 #define WL3501_GCR_DISPWDN ((u8)0x20)
520 #define WL3501_GCR_ECWAIT ((u8)0x10)
521 #define WL3501_GCR_ECINT ((u8)0x08)
522 #define WL3501_GCR_INT2EC ((u8)0x04)
523 #define WL3501_GCR_ENECINT ((u8)0x02)
524 #define WL3501_GCR_DAM ((u8)0x01)
525 
526 /* Bits in BSS (Bank Switching Select Register) */
527 #define WL3501_BSS_FPAGE0 ((u8)0x20) /* Flash memory page0 */
528 #define WL3501_BSS_FPAGE1 ((u8)0x28)
529 #define WL3501_BSS_FPAGE2 ((u8)0x30)
530 #define WL3501_BSS_FPAGE3 ((u8)0x38)
531 #define WL3501_BSS_SPAGE0 ((u8)0x00) /* SRAM page0 */
532 #define WL3501_BSS_SPAGE1 ((u8)0x08)
533 #define WL3501_BSS_SPAGE2 ((u8)0x10)
534 #define WL3501_BSS_SPAGE3 ((u8)0x18)
535 
536 /* Define Driver Interface */
537 /* Refer IEEE 802.11 */
538 /* Tx packet header, include PLCP and MPDU */
539 /* Tx PLCP Header */
541  u8 sync[16];
547 } __packed;
548 
552 } __packed;
553 
554 /*
555  Reserve the beginning Tx space for descriptor use.
556 
557  TxBlockOffset --> *----*----*----*----* \
558  (TxFreeDesc) | 0 | 1 | 2 | 3 | \
559  | 4 | 5 | 6 | 7 | |
560  | 8 | 9 | 10 | 11 | TX_DESC * 20
561  | 12 | 13 | 14 | 15 | |
562  | 16 | 17 | 18 | 19 | /
563  TxBufferBegin --> *----*----*----*----* /
564  (TxBufferHead) | |
565  (TxBufferTail) | |
566  | Send Buffer |
567  | |
568  | |
569  *-------------------*
570  TxBufferEnd -------------------------/
571 
572 */
573 
574 struct wl3501_card {
595  int net_type;
596  char nick[32];
597  char card_name[32];
598  char firmware_date[32];
609 
613  struct pcmcia_device *p_dev;
614 };
615 #endif