2 // SCAN task global CONSTANTS, STRUCTURES, variables
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
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
35 struct SSID_Element sSSID; // 34B. scan only for this SSID
38 } SCAN_REQ_PARA, *psSCAN_REQ_PARA;
40 typedef struct _SCAN_PARAMETERS
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
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
65 //NDIS_MINIPORT_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]; //
74 u8 boTimerActive; // Wb: reserved
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 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
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)
112 //static void ScanTimerHandler(PWB32_ADAPTER Adapter);
113 //static void vScanTimerStart(PWB32_ADAPTER Adapter, int timeout_value);
114 //static void vScanTimerStop(PWB32_ADAPTER Adapter);