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