Staging: add w35und wifi driver
[linux-2.6/mini2440.git] / drivers / staging / winbond / scan_s.h
blob1d1b0c4fec17e14d3989a320698850c053f19af8
1 //
2 // SCAN task global CONSTANTS, STRUCTURES, variables
3 //
5 //////////////////////////////////////////////////////////////////////////
6 //define the msg type of SCAN module
7 #define SCANMSG_SCAN_REQ 0x01
8 #define SCANMSG_BEACON 0x02
9 #define SCANMSG_PROBE_RESPONSE 0x03
10 #define SCANMSG_TIMEOUT 0x04
11 #define SCANMSG_TXPROBE_FAIL 0x05
12 #define SCANMSG_ENABLE_BGSCAN 0x06
13 #define SCANMSG_STOP_SCAN 0x07
15 // BSS Type =>conform to
16 // IBSS : ToDS/FromDS = 00
17 // Infrastructure : ToDS/FromDS = 01
18 #define IBSS_NET 0
19 #define ESS_NET 1
20 #define ANYBSS_NET 2
22 // Scan Type
23 #define ACTIVE_SCAN 0
24 #define PASSIVE_SCAN 1
26 ///////////////////////////////////////////////////////////////////////////
27 //Global data structures, Initial Scan & Background Scan
28 typedef struct _SCAN_REQ_PARA //mandatory parameters for SCAN request
30 u32 ScanType; //passive/active scan
32 CHAN_LIST sChannelList; // 86B
33 u8 reserved_1[2];
35 struct SSID_Element sSSID; // 34B. scan only for this SSID
36 u8 reserved_2[2];
38 } SCAN_REQ_PARA, *psSCAN_REQ_PARA;
40 typedef struct _SCAN_PARAMETERS
42 u16 wState;
43 u16 iCurrentChannelIndex;
45 SCAN_REQ_PARA sScanReq;
47 u8 BSSID[MAC_ADDR_LENGTH + 2]; //scan only for this BSSID
49 u32 BssType; //scan only for this BSS type
51 //struct SSID_Element sSSID; //scan only for this SSID
52 u16 ProbeDelay;
53 u16 MinChannelTime;
55 u16 MaxChannelTime;
56 u16 reserved_1;
58 s32 iBgScanPeriod; // XP: 5 sec
60 u8 boBgScan; // Wb: enable BG scan, For XP, this value must be FALSE
61 u8 boFastScan; // Wb: reserved
62 u8 boCCAbusy; // Wb: HWMAC CCA busy status
63 u8 reserved_2;
65 //NDIS_MINIPORT_TIMER nTimer;
66 OS_TIMER nTimer;
68 u32 ScanTimeStamp; //Increase 1 per background scan(1 minute)
69 u32 BssTimeStamp; //Increase 1 per connect status check
70 u32 RxNumPerAntenna[2]; //
72 u8 AntennaToggle; //
73 u8 boInTimerHandler;
74 u8 boTimerActive; // Wb: reserved
75 u8 boSave;
77 u32 BScanEnable; // Background scan enable. Default is On
79 } SCAN_PARAMETERS, *psSCAN_PARAMETERS;
81 // Encapsulate 'Adapter' data structure
82 #define psSCAN (&(Adapter->sScanPara))
83 #define psSCANREQ (&(Adapter->sScanPara.sScanReq))
85 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
86 // scan.h
87 // Define the related definitions of scan module
88 // history -- 01/14/03' created
90 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
92 //Define the state of scan module
93 #define SCAN_INACTIVE 0
94 #define WAIT_PROBE_DELAY 1
95 #define WAIT_RESPONSE_MIN 2
96 #define WAIT_RESPONSE_MAX_ACTIVE 3
97 #define WAIT_BEACON_MAX_PASSIVE 4
98 #define SCAN_COMPLETE 5
99 #define BG_SCAN 6
100 #define BG_SCANNING 7
103 // The value will load from EEPROM
104 // If 0xff is set in EEPOM, the driver will use SCAN_MAX_CHNL_TIME instead.
105 // The definition is in WbHal.h
106 // #define SCAN_MAX_CHNL_TIME (50)
110 // static functions
112 //static void ScanTimerHandler(PWB32_ADAPTER Adapter);
113 //static void vScanTimerStart(PWB32_ADAPTER Adapter, int timeout_value);
114 //static void vScanTimerStop(PWB32_ADAPTER Adapter);