Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61462ab3 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: cleanup struct vnt_private



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

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 14c5ef57
Loading
Loading
Loading
Loading
+349 −372
Original line number Diff line number Diff line
@@ -393,13 +393,11 @@ typedef struct __device_opt {


struct vnt_private {

// netdev
	/* netdev */
	struct usb_device *usb;
	struct net_device *dev;
	struct net_device_stats stats;


	OPTIONS sOpts;

	struct tasklet_struct CmdWorkItem;
@@ -409,13 +407,13 @@ struct vnt_private {

	u32 rx_buf_sz;
	int multicast_limit;
    BYTE                        byRxMode;
	u8 byRxMode;

	spinlock_t lock;

	u32 rx_bytes;

    BYTE                        byRevId;
	u8 byRevId;

	u32 flags;
	unsigned long Flags;
@@ -423,55 +421,45 @@ struct vnt_private {
	SCache sDupRxCache;

	SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
    unsigned int                        cbDFCB;
    unsigned int                        cbFreeDFCB;
    unsigned int                        uCurrentDFCBIdx;
	u32 cbDFCB;
	u32 cbFreeDFCB;
	u32 uCurrentDFCBIdx;

    // +++USB

	/* USB */
	struct urb *pControlURB;
	struct urb *pInterruptURB;
	struct usb_ctrlrequest sUsbCtlRequest;
	u32 int_interval;

    unsigned int                        int_interval;
    //
    // Variables to track resources for the BULK In Pipe
    //
	/* Variables to track resources for the BULK In Pipe */
	PRCB pRCBMem;
	PRCB apRCB[CB_MAX_RX_DESC];
    unsigned int                        cbRD;
	u32 cbRD;
	PRCB FirstRecvFreeList;
	PRCB LastRecvFreeList;
    unsigned int                        NumRecvFreeList;
	u32 NumRecvFreeList;
	PRCB FirstRecvMngList;
	PRCB LastRecvMngList;
    unsigned int                        NumRecvMngList;
    BOOL                        bIsRxWorkItemQueued;
    BOOL                        bIsRxMngWorkItemQueued;
	u32 NumRecvMngList;
	int bIsRxWorkItemQueued;
	int bIsRxMngWorkItemQueued;
	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];
    unsigned int                        cbTD;
	u32 cbTD;

    //
    //  Variables to track resources for the Interrupt In Pipe
    //
	/* Variables to track resources for the Interrupt In Pipe */
	INT_BUFFER intBuf;
    BOOL                        fKillEventPollingThread;
    BOOL                        bEventAvailable;

	int fKillEventPollingThread;
	int bEventAvailable;

  //default config from file by user setting
	/* default config from file by user setting */
	DEFAULT_CONFIG config_file;


    //
    // Statistic for USB
    // protect with spinlock
	/* Statistic for USB */
	unsigned long ulBulkInPosted;
	unsigned long ulBulkInError;
	unsigned long ulBulkInContCRCError;
@@ -488,33 +476,30 @@ struct vnt_private {
	unsigned long ulIntInBytesRead;


    // Version control
    WORD                        wFirmwareVersion;
    BYTE                        byLocalID;
    BYTE                        byRFType;
    BYTE                        byBBRxConf;
	/* Version control */
	u16 wFirmwareVersion;
	u8 byLocalID;
	u8 byRFType;
	u8 byBBRxConf;


	u8 byZoneType;
	int bZoneRegExist;

    BYTE                        byZoneType;
    BOOL                        bZoneRegExist;
	u8 byOriginalZonetype;

    BYTE                        byOriginalZonetype;
	int bLinkPass; /* link status: OK or fail */
	u8 abyCurrentNetAddr[ETH_ALEN];
	u8 abyPermanentNetAddr[ETH_ALEN];

    BOOL                        bLinkPass;          // link status: OK or fail
    BYTE                        abyCurrentNetAddr[ETH_ALEN];
    BYTE                        abyPermanentNetAddr[ETH_ALEN];
    // SW network address
	/* u8 abySoftwareNetAddr[ETH_ALEN]; */
    BOOL                        bExistSWNetAddr;
	int bExistSWNetAddr;

    // Adapter statistics
	/* Adapter statistics */
	SStatCounter scStatistic;
    // 802.11 counter
	/* 802.11 counter */
	SDot11Counters s802_11Counter;

    //
    // Maintain statistical debug info.
    //
	/* Maintain statistical debug info. */
	unsigned long packetsReceived;
	unsigned long packetsReceivedDropped;
	unsigned long packetsReceivedOverflow;
@@ -523,45 +508,43 @@ struct vnt_private {
	unsigned long SendContextsInUse;
	unsigned long RcvBuffersInUse;


	/* 802.11 management */
	struct vnt_manager vnt_mgmt;

	u64 qwCurrTSF;
    unsigned int                        cbBulkInMax;
    BOOL                        bPSRxBeacon;

    // 802.11 MAC specific
    unsigned int                        uCurrRSSI;
    BYTE                        byCurrSQ;


    //Antenna Diversity
    BOOL                        bTxRxAntInv;
    DWORD                       dwRxAntennaSel;
    DWORD                       dwTxAntennaSel;
    BYTE                        byAntennaCount;
    BYTE                        byRxAntennaMode;
    BYTE                        byTxAntennaMode;
    BYTE                        byRadioCtl;
    BYTE                        bHWRadioOff;

    //SQ3 functions for antenna diversity
	u32 cbBulkInMax;
	int bPSRxBeacon;

	/* 802.11 MAC specific */
	u32 uCurrRSSI;
	u8 byCurrSQ;

	/* Antenna Diversity */
	int bTxRxAntInv;
	u32 dwRxAntennaSel;
	u32 dwTxAntennaSel;
	u8 byAntennaCount;
	u8 byRxAntennaMode;
	u8 byTxAntennaMode;
	u8 byRadioCtl;
	u8 bHWRadioOff;

	/* SQ3 functions for antenna diversity */
	struct timer_list TimerSQ3Tmax1;
	struct timer_list TimerSQ3Tmax2;
	struct timer_list TimerSQ3Tmax3;

    BOOL                        bDiversityRegCtlON;
    BOOL                        bDiversityEnable;
	int bDiversityRegCtlON;
	int bDiversityEnable;
	unsigned long ulDiversityNValue;
	unsigned long ulDiversityMValue;
    BYTE                        byTMax;
    BYTE                        byTMax2;
    BYTE                        byTMax3;
	u8 byTMax;
	u8 byTMax2;
	u8 byTMax3;
	unsigned long ulSQ3TH;

	unsigned long uDiversityCnt;
    BYTE                        byAntennaState;
	u8 byAntennaState;
	unsigned long ulRatio_State0;
	unsigned long ulRatio_State1;
	unsigned long ulSQ3_State0;
@@ -571,248 +554,242 @@ struct vnt_private {
	unsigned long aulPktNum[MAX_RATE];

	/* IFS & Cw */
	unsigned int uSIFS;  /* Current SIFS */
	unsigned int uDIFS;  /* Current DIFS */
	unsigned int uEIFS;  /* Current EIFS */
	unsigned int uSlot;  /* Current SlotTime */
	unsigned int uCwMin; /* Current CwMin */
	unsigned int uCwMax; /* CwMax is fixed on 1023 */

    // PHY parameter
    BYTE                        bySIFS;
    BYTE                        byDIFS;
    BYTE                        byEIFS;
    BYTE                        bySlot;
    BYTE                        byCWMaxMin;

    // Rate
    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)
    WORD                        wBasicRate;
    BYTE                        byACKRate;
    BYTE                        byTopOFDMBasicRate;
    BYTE                        byTopCCKBasicRate;


    DWORD                       dwAotoRateTxOkCnt;
    DWORD                       dwAotoRateTxFailCnt;
    DWORD                       dwErrorRateThreshold[13];
    DWORD                       dwTPTable[MAX_RATE];
    BYTE                        abyEEPROM[EEP_MAX_CONTEXT_SIZE];  //DWORD alignment

    BYTE                        byMinChannel;
    BYTE                        byMaxChannel;
    unsigned int                        uConnectionRate;

    BYTE                        byPreambleType;
    BYTE                        byShortPreamble;
    // CARD_PHY_TYPE
    BYTE                        eConfigPHYMode;

    // For RF Power table
    BYTE                        byCCKPwr;
    BYTE                        byOFDMPwrG;
    BYTE                        byOFDMPwrA;
    BYTE                        byCurPwr;
    BYTE                        abyCCKPwrTbl[14];
    BYTE                        abyOFDMPwrTbl[14];
    BYTE                        abyOFDMAPwrTbl[42];

    WORD                        wCurrentRate;
    WORD                        wRTSThreshold;
    WORD                        wFragmentationThreshold;
    BYTE                        byShortRetryLimit;
    BYTE                        byLongRetryLimit;
	u32 uSIFS;  /* Current SIFS */
	u32 uDIFS;  /* Current DIFS */
	u32 uEIFS;  /* Current EIFS */
	u32 uSlot;  /* Current SlotTime */
	u32 uCwMin; /* Current CwMin */
	u32 uCwMax; /* CwMax is fixed on 1023 */

	/* PHY parameter */
	u8  bySIFS;
	u8  byDIFS;
	u8  byEIFS;
	u8  bySlot;
	u8  byCWMaxMin;

	/* Rate */
	VIA_BB_TYPE byBBType; /* 0: 11A, 1:11B, 2:11G */
	VIA_PKT_TYPE byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
	u16 wBasicRate;
	u8 byACKRate;
	u8 byTopOFDMBasicRate;
	u8 byTopCCKBasicRate;


	u32 dwAotoRateTxOkCnt;
	u32 dwAotoRateTxFailCnt;
	u32 dwErrorRateThreshold[13];
	u32 dwTPTable[MAX_RATE];
	u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE];  /*u32 alignment */

	u8 byMinChannel;
	u8 byMaxChannel;
	u32 uConnectionRate;

	u8 byPreambleType;
	u8 byShortPreamble;
	/* CARD_PHY_TYPE */
	u8 eConfigPHYMode;

	/* For RF Power table */
	u8 byCCKPwr;
	u8 byOFDMPwrG;
	u8 byOFDMPwrA;
	u8 byCurPwr;
	u8 abyCCKPwrTbl[14];
	u8 abyOFDMPwrTbl[14];
	u8 abyOFDMAPwrTbl[42];

	u16 wCurrentRate;
	u16 wRTSThreshold;
	u16 wFragmentationThreshold;
	u8 byShortRetryLimit;
	u8 byLongRetryLimit;
	CARD_OP_MODE eOPMode;
    BOOL                        bBSSIDFilter;
    WORD                        wMaxTransmitMSDULifetime;
    BYTE                        abyBSSID[ETH_ALEN];
    BYTE                        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

    BOOL                        bCCK;
    BOOL                        bEncryptionEnable;
    BOOL                        bLongHeader;
    BOOL                        bSoftwareGenCrcErr;
    BOOL                        bShortSlotTime;
    BOOL                        bProtectMode;
    BOOL                        bNonERPPresent;
    BOOL                        bBarkerPreambleMd;

    BYTE                        byERPFlag;
    WORD                        wUseProtectCntDown;

    BOOL                        bRadioControlOff;
    BOOL                        bRadioOff;

    // Power save
    BOOL                        bEnablePSMode;
    WORD                        wListenInterval;
    BOOL                        bPWBitOn;
	int bBSSIDFilter;
	u16 wMaxTransmitMSDULifetime;
	u8 abyBSSID[ETH_ALEN];
	u8 abyDesireBSSID[ETH_ALEN];

	u16 wCTSDuration;       /* update while speed change */
	u16 wACKDuration;
	u16 wRTSTransmitLen;
	u8 byRTSServiceField;
	u8 byRTSSignalField;

	u32 dwMaxReceiveLifetime;  /* dot11MaxReceiveLifetime */

	int bCCK;
	int bEncryptionEnable;
	int bLongHeader;
	int bSoftwareGenCrcErr;
	int bShortSlotTime;
	int bProtectMode;
	int bNonERPPresent;
	int bBarkerPreambleMd;

	u8 byERPFlag;
	u16 wUseProtectCntDown;

	int bRadioControlOff;
	int bRadioOff;

	/* Power save */
	int bEnablePSMode;
	u16 wListenInterval;
	int bPWBitOn;
	WMAC_POWER_MODE ePSMode;
	unsigned long ulPSModeWaitTx;
    BOOL                        bPSModeTxBurst;
	int bPSModeTxBurst;

    // Beacon releated
    WORD                    wSeqCounter;
    BOOL                    bBeaconBufReady;
    BOOL                    bBeaconSent;
    BOOL                    bFixRate;
    BYTE                    byCurrentCh;
    unsigned int                    uScanTime;
	/* Beacon releated */
	u16 wSeqCounter;
	int bBeaconBufReady;
	int bBeaconSent;
	int bFixRate;
	u8 byCurrentCh;
	u32 uScanTime;

	CMD_STATE eCommandState;

	CMD_CODE eCommand;
    BOOL                    bBeaconTx;
    BYTE                    byScanBBType;
	int bBeaconTx;
	u8 byScanBBType;

    BOOL                    bStopBeacon;
    BOOL                    bStopDataPkt;
    BOOL                    bStopTx0Pkt;
    unsigned int                    uAutoReConnectTime;
    unsigned int                    uIsroamingTime;
	int bStopBeacon;
	int bStopDataPkt;
	int bStopTx0Pkt;
	u32 uAutoReConnectTime;
	u32 uIsroamingTime;

    // 802.11 counter
	/* 802.11 counter */

	CMD_ITEM eCmdQueue[CMD_Q_SIZE];
    unsigned int                    uCmdDequeueIdx;
    unsigned int                    uCmdEnqueueIdx;
    unsigned int                    cbFreeCmdQueue;
    BOOL                    bCmdRunning;
    BOOL                    bCmdClear;
    BOOL                    bNeedRadioOFF;

    BOOL                    bEnableRoaming;
    BOOL                    bIsRoaming;
    BOOL                    bFastRoaming;
    BYTE                    bSameBSSMaxNum;
    BYTE                    bSameBSSCurNum;
    BOOL                    bRoaming;
    BOOL                    b11hEable;
	u32 uCmdDequeueIdx;
	u32 uCmdEnqueueIdx;
	u32 cbFreeCmdQueue;
	int bCmdRunning;
	int bCmdClear;
	int bNeedRadioOFF;

	int bEnableRoaming;
	int bIsRoaming;
	int bFastRoaming;
	u8 bSameBSSMaxNum;
	u8 bSameBSSCurNum;
	int bRoaming;
	int b11hEable;
	unsigned long ulTxPower;

    // Encryption
	/* Encryption */
	NDIS_802_11_WEP_STATUS eEncryptionStatus;
    BOOL                    bTransmitKey;

//mike add :save old Encryption
	int  bTransmitKey;
	NDIS_802_11_WEP_STATUS eOldEncryptionStatus;

	SKeyManagement sKey;
    DWORD                   dwIVCounter;
	u32 dwIVCounter;


	RC4Ext SBox;
    BYTE                    abyPRNG[WLAN_WEPMAX_KEYLEN+3];
    BYTE                    byKeyIndex;
	u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
	u8 byKeyIndex;

    BOOL                    bAES;
	int bAES;

    unsigned int                    uKeyLength;
    BYTE                    abyKey[WLAN_WEP232_KEYLEN];
	u32 uKeyLength;
	u8 abyKey[WLAN_WEP232_KEYLEN];

    // for AP mode
    unsigned int                    uAssocCount;
    BOOL                    bMoreData;
	/* for AP mode */
	u32 uAssocCount;
	int bMoreData;

    // QoS
    BOOL                    bGrpAckPolicy;
	/* QoS */
	int bGrpAckPolicy;


    BYTE                    byAutoFBCtrl;
	u8 byAutoFBCtrl;

    BOOL                    bTxMICFail;
    BOOL                    bRxMICFail;
	int bTxMICFail;
	int bRxMICFail;


    // For Update BaseBand VGA Gain Offset
    BOOL                    bUpdateBBVGA;
    unsigned int                    uBBVGADiffCount;
    BYTE                    byBBVGANew;
    BYTE                    byBBVGACurrent;
    BYTE                    abyBBVGA[BB_VGA_LEVEL];
	/* For Update BaseBand VGA Gain Offset */
	int bUpdateBBVGA;
	u32 uBBVGADiffCount;
	u8 byBBVGANew;
	u8 byBBVGACurrent;
	u8 abyBBVGA[BB_VGA_LEVEL];
	signed long ldBmThreshold[BB_VGA_LEVEL];

    BYTE                    byBBPreEDRSSI;
    BYTE                    byBBPreEDIndex;

	u8 byBBPreEDRSSI;
	u8 byBBPreEDIndex;

    BOOL                    bRadioCmd;
    DWORD                   dwDiagRefCount;

    // For FOE Tuning
    BYTE                    byFOETuning;
	int bRadioCmd;
	u32 dwDiagRefCount;

    // For Auto Power Tunning
	/* For FOE Tuning */
	u8  byFOETuning;

    BYTE                    byAutoPwrTunning;
	/* For Auto Power Tunning */
	u8  byAutoPwrTunning;

    // BaseBand Loopback Use
    BYTE                    byBBCR4d;
    BYTE                    byBBCRc9;
    BYTE                    byBBCR88;
    BYTE                    byBBCR09;
	/* BaseBand Loopback Use */
	u8 byBBCR4d;
	u8 byBBCRc9;
	u8 byBBCR88;
	u8 byBBCR09;

    // command timer
	/* command timer */
	struct timer_list sTimerCommand;

	struct timer_list sTimerTxData;
	unsigned long nTxDataTimeCout;
     BOOL  fTxDataInSleep;
     BOOL  IsTxDataTrigger;
	int fTxDataInSleep;
	int IsTxDataTrigger;

    BOOL  fWPA_Authened;           //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
    BYTE            byReAssocCount;   //mike add:re-association retry times!
    BYTE            byLinkWaitCount;
	int fWPA_Authened; /*is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? */
	u8 byReAssocCount;
	u8 byLinkWaitCount;

	SEthernetHeader sTxEthHeader;
	SEthernetHeader sRxEthHeader;
    BYTE                    abyBroadcastAddr[ETH_ALEN];
    BYTE                    abySNAP_RFC1042[ETH_ALEN];
    BYTE                    abySNAP_Bridgetunnel[ETH_ALEN];
	u8 abyBroadcastAddr[ETH_ALEN];
	u8 abySNAP_RFC1042[ETH_ALEN];
	u8 abySNAP_Bridgetunnel[ETH_ALEN];

    // Pre-Authentication & PMK cache
	/* Pre-Authentication & PMK cache */
	SPMKID gsPMKID;
	SPMKIDCandidateEvent gsPMKIDCandidate;


    // for 802.11h
    BOOL                    b11hEnable;
	/* for 802.11h */
	int b11hEnable;

    BOOL                    bChannelSwitch;
    BYTE                    byNewChannel;
    BYTE                    byChannelSwitchCount;
	int bChannelSwitch;
	u8 byNewChannel;
	u8 byChannelSwitchCount;

    //WPA supplicant daemon
	struct net_device       *wpadev;
	BOOL                    bWPADEVUp;
    //--
	/* WPA supplicant daemon */
	int bWPADEVUp;
	int bwextstep0;
	int bwextstep1;
	int bwextstep2;
	int bwextstep3;
	int bWPASuppWextEnabled;

        BOOL                 bwextstep0;
        BOOL                 bwextstep1;
        BOOL                 bwextstep2;
        BOOL                 bwextstep3;
        BOOL                 bWPASuppWextEnabled;

#ifdef HOSTAP
    // user space daemon: hostapd, is used for HOSTAP
	BOOL                    bEnableHostapd;
	BOOL                    bEnable8021x;
	BOOL                    bEnableHostWEP;
	/* user space daemon: hostapd, is used for HOSTAP */
	int bEnableHostapd;
	int bEnable8021x;
	int bEnableHostWEP;
	struct net_device *apdev;
	int (*tx_80211)(struct sk_buff *skb, struct net_device *dev);
#endif
    unsigned int                    uChannel;

	struct iw_statistics	wstats;		// wireless stats
    BOOL                    bCommit;
	u32 uChannel;

	struct iw_statistics wstats; /* wireless stats */

	int bCommit;

};