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