]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/staging/winbond/scan_s.h
Staging: w35und: remove timer wrappers
[linux-2.6-omap-h63xx.git] / drivers / staging / winbond / scan_s.h
1 //
2 // SCAN task global CONSTANTS, STRUCTURES, variables
3 //
4
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
14
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
21
22 // Scan Type
23 #define ACTIVE_SCAN                     0
24 #define PASSIVE_SCAN            1
25
26 ///////////////////////////////////////////////////////////////////////////
27 //Global data structures, Initial Scan & Background Scan
28 typedef struct _SCAN_REQ_PARA   //mandatory parameters for SCAN request
29 {
30         u32                             ScanType;                       //passive/active scan
31
32         CHAN_LIST               sChannelList;   // 86B
33         u8                      reserved_1[2];
34
35         struct SSID_Element     sSSID; // 34B. scan only for this SSID
36         u8                      reserved_2[2];
37
38 } SCAN_REQ_PARA, *psSCAN_REQ_PARA;
39
40 typedef struct _SCAN_PARAMETERS
41 {
42         u16                             wState;
43         u16                             iCurrentChannelIndex;
44
45         SCAN_REQ_PARA   sScanReq;
46
47         u8                              BSSID[MAC_ADDR_LENGTH + 2];             //scan only for this BSSID
48
49         u32                             BssType;                                                //scan only for this BSS type
50
51         //struct SSID_Element   sSSID;                                          //scan only for this SSID
52         u16                             ProbeDelay;
53         u16                             MinChannelTime;
54
55         u16                             MaxChannelTime;
56         u16                             reserved_1;
57
58     s32                         iBgScanPeriod;                          // XP: 5 sec
59
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;
64
65         struct timer_list timer;
66
67         u32                             ScanTimeStamp;                  //Increase 1 per background scan(1 minute)
68         u32                             BssTimeStamp;                   //Increase 1 per connect status check
69         u32                             RxNumPerAntenna[2];             //
70
71         u8                              AntennaToggle;                  //
72         u8                              boInTimerHandler;
73         u8                              boTimerActive;                          // Wb: reserved
74         u8                              boSave;
75
76         u32                             BScanEnable; // Background scan enable. Default is On
77
78 } SCAN_PARAMETERS, *psSCAN_PARAMETERS;
79
80 // Encapsulate 'adapter' data structure
81 #define psSCAN                  (&(adapter->sScanPara))
82 #define psSCANREQ                       (&(adapter->sScanPara.sScanReq))
83
84 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
85 //      scan.h
86 //              Define the related definitions of scan module
87 //      history -- 01/14/03' created
88 //
89 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
90
91 //Define the state of scan module
92 #define SCAN_INACTIVE                                           0
93 #define WAIT_PROBE_DELAY                                        1
94 #define WAIT_RESPONSE_MIN                                       2
95 #define WAIT_RESPONSE_MAX_ACTIVE                        3
96 #define WAIT_BEACON_MAX_PASSIVE                         4
97 #define SCAN_COMPLETE                                           5
98 #define BG_SCAN                                                         6
99 #define BG_SCANNING                                                     7
100
101
102 // The value will load from EEPROM
103 // If 0xff is set in EEPOM, the driver will use SCAN_MAX_CHNL_TIME instead.
104 // The definition is in WbHal.h
105 //      #define SCAN_MAX_CHNL_TIME                              (50)
106
107
108
109 // static functions
110
111 //static void ScanTimerHandler(struct wb35_adapter * adapter);
112 //static void vScanTimerStart(struct wb35_adapter *     adapter, int timeout_value);
113 //static void vScanTimerStop(struct wb35_adapter * adapter);
114