device.h revision 7c65fa2a4c176c9bfab1ef954c4cef005dd9fb8b
192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond/*
292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * All rights reserved.
492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * This program is free software; you can redistribute it and/or modify
692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * it under the terms of the GNU General Public License as published by
792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * the Free Software Foundation; either version 2 of the License, or
892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * (at your option) any later version.
992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
1092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * This program is distributed in the hope that it will be useful,
1192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * but WITHOUT ANY WARRANTY; without even the implied warranty of
1292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * GNU General Public License for more details.
1492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
1592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * You should have received a copy of the GNU General Public License along
1692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * with this program; if not, write to the Free Software Foundation, Inc.,
1792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
1992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * File: device.h
2092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
2192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * Purpose: MAC Data structure
2292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
2392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * Author: Tevin Chen
2492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
2592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * Date: Mar 17, 1997
2692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond *
2792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond */
2892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
2992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#ifndef __DEVICE_H__
3092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define __DEVICE_H__
3192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
3292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/module.h>
3392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/kernel.h>
3492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/slab.h>
3511d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/init.h>
3611d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/delay.h>
3711d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/device.h>
3811d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/firmware.h>
3911d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/etherdevice.h>
4011d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/suspend.h>
4192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/if_arp.h>
4211d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/wireless.h>
4311d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <net/iw_handler.h>
4411d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <net/cfg80211.h>
4511d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley#include <linux/timer.h>
4692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/usb.h>
4711d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley
4811d404cb56ecd53bb23499897fbe7be1a9ac4827Malcolm Priestley
4992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#ifdef SIOCETHTOOL
5092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define DEVICE_ETHTOOL_IOCTL_SUPPORT
5192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include <linux/ethtool.h>
5292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#else
5392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#undef DEVICE_ETHTOOL_IOCTL_SUPPORT
5492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#endif
5592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
5692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//please copy below macro to driver_event.c for API
5792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_INSMOD_EVENT_FLAG                             0x0101
5892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_UPDEV_EVENT_FLAG                               0x0102
5992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_DISCONNECTED_EVENT_FLAG               0x0103
6092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_WPACONNECTED_EVENT_FLAG             0x0104
6192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_DOWNDEV_EVENT_FLAG                        0x0105
6292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RT_RMMOD_EVENT_FLAG                              0x0106
6392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
6492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
6592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// device specific
6692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
6792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
6892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "device_cfg.h"
6992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "ttype.h"
7092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "80211hdr.h"
7192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "tether.h"
7292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "wmgr.h"
7392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "wcmd.h"
7492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "mib.h"
7592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "srom.h"
7692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "rc4.h"
7792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "desc.h"
7892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "key.h"
7992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#include "card.h"
8092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
8192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond/*---------------------  Export Definitions -------------------------*/
825008c456c1cdcb8ef7265dcb6d20317f54d3e8eeOtavio Salvador#define VNT_USB_VENDOR_ID                     0x160a
8392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define VNT_USB_PRODUCT_ID                    0x3184
8492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
8592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAC_MAX_CONTEXT_REG     (256+128)
8692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
8792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAX_MULTICAST_ADDRESS_NUM       32
889a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More#define MULTICAST_ADDRESS_LIST_SIZE     (MAX_MULTICAST_ADDRESS_NUM * ETH_ALEN)
8992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
9092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define DUPLICATE_RX_CACHE_LENGTH       5
9192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
9292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define NUM_KEY_ENTRY                   11
9392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
9492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_NONE                     0
9592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_OTF                      1
9692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_SW                       2
9792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_SWOTP                    3
9892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_OTPSW                    4
9992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_WEP_SW232                    5
10092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
10192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define KEYSEL_WEP40                    0
10292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define KEYSEL_WEP104                   1
10392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define KEYSEL_TKIP                     2
10492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define KEYSEL_CCMP                     3
10592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
10692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define AUTO_FB_NONE            0
10792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define AUTO_FB_0               1
10892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define AUTO_FB_1               2
10992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
11092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define FB_RATE0                0
11192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define FB_RATE1                1
11292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
11392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// Antenna Mode
11492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_A                   0
11592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_B                   1
11692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_DIVERSITY           2
11792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_RXD_TXA             3
11892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_RXD_TXB             4
11992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_UNKNOWN             0xFF
12092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_TXA                 0
12192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_TXB                 1
12292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_RXA                 2
12392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ANT_RXB                 3
12492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
12592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
12692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAXCHECKHANGCNT         4
12792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
12892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//Packet type
12992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_PKT_UNI              0x00
13092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_PKT_MULTI            0x01
13192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define TX_PKT_BROAD            0x02
13292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
13392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define BB_VGA_LEVEL            4
13492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define BB_VGA_CHANGE_THRESHOLD 3
13592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
13692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#ifndef RUN_AT
13792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RUN_AT(x)                       (jiffies+(x))
13892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#endif
13992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
14092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// DMA related
14192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define RESERV_AC0DMA                   4
14292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
14392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define PRIVATE_Message                 0
14492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
14592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond/*---------------------  Export Types  ------------------------------*/
14692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
147d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More#define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
148d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); }
14992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
15092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum __device_msg_level {
151d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	MSG_LEVEL_ERR = 0,            /* Errors causing abnormal operation */
152d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	MSG_LEVEL_NOTICE = 1,         /* Errors needing user notification */
153d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	MSG_LEVEL_INFO = 2,           /* Normal message. */
154d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	MSG_LEVEL_VERBOSE = 3,        /* Will report all trival errors. */
155d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	MSG_LEVEL_DEBUG = 4           /* Only for debug purpose. */
15692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
15792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
15892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum __device_init_type {
159d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	DEVICE_INIT_COLD = 0,       /* cold init */
160d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	DEVICE_INIT_RESET,          /* reset init or Dx to D0 power remain */
161d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More	DEVICE_INIT_DXPL            /* Dx to D0 power lost init */
16292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} DEVICE_INIT_TYPE, *PDEVICE_INIT_TYPE;
16392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
16492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//USB
16592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
16692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
16792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// Enum of context types for SendPacket
16892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
16992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum _CONTEXT_TYPE {
17092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CONTEXT_DATA_PACKET = 1,
17192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CONTEXT_MGMT_PACKET
17292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} CONTEXT_TYPE;
17392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
17492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// RCB (Receive Control Block)
17592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct _RCB
17692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
1778611a29ab967bc197494db19d31994d1b5a26fdcAndres More    void *Next;
178213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More    signed long                    Ref;
1798611a29ab967bc197494db19d31994d1b5a26fdcAndres More    void *pDevice;
18092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct urb              *pUrb;
18192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SRxMgmtPacket           sMngPacket;
18292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct sk_buff*         skb;
18392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bBoolInUse;
18492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
18592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} RCB, *PRCB;
18692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
18792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// used to track bulk out irps
18892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct _USB_SEND_CONTEXT {
1898611a29ab967bc197494db19d31994d1b5a26fdcAndres More    void *pDevice;
19092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct sk_buff *pPacket;
19192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct urb      *pUrb;
192cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int            uBufLen;
19392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CONTEXT_TYPE    Type;
19492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SEthernetHeader sEthHeader;
1958611a29ab967bc197494db19d31994d1b5a26fdcAndres More    void *Next;
19692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL            bBoolInUse;
197cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned char           Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
19892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT;
19992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
200213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More/* structure got from configuration file as user-desired default settings */
201213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres Moretypedef struct _DEFAULT_CONFIG {
202213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    ZoneType;
203213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    eConfigMode;
204213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    eAuthenMode;        /* open/wep/wpa */
205213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    bShareKeyAlgorithm; /* open-open/{open,wep}-sharekey */
206213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    keyidx;             /* wepkey index */
207213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More	signed int    eEncryptionStatus;
208213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More} DEFAULT_CONFIG, *PDEFAULT_CONFIG;
20992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
21092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
21192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// Structure to keep track of usb interrupt packets
21292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//
21392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct {
214cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int            uDataLen;
21592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PBYTE           pDataBuf;
21692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//    struct urb      *pUrb;
21792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL            bInUse;
21892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} INT_BUFFER, *PINT_BUFFER;
21992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
22092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//0:11A 1:11B 2:11G
22192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum _VIA_BB_TYPE
22292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
223d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More    BB_TYPE_11A = 0,
22492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BB_TYPE_11B,
22592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BB_TYPE_11G
22692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} VIA_BB_TYPE, *PVIA_BB_TYPE;
22792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
22892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate)
22992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum _VIA_PKT_TYPE
23092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
231d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More    PK_TYPE_11A = 0,
23292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PK_TYPE_11B,
23392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PK_TYPE_11GB,
23492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PK_TYPE_11GA
23592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} VIA_PKT_TYPE, *PVIA_PKT_TYPE;
23692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
23792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//++ NDIS related
23892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
23992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum __DEVICE_NDIS_STATUS {
240d9d1ccb51f60cc211e0aa8d132bc3487053b2b1dAndres More    STATUS_SUCCESS = 0,
24192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    STATUS_FAILURE,
24292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    STATUS_RESOURCES,
24392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    STATUS_PENDING,
24492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
24592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
24692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAX_BSSIDINFO_4_PMKID   16
24792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAX_PMKIDLIST           5
24892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//Flags for PMKID Candidate list structure
24992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED	0x01
25092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
25192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// PMKID Structures
252cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres Moretypedef unsigned char   NDIS_802_11_PMKID_VALUE[16];
25392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
25492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
25592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum _NDIS_802_11_WEP_STATUS
25692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
25792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11WEPEnabled,
25892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
25992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11WEPDisabled,
26092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
26192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11WEPKeyAbsent,
26292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
26392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11WEPNotSupported,
26492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
26592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption2Enabled,
26692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption2KeyAbsent,
26792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption3Enabled,
26892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11Encryption3KeyAbsent
26992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
27092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond  NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
27192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
27292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
27392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef enum _NDIS_802_11_STATUS_TYPE
27492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
27592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11StatusType_Authentication,
27692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11StatusType_MediaStreamMode,
27792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11StatusType_PMKID_CandidateList,
27892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Ndis802_11StatusTypeMax    // not a real type, defined as an upper bound
27992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
28092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
28192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//Added new types for PMKID Candidate lists.
28292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct _PMKID_CANDIDATE {
28392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_MAC_ADDRESS BSSID;
284cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long Flags;
28592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
28692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
28792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
28892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct _BSSID_INFO
28992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
29092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_MAC_ADDRESS BSSID;
29192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_PMKID_VALUE PMKID;
29292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} BSSID_INFO, *PBSSID_INFO;
29392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
29492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSPMKID {
295cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long Length;
296cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long BSSIDInfoCount;
29792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID];
29892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} SPMKID, *PSPMKID;
29992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
30092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSPMKIDCandidateEvent {
30192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_STATUS_TYPE     StatusType;
302cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned long Version;       /* Version of the structure */
303cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned long NumCandidates; /* No. of pmkid candidates */
30492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
305193a823caaf0e2a79a447014be00a6b70ed216a2Jim Lieb} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
30692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
30792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//--
30892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
30992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//++ 802.11h related
31092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MAX_QUIET_COUNT     8
31192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
31292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSQuietControl {
31392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL        bEnable;
31492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD       dwStartTime;
31592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE        byPeriod;
31692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD        wDuration;
317193a823caaf0e2a79a447014be00a6b70ed216a2Jim Lieb} SQuietControl, *PSQuietControl;
31892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
31992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//--
32092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
32192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
32292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// The receive duplicate detection cache entry
32392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSCacheEntry{
32492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD        wFmSequence;
3259a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE        abyAddr2[ETH_ALEN];
32692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD        wFrameCtl;
32792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} SCacheEntry, *PSCacheEntry;
32892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
32992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSCache{
33092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond/* The receive cache is updated circularly.  The next entry to be written is
33192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond * indexed by the "InPtr".
33292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond*/
333cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uInPtr; /* Place to use next */
33492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SCacheEntry     asCacheEntry[DUPLICATE_RX_CACHE_LENGTH];
33592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} SCache, *PSCache;
33692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
33792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define CB_MAX_RX_FRAG                 64
33892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// DeFragment Control Block, used for collecting fragments prior to reassembly
33992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct tagSDeFragControlBlock
34092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{
34192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD            wSequence;
34292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD            wFragNum;
3439a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE            abyAddr2[ETH_ALEN];
344cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int            uLifetime;
34592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct sk_buff* skb;
34692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PBYTE           pbyRxBuffer;
347cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int            cbFrameLength;
34892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL            bInUse;
349193a823caaf0e2a79a447014be00a6b70ed216a2Jim Lieb} SDeFragControlBlock, *PSDeFragControlBlock;
35092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
35192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
35292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
35392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//flags for options
35492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_UNPLUG          0x00000001UL
35592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_PREAMBLE_TYPE   0x00000002UL
35692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_OP_MODE         0x00000004UL
35792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_PS_MODE         0x00000008UL
35892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define		DEVICE_FLAGS_80211h_MODE	 0x00000010UL
35992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
36092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//flags for driver status
36192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_OPENED          0x00010000UL
36292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_WOL_ENABLED     0x00080000UL
36392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//flags for capbilities
36492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_TX_ALIGN        0x01000000UL
36592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_HAVE_CAM        0x02000000UL
36692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FLAGS_FLOW_CTRL       0x04000000UL
36792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
36892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//flags for MII status
36992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_LINK_FAIL             0x00000001UL
37092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_SPEED_10              0x00000002UL
37192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_SPEED_100             0x00000004UL
37292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_SPEED_1000            0x00000008UL
37392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_DUPLEX_FULL           0x00000010UL
37492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_AUTONEG_ENABLE        0x00000020UL
37592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_FORCED_BY_EEPROM      0x00000040UL
37692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//for device_set_media_duplex
37792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define     DEVICE_LINK_CHANGE           0x00000001UL
37892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
37992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
38092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct __device_opt {
38192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         nRxDescs0;    //Number of RX descriptors0
38292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         nTxDescs0;    //Number of TX descriptors 0, 1, 2, 3
38392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         rts_thresh;   //rts threshold
38492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         frag_thresh;
38592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         OpMode;
38692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         data_rate;
38792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         channel_num;
38892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         short_retry;
38992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         long_retry;
39092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int         bbp_type;
391659770d4033373340bc24fc125d1f3ba215e4669Andres More    u32         flags;
39292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} OPTIONS, *POPTIONS;
39392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
39492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
39592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bondtypedef struct __device_info {
39692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
39792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond// netdev
39892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct usb_device*          usb;
39992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct net_device*          dev;
40092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct net_device_stats     stats;
40192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
40231d5bbf3da8c3c9de5944f2c09cbc7ea5a72bdb4Ben Hutchings
40392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    OPTIONS                     sOpts;
40492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
40592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct tasklet_struct       CmdWorkItem;
40692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct tasklet_struct       EventWorkItem;
40792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct tasklet_struct       ReadWorkItem;
40892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct tasklet_struct       RxMngWorkItem;
40992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
410659770d4033373340bc24fc125d1f3ba215e4669Andres More    u32                         rx_buf_sz;
41192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    int                         multicast_limit;
41292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRxMode;
41392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
41492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    spinlock_t                  lock;
41592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
416659770d4033373340bc24fc125d1f3ba215e4669Andres More    u32                         rx_bytes;
41792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
41892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRevId;
41992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
420659770d4033373340bc24fc125d1f3ba215e4669Andres More    u32                         flags;
421cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       Flags;
42292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
42392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SCache                      sDupRxCache;
42492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
42592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SDeFragControlBlock         sRxDFCB[CB_MAX_RX_FRAG];
426cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        cbDFCB;
427cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        cbFreeDFCB;
428cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        uCurrentDFCBIdx;
42992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
43092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // +++USB
43192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
43292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct urb                  *pControlURB;
43392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct urb                  *pInterruptURB;
43492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct usb_ctrlrequest      sUsbCtlRequest;
43592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
436cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        int_interval;
43792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
43892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Variables to track resources for the BULK In Pipe
43992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
44092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        pRCBMem;
44192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        apRCB[CB_MAX_RX_DESC];
442cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        cbRD;
44392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        FirstRecvFreeList;
44492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        LastRecvFreeList;
445cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        NumRecvFreeList;
44692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        FirstRecvMngList;
44792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB                        LastRecvMngList;
448cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        NumRecvMngList;
44992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bIsRxWorkItemQueued;
45092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bIsRxMngWorkItemQueued;
451cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned long ulRcvRefCount; /* packets that have not returned back */
45292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
45392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
45492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //  Variables to track resources for the BULK Out Pipe
45592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
45692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
45792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PUSB_SEND_CONTEXT           apTD[CB_MAX_TX_DESC];
458cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        cbTD;
45992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
46092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
461a0a1f61afa1ff8edda4ad69f37fdd69fdb7d0453Justin P. Mattock    //  Variables to track resources for the Interrupt In Pipe
46292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
46392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    INT_BUFFER                  intBuf;
46492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        fKillEventPollingThread;
46592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bEventAvailable;
46692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
46792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
46892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond  //default config from file by user setting
46992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DEFAULT_CONFIG    config_file;
47092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
47192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
47292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
47392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Statistic for USB
47492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // protect with spinlock
475cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkInPosted;
476cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkInError;
477cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkInContCRCError;
478cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkInBytesRead;
47992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
480cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkOutPosted;
481cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkOutError;
482cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkOutContCRCError;
483cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulBulkOutBytesWrite;
48492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
485cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulIntInPosted;
486cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulIntInError;
487cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulIntInContCRCError;
488cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulIntInBytesRead;
48992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
49092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
49192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Version control
49292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wFirmwareVersion;
49392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byLocalID;
49492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRFType;
49592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byBBRxConf;
49692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
49792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
49892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byZoneType;
49992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bZoneRegExist;
50092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
50192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byOriginalZonetype;
50292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
50392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bLinkPass;          // link status: OK or fail
5049a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                        abyCurrentNetAddr[ETH_ALEN];
5059a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                        abyPermanentNetAddr[ETH_ALEN];
50692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // SW network address
5079a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More	/* u8 abySoftwareNetAddr[ETH_ALEN]; */
50892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bExistSWNetAddr;
50992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
51092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Adapter statistics
51192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SStatCounter                scStatistic;
51292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // 802.11 counter
51392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SDot11Counters              s802_11Counter;
51492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
51592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
51692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Maintain statistical debug info.
51792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //
518cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       packetsReceived;
519cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       packetsReceivedDropped;
520cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       packetsReceivedOverflow;
521cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       packetsSent;
522cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       packetsSentDropped;
523cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       SendContextsInUse;
524cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       RcvBuffersInUse;
52592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
52692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
52792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // 802.11 management
52892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SMgmtObject                 sMgmtObj;
52992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
5307c65fa2a4c176c9bfab1ef954c4cef005dd9fb8bMalcolm Priestley	u64 qwCurrTSF;
531cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        cbBulkInMax;
53292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bPSRxBeacon;
53392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
53492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // 802.11 MAC specific
535cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        uCurrRSSI;
53692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byCurrSQ;
53792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
53892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
53992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //Antenna Diversity
54092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bTxRxAntInv;
54192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwRxAntennaSel;
54292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwTxAntennaSel;
54392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byAntennaCount;
54492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRxAntennaMode;
54592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTxAntennaMode;
54692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRadioCtl;
54792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        bHWRadioOff;
54892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
54992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //SQ3 functions for antenna diversity
55092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct timer_list           TimerSQ3Tmax1;
55192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct timer_list           TimerSQ3Tmax2;
55292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct timer_list           TimerSQ3Tmax3;
55392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
55492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bDiversityRegCtlON;
55592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bDiversityEnable;
556cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulDiversityNValue;
557cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulDiversityMValue;
55892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTMax;
55992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTMax2;
56092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTMax3;
561cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulSQ3TH;
56292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
563cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       uDiversityCnt;
56492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byAntennaState;
565cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulRatio_State0;
566cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulRatio_State1;
567cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulSQ3_State0;
568cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulSQ3_State1;
569cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More
570cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       aulSQ3Val[MAX_RATE];
571cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       aulPktNum[MAX_RATE];
572cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More
573cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	/* IFS & Cw */
574cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uSIFS;  /* Current SIFS */
575cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uDIFS;  /* Current DIFS */
576cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uEIFS;  /* Current EIFS */
577cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uSlot;  /* Current SlotTime */
578cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uCwMin; /* Current CwMin */
579cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More	unsigned int uCwMax; /* CwMax is fixed on 1023 */
580cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More
58192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // PHY parameter
58292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        bySIFS;
58392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byDIFS;
58492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byEIFS;
58592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        bySlot;
58692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byCWMaxMin;
58792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
58892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Rate
58992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    VIA_BB_TYPE                 byBBType; //0: 11A, 1:11B, 2:11G
59092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    VIA_PKT_TYPE                byPacketType; //0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate)
59192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wBasicRate;
59292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byACKRate;
59392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTopOFDMBasicRate;
59492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byTopCCKBasicRate;
59592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
59692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
59792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwAotoRateTxOkCnt;
59892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwAotoRateTxFailCnt;
59992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwErrorRateThreshold[13];
60092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwTPTable[MAX_RATE];
60192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        abyEEPROM[EEP_MAX_CONTEXT_SIZE];  //DWORD alignment
60292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
60392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byMinChannel;
60492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byMaxChannel;
605cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                        uConnectionRate;
60692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
60792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byPreambleType;
60892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byShortPreamble;
60992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // CARD_PHY_TYPE
61092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        eConfigPHYMode;
61192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
61292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // For RF Power table
61392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byCCKPwr;
61492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byOFDMPwrG;
61592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byOFDMPwrA;
61692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byCurPwr;
61792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        abyCCKPwrTbl[14];
61892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        abyOFDMPwrTbl[14];
61992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        abyOFDMAPwrTbl[42];
62092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
62192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wCurrentRate;
62292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wRTSThreshold;
62392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wFragmentationThreshold;
62492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byShortRetryLimit;
62592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byLongRetryLimit;
62692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CARD_OP_MODE                eOPMode;
62792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bBSSIDFilter;
62892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wMaxTransmitMSDULifetime;
6299a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                        abyBSSID[ETH_ALEN];
6309a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                        abyDesireBSSID[ETH_ALEN];
63192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wCTSDuration;       // update while speed change
63292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wACKDuration;       // update while speed change
63392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wRTSTransmitLen;    // update while speed change
63492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRTSServiceField;  // update while speed change
63592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byRTSSignalField;   // update while speed change
63692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
63792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                       dwMaxReceiveLifetime;       // dot11MaxReceiveLifetime
63892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
63992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bCCK;
64092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bEncryptionEnable;
64192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bLongHeader;
64292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bSoftwareGenCrcErr;
64392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bShortSlotTime;
64492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bProtectMode;
64592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bNonERPPresent;
64692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bBarkerPreambleMd;
64792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
64892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                        byERPFlag;
64992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wUseProtectCntDown;
65092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
65192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bRadioControlOff;
65292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bRadioOff;
65392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
65492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Power save
65592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bEnablePSMode;
65692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                        wListenInterval;
65792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bPWBitOn;
65892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WMAC_POWER_MODE             ePSMode;
659cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                       ulPSModeWaitTx;
66092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                        bPSModeTxBurst;
66192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
66292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Beacon releated
66392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    WORD                    wSeqCounter;
66492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bBeaconBufReady;
66592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bBeaconSent;
66692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bFixRate;
66792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byCurrentCh;
668cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uScanTime;
66992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
67092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CMD_STATE               eCommandState;
67192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
67292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CMD_CODE                eCommand;
67392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bBeaconTx;
67492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byScanBBType;
67592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
67692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bStopBeacon;
67792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bStopDataPkt;
67892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bStopTx0Pkt;
679cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uAutoReConnectTime;
680cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uIsroamingTime;
68192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
68292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // 802.11 counter
68392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
68492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    CMD_ITEM                eCmdQueue[CMD_Q_SIZE];
685cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uCmdDequeueIdx;
686cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uCmdEnqueueIdx;
687cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    cbFreeCmdQueue;
68892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bCmdRunning;
68992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bCmdClear;
69092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bNeedRadioOFF;
69192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
692465711b39d2fb326c5be27a4f69f70b2a41612cfAndres More    BOOL                    bEnableRoaming;
693465711b39d2fb326c5be27a4f69f70b2a41612cfAndres More    BOOL                    bIsRoaming;
694465711b39d2fb326c5be27a4f69f70b2a41612cfAndres More    BOOL                    bFastRoaming;
695465711b39d2fb326c5be27a4f69f70b2a41612cfAndres More    BYTE                    bSameBSSMaxNum;
696465711b39d2fb326c5be27a4f69f70b2a41612cfAndres More    BYTE                    bSameBSSCurNum;
69792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bRoaming;
69892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    b11hEable;
699cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned long                   ulTxPower;
70092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
70192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Encryption
70292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_WEP_STATUS  eEncryptionStatus;
70392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bTransmitKey;
70492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
70592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond//mike add :save old Encryption
70692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    NDIS_802_11_WEP_STATUS  eOldEncryptionStatus;
70792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
70892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SKeyManagement          sKey;
70992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                   dwIVCounter;
71092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
71192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
71292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    RC4Ext                  SBox;
71392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    abyPRNG[WLAN_WEPMAX_KEYLEN+3];
71492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byKeyIndex;
71592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
71692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bAES;
71792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
718cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uKeyLength;
71992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    abyKey[WLAN_WEP232_KEYLEN];
72092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
72192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // for AP mode
722cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uAssocCount;
72392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bMoreData;
72492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
72592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // QoS
72692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bGrpAckPolicy;
72792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
72892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
72992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byAutoFBCtrl;
73092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
73192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bTxMICFail;
73292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bRxMICFail;
73392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
73492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
73592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // For Update BaseBand VGA Gain Offset
73692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bUpdateBBVGA;
737cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uBBVGADiffCount;
73892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBVGANew;
73992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBVGACurrent;
74092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    abyBBVGA[BB_VGA_LEVEL];
741213d2e9322ed509c2f80b07d7feb4427ebcd7b0bAndres More    signed long                    ldBmThreshold[BB_VGA_LEVEL];
74292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
74392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBPreEDRSSI;
74492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBPreEDIndex;
74592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
74692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
74792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bRadioCmd;
74892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    DWORD                   dwDiagRefCount;
74992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
75092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // For FOE Tuning
75192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byFOETuning;
75292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
75392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // For Auto Power Tunning
75492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
75592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byAutoPwrTunning;
75692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
75792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // BaseBand Loopback Use
75892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBCR4d;
75992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBCRc9;
76092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBCR88;
76192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byBBCR09;
76292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
76392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // command timer
76492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    struct timer_list       sTimerCommand;
76592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
76692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond     struct timer_list       sTimerTxData;
767cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More     unsigned long                       nTxDataTimeCout;
76892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond     BOOL  fTxDataInSleep;
76992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond     BOOL  IsTxDataTrigger;
77092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
77192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL  fWPA_Authened;           //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
77292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE            byReAssocCount;   //mike add:re-association retry times!
77392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE            byLinkWaitCount;
77492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
77592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SEthernetHeader         sTxEthHeader;
77692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SEthernetHeader         sRxEthHeader;
7779a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                    abyBroadcastAddr[ETH_ALEN];
7789a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                    abySNAP_RFC1042[ETH_ALEN];
7799a0e756c5280750c23bd44d2b855a1f5442ea7b4Andres More    BYTE                    abySNAP_Bridgetunnel[ETH_ALEN];
78092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
78192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // Pre-Authentication & PMK cache
78292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SPMKID                  gsPMKID;
78392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    SPMKIDCandidateEvent    gsPMKIDCandidate;
78492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
78592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
78692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // for 802.11h
78792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    b11hEnable;
78892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
78992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bChannelSwitch;
79092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byNewChannel;
79192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BYTE                    byChannelSwitchCount;
79292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
79392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //WPA supplicant daemon
79492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct net_device       *wpadev;
79592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	BOOL                    bWPADEVUp;
79692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    //--
79792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
79892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        BOOL                 bwextstep0;
79992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        BOOL                 bwextstep1;
80092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        BOOL                 bwextstep2;
80192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        BOOL                 bwextstep3;
80292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        BOOL                 bWPASuppWextEnabled;
80392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
80492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#ifdef HOSTAP
80592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    // user space daemon: hostapd, is used for HOSTAP
80692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	BOOL                    bEnableHostapd;
80792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	BOOL                    bEnable8021x;
80892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	BOOL                    bEnableHostWEP;
80992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct net_device       *apdev;
81092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	int (*tx_80211)(struct sk_buff *skb, struct net_device *dev);
81192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#endif
812cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More    unsigned int                    uChannel;
81392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
81492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond	struct iw_statistics	wstats;		// wireless stats
81592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    BOOL                    bCommit;
81692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
81792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond} DEVICE_INFO, *PSDevice;
81892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
81992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
82092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
82192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
82292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define EnqueueRCB(_Head, _Tail, _RCB)                  \
82392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{                                                       \
82492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    if (!_Head) {                                       \
82592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        _Head = _RCB;                                   \
82692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    }                                                   \
82792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    else {                                              \
82892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        _Tail->Next = _RCB;                             \
82992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    }                                                   \
83092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    _RCB->Next = NULL;                                  \
83192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    _Tail = _RCB;                                       \
83292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond}
83392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
83492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define DequeueRCB(Head, Tail)                          \
83592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond{                                                       \
83692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    PRCB   RCB = Head;                                  \
83792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    if (!RCB->Next) {                                   \
83892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        Tail = NULL;                                    \
83992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    }                                                   \
84092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    Head = RCB->Next;                                   \
84192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond}
84292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
84392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
84492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
84592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    if ((uVar) >= ((uModulo) - 1))                  \
84692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        (uVar) = 0;                                 \
84792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond    else                                            \
84892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond        (uVar)++;                                   \
84992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond}
85092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
85192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
85292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_RESET_IN_PROGRESS               0x00000001
85392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_DISCONNECTED                    0x00000002
85492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_HALT_IN_PROGRESS                0x00000004
85592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_SURPRISE_REMOVED                0x00000008
85692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_RECV_LOOKASIDE                  0x00000010
85792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_INIT_IN_PROGRESS                0x00000020
85892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_SEND_SIDE_RESOURCE_ALLOCATED    0x00000040
85992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_RECV_SIDE_RESOURCE_ALLOCATED    0x00000080
86092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_POST_READS                      0x00000100
86192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_POST_WRITES                     0x00000200
86292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_CONTROL_READS                   0x00000400
86392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define fMP_CONTROL_WRITES                  0x00000800
86492b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
86592b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MP_SET_FLAG(_M, _F)             ((_M)->Flags |= (_F))
86692b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MP_CLEAR_FLAG(_M, _F)            ((_M)->Flags &= ~(_F))
86792b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MP_TEST_FLAGS(_M, _F)            (((_M)->Flags & (_F)) == (_F))
86892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
86992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#define MP_IS_READY(_M)        (((_M)->Flags & \
87092b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond                                 (fMP_DISCONNECTED | fMP_RESET_IN_PROGRESS | fMP_HALT_IN_PROGRESS | fMP_INIT_IN_PROGRESS | fMP_SURPRISE_REMOVED)) == 0)
87192b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
87292b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond/*---------------------  Export Functions  --------------------------*/
87392b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
874cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More/* BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb,
875cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More *                       unsigned int uNodeIndex);
876cc856e61ee4ffb150ff352e3d6940978a2f819e8Andres More */
87792b96797118e5836294a6d42a5a8e10b86f50e3fForest BondBOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF);
87892b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond
87992b96797118e5836294a6d42a5a8e10b86f50e3fForest Bond#endif
880