staging: vt6656: cleanup struct vnt_private

Where appropriate replacing types defined in "type.h" with
linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2013-01-17 23:21:50 +00:00 committed by Greg Kroah-Hartman
parent 14c5ef5771
commit 61462ab32f

View file

@ -393,426 +393,403 @@ typedef struct __device_opt {
struct vnt_private { struct vnt_private {
/* netdev */
struct usb_device *usb;
struct net_device *dev;
struct net_device_stats stats;
// netdev OPTIONS sOpts;
struct usb_device* usb;
struct net_device* dev; struct tasklet_struct CmdWorkItem;
struct net_device_stats stats; struct tasklet_struct EventWorkItem;
struct tasklet_struct ReadWorkItem;
struct tasklet_struct RxMngWorkItem;
u32 rx_buf_sz;
int multicast_limit;
u8 byRxMode;
spinlock_t lock;
u32 rx_bytes;
u8 byRevId;
u32 flags;
unsigned long Flags;
SCache sDupRxCache;
SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
u32 cbDFCB;
u32 cbFreeDFCB;
u32 uCurrentDFCBIdx;
OPTIONS sOpts; /* USB */
struct urb *pControlURB;
struct urb *pInterruptURB;
struct usb_ctrlrequest sUsbCtlRequest;
u32 int_interval;
struct tasklet_struct CmdWorkItem; /* Variables to track resources for the BULK In Pipe */
struct tasklet_struct EventWorkItem; PRCB pRCBMem;
struct tasklet_struct ReadWorkItem; PRCB apRCB[CB_MAX_RX_DESC];
struct tasklet_struct RxMngWorkItem; u32 cbRD;
PRCB FirstRecvFreeList;
u32 rx_buf_sz; PRCB LastRecvFreeList;
int multicast_limit; u32 NumRecvFreeList;
BYTE byRxMode; PRCB FirstRecvMngList;
PRCB LastRecvMngList;
spinlock_t lock; u32 NumRecvMngList;
int bIsRxWorkItemQueued;
u32 rx_bytes; int bIsRxMngWorkItemQueued;
BYTE byRevId;
u32 flags;
unsigned long Flags;
SCache sDupRxCache;
SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
unsigned int cbDFCB;
unsigned int cbFreeDFCB;
unsigned int uCurrentDFCBIdx;
// +++USB
struct urb *pControlURB;
struct urb *pInterruptURB;
struct usb_ctrlrequest sUsbCtlRequest;
unsigned int int_interval;
//
// Variables to track resources for the BULK In Pipe
//
PRCB pRCBMem;
PRCB apRCB[CB_MAX_RX_DESC];
unsigned int cbRD;
PRCB FirstRecvFreeList;
PRCB LastRecvFreeList;
unsigned int NumRecvFreeList;
PRCB FirstRecvMngList;
PRCB LastRecvMngList;
unsigned int NumRecvMngList;
BOOL bIsRxWorkItemQueued;
BOOL bIsRxMngWorkItemQueued;
unsigned long ulRcvRefCount; /* packets that have not returned back */ unsigned long ulRcvRefCount; /* packets that have not returned back */
// /* Variables to track resources for the BULK Out Pipe */
// Variables to track resources for the BULK Out Pipe PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC];
// u32 cbTD;
PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC]; /* Variables to track resources for the Interrupt In Pipe */
unsigned int cbTD; INT_BUFFER intBuf;
int fKillEventPollingThread;
int bEventAvailable;
// /* default config from file by user setting */
// Variables to track resources for the Interrupt In Pipe DEFAULT_CONFIG config_file;
//
INT_BUFFER intBuf;
BOOL fKillEventPollingThread;
BOOL bEventAvailable;
//default config from file by user setting /* Statistic for USB */
DEFAULT_CONFIG config_file; unsigned long ulBulkInPosted;
unsigned long ulBulkInError;
unsigned long ulBulkInContCRCError;
unsigned long ulBulkInBytesRead;
unsigned long ulBulkOutPosted;
unsigned long ulBulkOutError;
unsigned long ulBulkOutContCRCError;
unsigned long ulBulkOutBytesWrite;
unsigned long ulIntInPosted;
unsigned long ulIntInError;
unsigned long ulIntInContCRCError;
unsigned long ulIntInBytesRead;
// /* Version control */
// Statistic for USB u16 wFirmwareVersion;
// protect with spinlock u8 byLocalID;
unsigned long ulBulkInPosted; u8 byRFType;
unsigned long ulBulkInError; u8 byBBRxConf;
unsigned long ulBulkInContCRCError;
unsigned long ulBulkInBytesRead;
unsigned long ulBulkOutPosted;
unsigned long ulBulkOutError;
unsigned long ulBulkOutContCRCError;
unsigned long ulBulkOutBytesWrite;
unsigned long ulIntInPosted;
unsigned long ulIntInError;
unsigned long ulIntInContCRCError;
unsigned long ulIntInBytesRead;
// Version control u8 byZoneType;
WORD wFirmwareVersion; int bZoneRegExist;
BYTE byLocalID;
BYTE byRFType;
BYTE byBBRxConf;
u8 byOriginalZonetype;
BYTE byZoneType; int bLinkPass; /* link status: OK or fail */
BOOL bZoneRegExist; u8 abyCurrentNetAddr[ETH_ALEN];
u8 abyPermanentNetAddr[ETH_ALEN];
BYTE byOriginalZonetype; int bExistSWNetAddr;
BOOL bLinkPass; // link status: OK or fail /* Adapter statistics */
BYTE abyCurrentNetAddr[ETH_ALEN]; SStatCounter scStatistic;
BYTE abyPermanentNetAddr[ETH_ALEN]; /* 802.11 counter */
// SW network address SDot11Counters s802_11Counter;
/* u8 abySoftwareNetAddr[ETH_ALEN]; */
BOOL bExistSWNetAddr;
// Adapter statistics
SStatCounter scStatistic;
// 802.11 counter
SDot11Counters s802_11Counter;
//
// Maintain statistical debug info.
//
unsigned long packetsReceived;
unsigned long packetsReceivedDropped;
unsigned long packetsReceivedOverflow;
unsigned long packetsSent;
unsigned long packetsSentDropped;
unsigned long SendContextsInUse;
unsigned long RcvBuffersInUse;
/* Maintain statistical debug info. */
unsigned long packetsReceived;
unsigned long packetsReceivedDropped;
unsigned long packetsReceivedOverflow;
unsigned long packetsSent;
unsigned long packetsSentDropped;
unsigned long SendContextsInUse;
unsigned long RcvBuffersInUse;
/* 802.11 management */ /* 802.11 management */
struct vnt_manager vnt_mgmt; struct vnt_manager vnt_mgmt;
u64 qwCurrTSF; u64 qwCurrTSF;
unsigned int cbBulkInMax; u32 cbBulkInMax;
BOOL bPSRxBeacon; int bPSRxBeacon;
// 802.11 MAC specific /* 802.11 MAC specific */
unsigned int uCurrRSSI; u32 uCurrRSSI;
BYTE byCurrSQ; u8 byCurrSQ;
/* Antenna Diversity */
int bTxRxAntInv;
u32 dwRxAntennaSel;
u32 dwTxAntennaSel;
u8 byAntennaCount;
u8 byRxAntennaMode;
u8 byTxAntennaMode;
u8 byRadioCtl;
u8 bHWRadioOff;
//Antenna Diversity /* SQ3 functions for antenna diversity */
BOOL bTxRxAntInv; struct timer_list TimerSQ3Tmax1;
DWORD dwRxAntennaSel; struct timer_list TimerSQ3Tmax2;
DWORD dwTxAntennaSel; struct timer_list TimerSQ3Tmax3;
BYTE byAntennaCount;
BYTE byRxAntennaMode;
BYTE byTxAntennaMode;
BYTE byRadioCtl;
BYTE bHWRadioOff;
//SQ3 functions for antenna diversity int bDiversityRegCtlON;
struct timer_list TimerSQ3Tmax1; int bDiversityEnable;
struct timer_list TimerSQ3Tmax2; unsigned long ulDiversityNValue;
struct timer_list TimerSQ3Tmax3; unsigned long ulDiversityMValue;
u8 byTMax;
u8 byTMax2;
u8 byTMax3;
unsigned long ulSQ3TH;
BOOL bDiversityRegCtlON; unsigned long uDiversityCnt;
BOOL bDiversityEnable; u8 byAntennaState;
unsigned long ulDiversityNValue; unsigned long ulRatio_State0;
unsigned long ulDiversityMValue; unsigned long ulRatio_State1;
BYTE byTMax; unsigned long ulSQ3_State0;
BYTE byTMax2; unsigned long ulSQ3_State1;
BYTE byTMax3;
unsigned long ulSQ3TH;
unsigned long uDiversityCnt; unsigned long aulSQ3Val[MAX_RATE];
BYTE byAntennaState; unsigned long aulPktNum[MAX_RATE];
unsigned long ulRatio_State0;
unsigned long ulRatio_State1;
unsigned long ulSQ3_State0;
unsigned long ulSQ3_State1;
unsigned long aulSQ3Val[MAX_RATE];
unsigned long aulPktNum[MAX_RATE];
/* IFS & Cw */ /* IFS & Cw */
unsigned int uSIFS; /* Current SIFS */ u32 uSIFS; /* Current SIFS */
unsigned int uDIFS; /* Current DIFS */ u32 uDIFS; /* Current DIFS */
unsigned int uEIFS; /* Current EIFS */ u32 uEIFS; /* Current EIFS */
unsigned int uSlot; /* Current SlotTime */ u32 uSlot; /* Current SlotTime */
unsigned int uCwMin; /* Current CwMin */ u32 uCwMin; /* Current CwMin */
unsigned int uCwMax; /* CwMax is fixed on 1023 */ u32 uCwMax; /* CwMax is fixed on 1023 */
// PHY parameter /* PHY parameter */
BYTE bySIFS; u8 bySIFS;
BYTE byDIFS; u8 byDIFS;
BYTE byEIFS; u8 byEIFS;
BYTE bySlot; u8 bySlot;
BYTE byCWMaxMin; u8 byCWMaxMin;
// Rate /* Rate */
VIA_BB_TYPE byBBType; //0: 11A, 1:11B, 2:11G VIA_BB_TYPE byBBType; /* 0: 11A, 1:11B, 2:11G */
VIA_PKT_TYPE byPacketType; //0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate) VIA_PKT_TYPE byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
WORD wBasicRate; u16 wBasicRate;
BYTE byACKRate; u8 byACKRate;
BYTE byTopOFDMBasicRate; u8 byTopOFDMBasicRate;
BYTE byTopCCKBasicRate; u8 byTopCCKBasicRate;
DWORD dwAotoRateTxOkCnt; u32 dwAotoRateTxOkCnt;
DWORD dwAotoRateTxFailCnt; u32 dwAotoRateTxFailCnt;
DWORD dwErrorRateThreshold[13]; u32 dwErrorRateThreshold[13];
DWORD dwTPTable[MAX_RATE]; u32 dwTPTable[MAX_RATE];
BYTE abyEEPROM[EEP_MAX_CONTEXT_SIZE]; //DWORD alignment u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */
BYTE byMinChannel; u8 byMinChannel;
BYTE byMaxChannel; u8 byMaxChannel;
unsigned int uConnectionRate; u32 uConnectionRate;
BYTE byPreambleType; u8 byPreambleType;
BYTE byShortPreamble; u8 byShortPreamble;
// CARD_PHY_TYPE /* CARD_PHY_TYPE */
BYTE eConfigPHYMode; u8 eConfigPHYMode;
// For RF Power table /* For RF Power table */
BYTE byCCKPwr; u8 byCCKPwr;
BYTE byOFDMPwrG; u8 byOFDMPwrG;
BYTE byOFDMPwrA; u8 byOFDMPwrA;
BYTE byCurPwr; u8 byCurPwr;
BYTE abyCCKPwrTbl[14]; u8 abyCCKPwrTbl[14];
BYTE abyOFDMPwrTbl[14]; u8 abyOFDMPwrTbl[14];
BYTE abyOFDMAPwrTbl[42]; u8 abyOFDMAPwrTbl[42];
WORD wCurrentRate; u16 wCurrentRate;
WORD wRTSThreshold; u16 wRTSThreshold;
WORD wFragmentationThreshold; u16 wFragmentationThreshold;
BYTE byShortRetryLimit; u8 byShortRetryLimit;
BYTE byLongRetryLimit; u8 byLongRetryLimit;
CARD_OP_MODE eOPMode; CARD_OP_MODE eOPMode;
BOOL bBSSIDFilter; int bBSSIDFilter;
WORD wMaxTransmitMSDULifetime; u16 wMaxTransmitMSDULifetime;
BYTE abyBSSID[ETH_ALEN]; u8 abyBSSID[ETH_ALEN];
BYTE abyDesireBSSID[ETH_ALEN]; u8 abyDesireBSSID[ETH_ALEN];
WORD wCTSDuration; // update while speed change
WORD wACKDuration; // update while speed change
WORD wRTSTransmitLen; // update while speed change
BYTE byRTSServiceField; // update while speed change
BYTE byRTSSignalField; // update while speed change
DWORD dwMaxReceiveLifetime; // dot11MaxReceiveLifetime u16 wCTSDuration; /* update while speed change */
u16 wACKDuration;
u16 wRTSTransmitLen;
u8 byRTSServiceField;
u8 byRTSSignalField;
BOOL bCCK; u32 dwMaxReceiveLifetime; /* dot11MaxReceiveLifetime */
BOOL bEncryptionEnable;
BOOL bLongHeader;
BOOL bSoftwareGenCrcErr;
BOOL bShortSlotTime;
BOOL bProtectMode;
BOOL bNonERPPresent;
BOOL bBarkerPreambleMd;
BYTE byERPFlag; int bCCK;
WORD wUseProtectCntDown; int bEncryptionEnable;
int bLongHeader;
int bSoftwareGenCrcErr;
int bShortSlotTime;
int bProtectMode;
int bNonERPPresent;
int bBarkerPreambleMd;
BOOL bRadioControlOff; u8 byERPFlag;
BOOL bRadioOff; u16 wUseProtectCntDown;
// Power save int bRadioControlOff;
BOOL bEnablePSMode; int bRadioOff;
WORD wListenInterval;
BOOL bPWBitOn;
WMAC_POWER_MODE ePSMode;
unsigned long ulPSModeWaitTx;
BOOL bPSModeTxBurst;
// Beacon releated /* Power save */
WORD wSeqCounter; int bEnablePSMode;
BOOL bBeaconBufReady; u16 wListenInterval;
BOOL bBeaconSent; int bPWBitOn;
BOOL bFixRate; WMAC_POWER_MODE ePSMode;
BYTE byCurrentCh; unsigned long ulPSModeWaitTx;
unsigned int uScanTime; int bPSModeTxBurst;
CMD_STATE eCommandState; /* Beacon releated */
u16 wSeqCounter;
int bBeaconBufReady;
int bBeaconSent;
int bFixRate;
u8 byCurrentCh;
u32 uScanTime;
CMD_CODE eCommand; CMD_STATE eCommandState;
BOOL bBeaconTx;
BYTE byScanBBType;
BOOL bStopBeacon; CMD_CODE eCommand;
BOOL bStopDataPkt; int bBeaconTx;
BOOL bStopTx0Pkt; u8 byScanBBType;
unsigned int uAutoReConnectTime;
unsigned int uIsroamingTime;
// 802.11 counter int bStopBeacon;
int bStopDataPkt;
int bStopTx0Pkt;
u32 uAutoReConnectTime;
u32 uIsroamingTime;
CMD_ITEM eCmdQueue[CMD_Q_SIZE]; /* 802.11 counter */
unsigned int uCmdDequeueIdx;
unsigned int uCmdEnqueueIdx;
unsigned int cbFreeCmdQueue;
BOOL bCmdRunning;
BOOL bCmdClear;
BOOL bNeedRadioOFF;
BOOL bEnableRoaming; CMD_ITEM eCmdQueue[CMD_Q_SIZE];
BOOL bIsRoaming; u32 uCmdDequeueIdx;
BOOL bFastRoaming; u32 uCmdEnqueueIdx;
BYTE bSameBSSMaxNum; u32 cbFreeCmdQueue;
BYTE bSameBSSCurNum; int bCmdRunning;
BOOL bRoaming; int bCmdClear;
BOOL b11hEable; int bNeedRadioOFF;
unsigned long ulTxPower;
// Encryption int bEnableRoaming;
NDIS_802_11_WEP_STATUS eEncryptionStatus; int bIsRoaming;
BOOL bTransmitKey; int bFastRoaming;
u8 bSameBSSMaxNum;
u8 bSameBSSCurNum;
int bRoaming;
int b11hEable;
unsigned long ulTxPower;
//mike add :save old Encryption /* Encryption */
NDIS_802_11_WEP_STATUS eOldEncryptionStatus; NDIS_802_11_WEP_STATUS eEncryptionStatus;
int bTransmitKey;
SKeyManagement sKey; NDIS_802_11_WEP_STATUS eOldEncryptionStatus;
DWORD dwIVCounter; SKeyManagement sKey;
u32 dwIVCounter;
RC4Ext SBox; RC4Ext SBox;
BYTE abyPRNG[WLAN_WEPMAX_KEYLEN+3]; u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
BYTE byKeyIndex; u8 byKeyIndex;
BOOL bAES; int bAES;
unsigned int uKeyLength; u32 uKeyLength;
BYTE abyKey[WLAN_WEP232_KEYLEN]; u8 abyKey[WLAN_WEP232_KEYLEN];
// for AP mode /* for AP mode */
unsigned int uAssocCount; u32 uAssocCount;
BOOL bMoreData; int bMoreData;
// QoS /* QoS */
BOOL bGrpAckPolicy; int bGrpAckPolicy;
BYTE byAutoFBCtrl; u8 byAutoFBCtrl;
BOOL bTxMICFail; int bTxMICFail;
BOOL bRxMICFail; int bRxMICFail;
// For Update BaseBand VGA Gain Offset /* For Update BaseBand VGA Gain Offset */
BOOL bUpdateBBVGA; int bUpdateBBVGA;
unsigned int uBBVGADiffCount; u32 uBBVGADiffCount;
BYTE byBBVGANew; u8 byBBVGANew;
BYTE byBBVGACurrent; u8 byBBVGACurrent;
BYTE abyBBVGA[BB_VGA_LEVEL]; u8 abyBBVGA[BB_VGA_LEVEL];
signed long ldBmThreshold[BB_VGA_LEVEL]; signed long ldBmThreshold[BB_VGA_LEVEL];
BYTE byBBPreEDRSSI; u8 byBBPreEDRSSI;
BYTE byBBPreEDIndex; u8 byBBPreEDIndex;
BOOL bRadioCmd; int bRadioCmd;
DWORD dwDiagRefCount; u32 dwDiagRefCount;
// For FOE Tuning /* For FOE Tuning */
BYTE byFOETuning; u8 byFOETuning;
// For Auto Power Tunning /* For Auto Power Tunning */
u8 byAutoPwrTunning;
BYTE byAutoPwrTunning; /* BaseBand Loopback Use */
u8 byBBCR4d;
u8 byBBCRc9;
u8 byBBCR88;
u8 byBBCR09;
// BaseBand Loopback Use /* command timer */
BYTE byBBCR4d; struct timer_list sTimerCommand;
BYTE byBBCRc9;
BYTE byBBCR88;
BYTE byBBCR09;
// command timer struct timer_list sTimerTxData;
struct timer_list sTimerCommand; unsigned long nTxDataTimeCout;
int fTxDataInSleep;
int IsTxDataTrigger;
struct timer_list sTimerTxData; int fWPA_Authened; /*is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? */
unsigned long nTxDataTimeCout; u8 byReAssocCount;
BOOL fTxDataInSleep; u8 byLinkWaitCount;
BOOL IsTxDataTrigger;
BOOL fWPA_Authened; //is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? SEthernetHeader sTxEthHeader;
BYTE byReAssocCount; //mike add:re-association retry times! SEthernetHeader sRxEthHeader;
BYTE byLinkWaitCount; u8 abyBroadcastAddr[ETH_ALEN];
u8 abySNAP_RFC1042[ETH_ALEN];
u8 abySNAP_Bridgetunnel[ETH_ALEN];
SEthernetHeader sTxEthHeader; /* Pre-Authentication & PMK cache */
SEthernetHeader sRxEthHeader; SPMKID gsPMKID;
BYTE abyBroadcastAddr[ETH_ALEN]; SPMKIDCandidateEvent gsPMKIDCandidate;
BYTE abySNAP_RFC1042[ETH_ALEN];
BYTE abySNAP_Bridgetunnel[ETH_ALEN];
// Pre-Authentication & PMK cache
SPMKID gsPMKID;
SPMKIDCandidateEvent gsPMKIDCandidate;
// for 802.11h /* for 802.11h */
BOOL b11hEnable; int b11hEnable;
BOOL bChannelSwitch; int bChannelSwitch;
BYTE byNewChannel; u8 byNewChannel;
BYTE byChannelSwitchCount; u8 byChannelSwitchCount;
//WPA supplicant daemon /* WPA supplicant daemon */
struct net_device *wpadev; int bWPADEVUp;
BOOL bWPADEVUp; int bwextstep0;
//-- int bwextstep1;
int bwextstep2;
int bwextstep3;
int bWPASuppWextEnabled;
BOOL bwextstep0; /* user space daemon: hostapd, is used for HOSTAP */
BOOL bwextstep1; int bEnableHostapd;
BOOL bwextstep2; int bEnable8021x;
BOOL bwextstep3; int bEnableHostWEP;
BOOL bWPASuppWextEnabled; struct net_device *apdev;
#ifdef HOSTAP
// user space daemon: hostapd, is used for HOSTAP
BOOL bEnableHostapd;
BOOL bEnable8021x;
BOOL bEnableHostWEP;
struct net_device *apdev;
int (*tx_80211)(struct sk_buff *skb, struct net_device *dev); int (*tx_80211)(struct sk_buff *skb, struct net_device *dev);
#endif
unsigned int uChannel;
struct iw_statistics wstats; // wireless stats u32 uChannel;
BOOL bCommit;
struct iw_statistics wstats; /* wireless stats */
int bCommit;
}; };