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