Staging: vt665x: Typedef and macro cleanup Part 1
Clean up unused typedefs and macros to remove Win32'isms and misc non-linux constructs. Text edits to referencing source for less frequently used macros. Signed-off-by: Jim Lieb <lieb@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
555044bf89
Коммит
193a823caa
|
@ -94,13 +94,13 @@
|
|||
typedef struct tagSERPObject {
|
||||
BOOL bERPExist;
|
||||
BYTE byERP;
|
||||
}ERPObject, DEF* PERPObject;
|
||||
}ERPObject, *PERPObject;
|
||||
|
||||
|
||||
typedef struct tagSRSNCapObject {
|
||||
BOOL bRSNCapExist;
|
||||
WORD wRSNCap;
|
||||
}SRSNCapObject, DEF* PSRSNCapObject;
|
||||
}SRSNCapObject, *PSRSNCapObject;
|
||||
|
||||
// BSS info(AP)
|
||||
#pragma pack(1)
|
||||
|
@ -165,7 +165,7 @@ typedef struct tagKnownBSS {
|
|||
BYTE abyIEs[1024]; // don't move this field !!
|
||||
|
||||
}__attribute__ ((__packed__))
|
||||
KnownBSS , DEF* PKnownBSS;
|
||||
KnownBSS , *PKnownBSS;
|
||||
|
||||
|
||||
|
||||
|
@ -235,7 +235,7 @@ typedef struct tagKnownNodeDB {
|
|||
UINT uTxFail[MAX_RATE+1];
|
||||
UINT uTimeCount;
|
||||
|
||||
} KnownNodeDB, DEF* PKnownNodeDB;
|
||||
} KnownNodeDB, *PKnownNodeDB;
|
||||
|
||||
|
||||
/*--------------------- Export Functions --------------------------*/
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef enum _CARD_PHY_TYPE {
|
|||
PHY_TYPE_11B,
|
||||
PHY_TYPE_11G,
|
||||
PHY_TYPE_11A
|
||||
} CARD_PHY_TYPE, DEF* PCARD_PHY_TYPE;
|
||||
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
|
||||
|
||||
typedef enum _CARD_OP_MODE {
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ typedef struct tagSChannelTblElement {
|
|||
BYTE byChannelNumber;
|
||||
UINT uFrequency;
|
||||
BOOL bValid;
|
||||
}SChannelTblElement, DEF* PSChannelTblElement;
|
||||
}SChannelTblElement, *PSChannelTblElement;
|
||||
|
||||
/*--------------------- Export Variables --------------------------*/
|
||||
|
||||
|
|
|
@ -184,8 +184,8 @@ typedef struct tagSRrvTime_gRTS {
|
|||
WORD wTxRrvTime_b;
|
||||
WORD wTxRrvTime_a;
|
||||
}__attribute__ ((__packed__))
|
||||
SRrvTime_gRTS, DEF* PSRrvTime_gRTS;
|
||||
typedef const SRrvTime_gRTS DEF* PCSRrvTime_gRTS;
|
||||
SRrvTime_gRTS, *PSRrvTime_gRTS;
|
||||
typedef const SRrvTime_gRTS *PCSRrvTime_gRTS;
|
||||
|
||||
typedef struct tagSRrvTime_gCTS {
|
||||
WORD wCTSTxRrvTime_ba;
|
||||
|
@ -193,22 +193,22 @@ typedef struct tagSRrvTime_gCTS {
|
|||
WORD wTxRrvTime_b;
|
||||
WORD wTxRrvTime_a;
|
||||
}__attribute__ ((__packed__))
|
||||
SRrvTime_gCTS, DEF* PSRrvTime_gCTS;
|
||||
typedef const SRrvTime_gCTS DEF* PCSRrvTime_gCTS;
|
||||
SRrvTime_gCTS, *PSRrvTime_gCTS;
|
||||
typedef const SRrvTime_gCTS *PCSRrvTime_gCTS;
|
||||
|
||||
typedef struct tagSRrvTime_ab {
|
||||
WORD wRTSTxRrvTime;
|
||||
WORD wTxRrvTime;
|
||||
}__attribute__ ((__packed__))
|
||||
SRrvTime_ab, DEF* PSRrvTime_ab;
|
||||
typedef const SRrvTime_ab DEF* PCSRrvTime_ab;
|
||||
SRrvTime_ab, *PSRrvTime_ab;
|
||||
typedef const SRrvTime_ab *PCSRrvTime_ab;
|
||||
|
||||
typedef struct tagSRrvTime_atim {
|
||||
WORD wCTSTxRrvTime_ba;
|
||||
WORD wTxRrvTime_a;
|
||||
}__attribute__ ((__packed__))
|
||||
SRrvTime_atim, DEF* PSRrvTime_atim;
|
||||
typedef const SRrvTime_atim DEF* PCSRrvTime_atim;
|
||||
SRrvTime_atim, *PSRrvTime_atim;
|
||||
typedef const SRrvTime_atim *PCSRrvTime_atim;
|
||||
|
||||
//
|
||||
// RTS buffer header
|
||||
|
@ -219,8 +219,8 @@ typedef struct tagSRTSData {
|
|||
BYTE abyRA[U_ETHER_ADDR_LEN];
|
||||
BYTE abyTA[U_ETHER_ADDR_LEN];
|
||||
}__attribute__ ((__packed__))
|
||||
SRTSData, DEF* PSRTSData;
|
||||
typedef const SRTSData DEF* PCSRTSData;
|
||||
SRTSData, *PSRTSData;
|
||||
typedef const SRTSData *PCSRTSData;
|
||||
|
||||
typedef struct tagSRTS_g {
|
||||
BYTE bySignalField_b;
|
||||
|
@ -235,8 +235,8 @@ typedef struct tagSRTS_g {
|
|||
WORD wReserved;
|
||||
SRTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SRTS_g, DEF* PSRTS_g;
|
||||
typedef const SRTS_g DEF* PCSRTS_g;
|
||||
SRTS_g, *PSRTS_g;
|
||||
typedef const SRTS_g *PCSRTS_g;
|
||||
|
||||
|
||||
typedef struct tagSRTS_g_FB {
|
||||
|
@ -256,8 +256,8 @@ typedef struct tagSRTS_g_FB {
|
|||
WORD wRTSDuration_aa_f1;
|
||||
SRTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SRTS_g_FB, DEF* PSRTS_g_FB;
|
||||
typedef const SRTS_g_FB DEF* PCSRTS_g_FB;
|
||||
SRTS_g_FB, *PSRTS_g_FB;
|
||||
typedef const SRTS_g_FB *PCSRTS_g_FB;
|
||||
|
||||
|
||||
typedef struct tagSRTS_ab {
|
||||
|
@ -268,8 +268,8 @@ typedef struct tagSRTS_ab {
|
|||
WORD wReserved;
|
||||
SRTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SRTS_ab, DEF* PSRTS_ab;
|
||||
typedef const SRTS_ab DEF* PCSRTS_ab;
|
||||
SRTS_ab, *PSRTS_ab;
|
||||
typedef const SRTS_ab *PCSRTS_ab;
|
||||
|
||||
|
||||
typedef struct tagSRTS_a_FB {
|
||||
|
@ -282,8 +282,8 @@ typedef struct tagSRTS_a_FB {
|
|||
WORD wRTSDuration_f1;
|
||||
SRTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SRTS_a_FB, DEF* PSRTS_a_FB;
|
||||
typedef const SRTS_a_FB DEF* PCSRTS_a_FB;
|
||||
SRTS_a_FB, *PSRTS_a_FB;
|
||||
typedef const SRTS_a_FB *PCSRTS_a_FB;
|
||||
|
||||
|
||||
//
|
||||
|
@ -295,7 +295,7 @@ typedef struct tagSCTSData {
|
|||
BYTE abyRA[U_ETHER_ADDR_LEN];
|
||||
WORD wReserved;
|
||||
}__attribute__ ((__packed__))
|
||||
SCTSData, DEF* PSCTSData;
|
||||
SCTSData, *PSCTSData;
|
||||
|
||||
typedef struct tagSCTS {
|
||||
BYTE bySignalField_b;
|
||||
|
@ -305,8 +305,8 @@ typedef struct tagSCTS {
|
|||
WORD wReserved;
|
||||
SCTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SCTS, DEF* PSCTS;
|
||||
typedef const SCTS DEF* PCSCTS;
|
||||
SCTS, *PSCTS;
|
||||
typedef const SCTS *PCSCTS;
|
||||
|
||||
typedef struct tagSCTS_FB {
|
||||
BYTE bySignalField_b;
|
||||
|
@ -318,8 +318,8 @@ typedef struct tagSCTS_FB {
|
|||
WORD wCTSDuration_ba_f1;
|
||||
SCTSData Data;
|
||||
}__attribute__ ((__packed__))
|
||||
SCTS_FB, DEF* PSCTS_FB;
|
||||
typedef const SCTS_FB DEF* PCSCTS_FB;
|
||||
SCTS_FB, *PSCTS_FB;
|
||||
typedef const SCTS_FB *PCSCTS_FB;
|
||||
|
||||
|
||||
//
|
||||
|
@ -332,15 +332,15 @@ typedef struct tagSTxBufHead {
|
|||
WORD wFragCtl;
|
||||
WORD wReserved;
|
||||
}__attribute__ ((__packed__))
|
||||
STxBufHead, DEF* PSTxBufHead;
|
||||
typedef const STxBufHead DEF* PCSTxBufHead;
|
||||
STxBufHead, *PSTxBufHead;
|
||||
typedef const STxBufHead *PCSTxBufHead;
|
||||
|
||||
typedef struct tagSTxShortBufHead {
|
||||
WORD wFIFOCtl;
|
||||
WORD wTimeStamp;
|
||||
}__attribute__ ((__packed__))
|
||||
STxShortBufHead, DEF* PSTxShortBufHead;
|
||||
typedef const STxShortBufHead DEF* PCSTxShortBufHead;
|
||||
STxShortBufHead, *PSTxShortBufHead;
|
||||
typedef const STxShortBufHead *PCSTxShortBufHead;
|
||||
|
||||
//
|
||||
// Tx data header
|
||||
|
@ -357,8 +357,8 @@ typedef struct tagSTxDataHead_g {
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
}__attribute__ ((__packed__))
|
||||
STxDataHead_g, DEF* PSTxDataHead_g;
|
||||
typedef const STxDataHead_g DEF* PCSTxDataHead_g;
|
||||
STxDataHead_g, *PSTxDataHead_g;
|
||||
typedef const STxDataHead_g *PCSTxDataHead_g;
|
||||
|
||||
typedef struct tagSTxDataHead_g_FB {
|
||||
BYTE bySignalField_b;
|
||||
|
@ -374,8 +374,8 @@ typedef struct tagSTxDataHead_g_FB {
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
}__attribute__ ((__packed__))
|
||||
STxDataHead_g_FB, DEF* PSTxDataHead_g_FB;
|
||||
typedef const STxDataHead_g_FB DEF* PCSTxDataHead_g_FB;
|
||||
STxDataHead_g_FB, *PSTxDataHead_g_FB;
|
||||
typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
|
||||
|
||||
|
||||
typedef struct tagSTxDataHead_ab {
|
||||
|
@ -385,8 +385,8 @@ typedef struct tagSTxDataHead_ab {
|
|||
WORD wDuration;
|
||||
WORD wTimeStampOff;
|
||||
}__attribute__ ((__packed__))
|
||||
STxDataHead_ab, DEF* PSTxDataHead_ab;
|
||||
typedef const STxDataHead_ab DEF* PCSTxDataHead_ab;
|
||||
STxDataHead_ab, *PSTxDataHead_ab;
|
||||
typedef const STxDataHead_ab *PCSTxDataHead_ab;
|
||||
|
||||
|
||||
typedef struct tagSTxDataHead_a_FB {
|
||||
|
@ -398,8 +398,8 @@ typedef struct tagSTxDataHead_a_FB {
|
|||
WORD wDuration_f0;
|
||||
WORD wDuration_f1;
|
||||
}__attribute__ ((__packed__))
|
||||
STxDataHead_a_FB, DEF* PSTxDataHead_a_FB;
|
||||
typedef const STxDataHead_a_FB DEF* PCSTxDataHead_a_FB;
|
||||
STxDataHead_a_FB, *PSTxDataHead_a_FB;
|
||||
typedef const STxDataHead_a_FB *PCSTxDataHead_a_FB;
|
||||
|
||||
//
|
||||
// MICHDR data header
|
||||
|
@ -409,8 +409,8 @@ typedef struct tagSMICHDRHead {
|
|||
DWORD adwHDR1[4];
|
||||
DWORD adwHDR2[4];
|
||||
}__attribute__ ((__packed__))
|
||||
SMICHDRHead, DEF* PSMICHDRHead;
|
||||
typedef const SMICHDRHead DEF* PCSMICHDRHead;
|
||||
SMICHDRHead, *PSMICHDRHead;
|
||||
typedef const SMICHDRHead *PCSMICHDRHead;
|
||||
|
||||
typedef struct tagSBEACONCtl {
|
||||
DWORD BufReady : 1;
|
||||
|
|
|
@ -388,7 +388,7 @@ typedef struct tagSPMKIDCandidateEvent {
|
|||
ULONG Version; // Version of the structure
|
||||
ULONG NumCandidates; // No. of pmkid candidates
|
||||
PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
|
||||
} SPMKIDCandidateEvent, DEF* PSPMKIDCandidateEvent;
|
||||
} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
|
||||
|
||||
//--
|
||||
|
||||
|
@ -400,7 +400,7 @@ typedef struct tagSQuietControl {
|
|||
DWORD dwStartTime;
|
||||
BYTE byPeriod;
|
||||
WORD wDuration;
|
||||
} SQuietControl, DEF* PSQuietControl;
|
||||
} SQuietControl, *PSQuietControl;
|
||||
|
||||
//--
|
||||
|
||||
|
@ -432,7 +432,7 @@ typedef struct tagSDeFragControlBlock
|
|||
PBYTE pbyRxBuffer;
|
||||
UINT cbFrameLength;
|
||||
BOOL bInUse;
|
||||
} SDeFragControlBlock, DEF* PSDeFragControlBlock;
|
||||
} SDeFragControlBlock, *PSDeFragControlBlock;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,46 +29,13 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
#if !defined(__TTYPE_H__)
|
||||
#include "ttype.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef __u8 UINT8, *PUINT8;
|
||||
typedef __u16 UINT16, *PUINT16;
|
||||
typedef __u32 UINT32, *PUINT32;
|
||||
|
||||
|
||||
#ifndef VOID
|
||||
#define VOID void
|
||||
#endif
|
||||
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
|
||||
#ifndef STATIC
|
||||
#define STATIC static
|
||||
#endif
|
||||
|
||||
#ifndef DEF
|
||||
#define DEF
|
||||
#endif
|
||||
|
||||
#ifndef IN
|
||||
#define IN
|
||||
#endif
|
||||
|
||||
#ifndef OUT
|
||||
#define OUT
|
||||
#endif
|
||||
|
||||
typedef
|
||||
struct _version {
|
||||
UINT8 major;
|
||||
UINT8 minor;
|
||||
UINT8 build;
|
||||
unsigned char major;
|
||||
unsigned char minor;
|
||||
unsigned char build;
|
||||
} version_t, *pversion_t;
|
||||
|
||||
#ifndef FALSE
|
||||
|
@ -111,8 +78,6 @@ struct _version {
|
|||
#define PKT_BUF_SZ 2390
|
||||
|
||||
|
||||
#define MALLOC(x,y) kmalloc((x),(y))
|
||||
#define FREE(x) kfree((x))
|
||||
#define MAX_UINTS 8
|
||||
#define OPTION_DEFAULT { [0 ... MAX_UINTS-1] = -1}
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ static BOOL s_bHandleRxEncryption(
|
|||
IN PBYTE pbyRsr,
|
||||
OUT PBYTE pbyNewRsr,
|
||||
OUT PSKeyItem *pKeyOut,
|
||||
OUT PBOOL pbExtIV,
|
||||
int * pbExtIV,
|
||||
OUT PWORD pwRxTSC15_0,
|
||||
OUT PDWORD pdwRxTSC47_16
|
||||
);
|
||||
|
@ -177,7 +177,7 @@ static BOOL s_bHostWepRxEncryption(
|
|||
IN BOOL bOnFly,
|
||||
IN PSKeyItem pKey,
|
||||
OUT PBYTE pbyNewRsr,
|
||||
OUT PBOOL pbExtIV,
|
||||
int * pbExtIV,
|
||||
OUT PWORD pwRxTSC15_0,
|
||||
OUT PDWORD pdwRxTSC47_16
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ static BOOL s_bHandleRxEncryption (
|
|||
IN PBYTE pbyRsr,
|
||||
OUT PBYTE pbyNewRsr,
|
||||
OUT PSKeyItem *pKeyOut,
|
||||
OUT PBOOL pbExtIV,
|
||||
int * pbExtIV,
|
||||
OUT PWORD pwRxTSC15_0,
|
||||
OUT PDWORD pdwRxTSC47_16
|
||||
)
|
||||
|
@ -1334,7 +1334,7 @@ static BOOL s_bHostWepRxEncryption (
|
|||
IN BOOL bOnFly,
|
||||
IN PSKeyItem pKey,
|
||||
OUT PBYTE pbyNewRsr,
|
||||
OUT PBOOL pbExtIV,
|
||||
int * pbExtIV,
|
||||
OUT PWORD pwRxTSC15_0,
|
||||
OUT PDWORD pdwRxTSC47_16
|
||||
)
|
||||
|
|
|
@ -779,7 +779,7 @@ const BYTE abyFirmware[] = {
|
|||
/*--------------------- Export Functions --------------------------*/
|
||||
|
||||
|
||||
BOOLEAN
|
||||
BOOL
|
||||
FIRMWAREbDownload(
|
||||
IN PSDevice pDevice
|
||||
)
|
||||
|
@ -829,7 +829,7 @@ FIRMWAREbDownload(
|
|||
return (TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
BOOL
|
||||
FIRMWAREbBrach2Sram(
|
||||
IN PSDevice pDevice
|
||||
)
|
||||
|
@ -854,7 +854,7 @@ FIRMWAREbBrach2Sram(
|
|||
}
|
||||
|
||||
|
||||
BOOLEAN
|
||||
BOOL
|
||||
FIRMWAREbCheckVersion(
|
||||
IN PSDevice pDevice
|
||||
)
|
||||
|
|
|
@ -65,7 +65,7 @@ typedef struct tagSINTData {
|
|||
BYTE byFCSErr;
|
||||
BYTE abySW[2];
|
||||
}__attribute__ ((__packed__))
|
||||
SINTData, DEF* PSINTData;
|
||||
SINTData, *PSINTData;
|
||||
|
||||
|
||||
/*--------------------- Export Classes ----------------------------*/
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef enum tagWMAC_CMD {
|
|||
WLAN_CMD_ZONETYPE_SET,
|
||||
WLAN_CMD_GET_NODE_LIST
|
||||
|
||||
} WMAC_CMD, DEF* PWMAC_CMD;
|
||||
} WMAC_CMD, *PWMAC_CMD;
|
||||
|
||||
typedef enum tagWZONETYPE {
|
||||
ZoneType_USA=0,
|
||||
|
@ -268,7 +268,7 @@ typedef struct tagSDot11MIBCount {
|
|||
U32 ReceivedFragmentCount;
|
||||
U32 MulticastReceivedFrameCount;
|
||||
U32 FCSErrorCount;
|
||||
} SDot11MIBCount, DEF* PSDot11MIBCount;
|
||||
} SDot11MIBCount, *PSDot11MIBCount;
|
||||
|
||||
|
||||
|
||||
|
@ -375,7 +375,7 @@ typedef struct tagSStatMIBCount {
|
|||
U32 ullTxBroadcastBytes[2];
|
||||
U32 ullTxMulticastBytes[2];
|
||||
U32 ullTxDirectedBytes[2];
|
||||
} SStatMIBCount, DEF* PSStatMIBCount;
|
||||
} SStatMIBCount, *PSStatMIBCount;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,54 +30,14 @@
|
|||
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifndef __init
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
#ifndef __exit
|
||||
#define __exit
|
||||
#endif
|
||||
|
||||
#ifndef __devexit
|
||||
#define __devexit
|
||||
#endif
|
||||
|
||||
#ifndef __devinitdata
|
||||
#define __devinitdata
|
||||
#endif
|
||||
|
||||
#ifndef MODULE_LICENSE
|
||||
#define MODULE_LICENSE(license)
|
||||
#endif
|
||||
|
||||
#ifndef MOD_INC_USE_COUNT
|
||||
#define MOD_INC_USE_COUNT do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef MOD_DEC_USE_COUNT
|
||||
#define MOD_DEC_USE_COUNT do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_NETDEV_PRIV
|
||||
#define netdev_priv(dev) (dev->priv)
|
||||
#endif
|
||||
|
||||
#ifndef IRQ_RETVAL
|
||||
typedef void irqreturn_t;
|
||||
|
||||
|
||||
#define IRQ_RETVAL(x)
|
||||
|
||||
#endif
|
||||
|
||||
#define vntwusb_submit_urb(val) usb_submit_urb(val, GFP_ATOMIC)
|
||||
#define vntwusb_alloc_urb(val) usb_alloc_urb(val, GFP_ATOMIC)
|
||||
|
||||
#define vntwusb_unlink_urb(val) usb_kill_urb(val)
|
||||
|
||||
#ifndef MODULE_LICESEN
|
||||
#define MODULE_LICESEN(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ typedef struct tagSKeyItem
|
|||
BYTE byReserved0;
|
||||
DWORD dwKeyIndex;
|
||||
PVOID pvKeyTable;
|
||||
} SKeyItem, DEF* PSKeyItem; //64
|
||||
} SKeyItem, *PSKeyItem; //64
|
||||
|
||||
typedef struct tagSKeyTable
|
||||
{
|
||||
|
@ -89,12 +89,12 @@ typedef struct tagSKeyTable
|
|||
WORD wKeyCtl;
|
||||
BOOL bSoftWEP;
|
||||
BYTE byReserved1[6];
|
||||
} SKeyTable, DEF* PSKeyTable; //352
|
||||
} SKeyTable, *PSKeyTable; //352
|
||||
|
||||
typedef struct tagSKeyManagement
|
||||
{
|
||||
SKeyTable KeyTable[MAX_KEY_TABLE];
|
||||
} SKeyManagement, DEF* PSKeyManagement;
|
||||
} SKeyManagement, *PSKeyManagement;
|
||||
|
||||
/*--------------------- Export Types ------------------------------*/
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
typedef struct tagSUSBCounter {
|
||||
DWORD dwCrc;
|
||||
|
||||
} SUSBCounter, DEF* PSUSBCounter;
|
||||
} SUSBCounter, *PSUSBCounter;
|
||||
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ typedef struct tagSDot11Counters {
|
|||
// ULONGLONG WEPICVErrorCount;
|
||||
// ULONGLONG DecryptSuccessCount;
|
||||
// ULONGLONG DecryptFailureCount;
|
||||
} SDot11Counters, DEF* PSDot11Counters;
|
||||
} SDot11Counters, *PSDot11Counters;
|
||||
|
||||
|
||||
//
|
||||
|
@ -96,7 +96,7 @@ typedef struct tagSDot11Counters {
|
|||
//
|
||||
typedef struct tagSMib2Counter {
|
||||
LONG ifIndex;
|
||||
TCHAR ifDescr[256]; // max size 255 plus zero ending
|
||||
char ifDescr[256]; // max size 255 plus zero ending
|
||||
// e.g. "interface 1"
|
||||
LONG ifType;
|
||||
LONG ifMtu;
|
||||
|
@ -118,7 +118,7 @@ typedef struct tagSMib2Counter {
|
|||
DWORD ifOutErrors;
|
||||
DWORD ifOutQLen;
|
||||
DWORD ifSpecific;
|
||||
} SMib2Counter, DEF* PSMib2Counter;
|
||||
} SMib2Counter, *PSMib2Counter;
|
||||
|
||||
// Value in the ifType entry
|
||||
//#define ETHERNETCSMACD 6 //
|
||||
|
@ -155,7 +155,7 @@ typedef struct tagSRmonCounter {
|
|||
DWORD etherStatsPkt1024to1518Octets;
|
||||
DWORD etherStatsOwners;
|
||||
DWORD etherStatsStatus;
|
||||
} SRmonCounter, DEF* PSRmonCounter;
|
||||
} SRmonCounter, *PSRmonCounter;
|
||||
|
||||
//
|
||||
// Custom counter
|
||||
|
@ -193,7 +193,7 @@ typedef struct tagSCustomCounters {
|
|||
ULONGLONG ullRsr9MCRCOk;
|
||||
ULONGLONG ullRsr6MCRCOk;
|
||||
|
||||
} SCustomCounters, DEF* PSCustomCounters;
|
||||
} SCustomCounters, *PSCustomCounters;
|
||||
|
||||
|
||||
//
|
||||
|
@ -224,7 +224,7 @@ typedef struct tagSISRCounters {
|
|||
DWORD dwIsrSYNCFlushOK;
|
||||
DWORD dwIsrSTIMER1Int;
|
||||
/////////////////////////////////////
|
||||
} SISRCounters, DEF* PSISRCounters;
|
||||
} SISRCounters, *PSISRCounters;
|
||||
|
||||
|
||||
// Value in the etherStatsStatus entry
|
||||
|
@ -242,7 +242,7 @@ typedef struct tagSTxPktInfo {
|
|||
WORD wLength;
|
||||
WORD wFIFOCtl;
|
||||
BYTE abyDestAddr[U_ETHER_ADDR_LEN];
|
||||
} STxPktInfo, DEF* PSTxPktInfo;
|
||||
} STxPktInfo, *PSTxPktInfo;
|
||||
|
||||
|
||||
#define MAX_RATE 12
|
||||
|
@ -377,7 +377,7 @@ typedef struct tagSStatCounter {
|
|||
ULONG LinkQuality;
|
||||
#endif
|
||||
|
||||
} SStatCounter, DEF* PSStatCounter;
|
||||
} SStatCounter, *PSStatCounter;
|
||||
|
||||
#define NTSTATUS int
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef struct {
|
|||
UINT ux;
|
||||
UINT uy;
|
||||
BYTE abystate[256];
|
||||
} RC4Ext, DEF* PRC4Ext;
|
||||
} RC4Ext, *PRC4Ext;
|
||||
|
||||
VOID rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len);
|
||||
UINT rc4_byte(PRC4Ext pRC4);
|
||||
|
|
|
@ -970,7 +970,7 @@ VOID
|
|||
RFvRSSITodBm (
|
||||
IN PSDevice pDevice,
|
||||
IN BYTE byCurrRSSI,
|
||||
OUT PLONG pldBm
|
||||
long * pldBm
|
||||
)
|
||||
{
|
||||
BYTE byIdx = (((byCurrRSSI & 0xC0) >> 6) & 0x03);
|
||||
|
|
|
@ -87,7 +87,7 @@ VOID
|
|||
RFvRSSITodBm (
|
||||
IN PSDevice pDevice,
|
||||
IN BYTE byCurrRSSI,
|
||||
OUT PLONG pldBm
|
||||
long * pldBm
|
||||
);
|
||||
|
||||
VOID
|
||||
|
|
|
@ -1033,9 +1033,6 @@ s_vFillRTSHead (
|
|||
UINT uRTSFrameLen = 20;
|
||||
WORD wLen = 0x0000;
|
||||
|
||||
// dummy code, only to avoid compiler warning message
|
||||
UNREFERENCED_PARAMETER(bNeedAck);
|
||||
|
||||
if (pvRTS == NULL)
|
||||
return;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ typedef struct tagSRTSDataF {
|
|||
WORD wDurationID;
|
||||
BYTE abyRA[U_ETHER_ADDR_LEN];
|
||||
BYTE abyTA[U_ETHER_ADDR_LEN];
|
||||
} SRTSDataF, DEF* PSRTSDataF;
|
||||
} SRTSDataF, *PSRTSDataF;
|
||||
|
||||
//
|
||||
// CTS buffer header
|
||||
|
@ -63,7 +63,7 @@ typedef struct tagSCTSDataF {
|
|||
WORD wDurationID;
|
||||
BYTE abyRA[U_ETHER_ADDR_LEN];
|
||||
WORD wReserved;
|
||||
} SCTSDataF, DEF* PSCTSDataF;
|
||||
} SCTSDataF, *PSCTSDataF;
|
||||
|
||||
//
|
||||
// MICHDR data header
|
||||
|
@ -72,7 +72,7 @@ typedef struct tagSMICHDR {
|
|||
DWORD adwHDR0[4];
|
||||
DWORD adwHDR1[4];
|
||||
DWORD adwHDR2[4];
|
||||
} SMICHDR, DEF* PSMICHDR;
|
||||
} SMICHDR, *PSMICHDR;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_G_RTS
|
||||
|
@ -110,7 +110,7 @@ typedef struct tagSTX_NAF_G_RTS
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_NAF_G_RTS, DEF* PTX_NAF_G_RTS;
|
||||
} TX_NAF_G_RTS, *PTX_NAF_G_RTS;
|
||||
|
||||
typedef struct tagSTX_NAF_G_RTS_MIC
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ typedef struct tagSTX_NAF_G_RTS_MIC
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_NAF_G_RTS_MIC, DEF* PTX_NAF_G_RTS_MIC;
|
||||
} TX_NAF_G_RTS_MIC, *PTX_NAF_G_RTS_MIC;
|
||||
|
||||
typedef struct tagSTX_NAF_G_CTS
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ typedef struct tagSTX_NAF_G_CTS
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_NAF_G_CTS, DEF* PTX_NAF_G_CTS;
|
||||
} TX_NAF_G_CTS, *PTX_NAF_G_CTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_G_CTS_MIC
|
||||
|
@ -213,7 +213,7 @@ typedef struct tagSTX_NAF_G_CTS_MIC
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_NAF_G_CTS_MIC, DEF* PTX_NAF_G_CTS_MIC;
|
||||
} TX_NAF_G_CTS_MIC, *PTX_NAF_G_CTS_MIC;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_G_BEACON
|
||||
|
@ -237,7 +237,7 @@ typedef struct tagSTX_NAF_G_BEACON
|
|||
WORD wTimeStampOff_a;
|
||||
|
||||
|
||||
} TX_NAF_G_BEACON, DEF* PTX_NAF_G_BEACON;
|
||||
} TX_NAF_G_BEACON, *PTX_NAF_G_BEACON;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_AB_RTS
|
||||
|
@ -262,7 +262,7 @@ typedef struct tagSTX_NAF_AB_RTS
|
|||
WORD wTimeStampOff_ab;
|
||||
|
||||
|
||||
} TX_NAF_AB_RTS, DEF* PTX_NAF_AB_RTS;
|
||||
} TX_NAF_AB_RTS, *PTX_NAF_AB_RTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_AB_RTS_MIC
|
||||
|
@ -289,7 +289,7 @@ typedef struct tagSTX_NAF_AB_RTS_MIC
|
|||
WORD wTimeStampOff_ab;
|
||||
|
||||
|
||||
} TX_NAF_AB_RTS_MIC, DEF* PTX_NAF_AB_RTS_MIC;
|
||||
} TX_NAF_AB_RTS_MIC, *PTX_NAF_AB_RTS_MIC;
|
||||
|
||||
|
||||
|
||||
|
@ -306,7 +306,7 @@ typedef struct tagSTX_NAF_AB_CTS
|
|||
WORD wDuration_ab;
|
||||
WORD wTimeStampOff_ab;
|
||||
|
||||
} TX_NAF_AB_CTS, DEF* PTX_NAF_AB_CTS;
|
||||
} TX_NAF_AB_CTS, *PTX_NAF_AB_CTS;
|
||||
|
||||
typedef struct tagSTX_NAF_AB_CTS_MIC
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ typedef struct tagSTX_NAF_AB_CTS_MIC
|
|||
WORD wDuration_ab;
|
||||
WORD wTimeStampOff_ab;
|
||||
|
||||
} TX_NAF_AB_CTS_MIC, DEF* PTX_NAF_AB_CTS_MIC;
|
||||
} TX_NAF_AB_CTS_MIC, *PTX_NAF_AB_CTS_MIC;
|
||||
|
||||
|
||||
typedef struct tagSTX_NAF_AB_BEACON
|
||||
|
@ -338,7 +338,7 @@ typedef struct tagSTX_NAF_AB_BEACON
|
|||
WORD wDuration_ab;
|
||||
WORD wTimeStampOff_ab;
|
||||
|
||||
} TX_NAF_AB_BEACON, DEF* PTX_NAF_AB_BEACON;
|
||||
} TX_NAF_AB_BEACON, *PTX_NAF_AB_BEACON;
|
||||
|
||||
typedef struct tagSTX_AF_G_RTS
|
||||
{
|
||||
|
@ -381,7 +381,7 @@ typedef struct tagSTX_AF_G_RTS
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_AF_G_RTS, DEF* PTX_AF_G_RTS;
|
||||
} TX_AF_G_RTS, *PTX_AF_G_RTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_AF_G_RTS_MIC
|
||||
|
@ -427,7 +427,7 @@ typedef struct tagSTX_AF_G_RTS_MIC
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_AF_G_RTS_MIC, DEF* PTX_AF_G_RTS_MIC;
|
||||
} TX_AF_G_RTS_MIC, *PTX_AF_G_RTS_MIC;
|
||||
|
||||
|
||||
|
||||
|
@ -463,7 +463,7 @@ typedef struct tagSTX_AF_G_CTS
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_AF_G_CTS, DEF* PTX_AF_G_CTS;
|
||||
} TX_AF_G_CTS, *PTX_AF_G_CTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_AF_G_CTS_MIC
|
||||
|
@ -501,7 +501,7 @@ typedef struct tagSTX_AF_G_CTS_MIC
|
|||
WORD wTimeStampOff_b;
|
||||
WORD wTimeStampOff_a;
|
||||
|
||||
} TX_AF_G_CTS_MIC, DEF* PTX_AF_G_CTS_MIC;
|
||||
} TX_AF_G_CTS_MIC, *PTX_AF_G_CTS_MIC;
|
||||
|
||||
|
||||
|
||||
|
@ -530,7 +530,7 @@ typedef struct tagSTX_AF_A_RTS
|
|||
WORD wDuration_a_f0;
|
||||
WORD wDuration_a_f1;
|
||||
|
||||
} TX_AF_A_RTS, DEF* PTX_AF_A_RTS;
|
||||
} TX_AF_A_RTS, *PTX_AF_A_RTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_AF_A_RTS_MIC
|
||||
|
@ -560,7 +560,7 @@ typedef struct tagSTX_AF_A_RTS_MIC
|
|||
WORD wDuration_a_f0;
|
||||
WORD wDuration_a_f1;
|
||||
|
||||
} TX_AF_A_RTS_MIC, DEF* PTX_AF_A_RTS_MIC;
|
||||
} TX_AF_A_RTS_MIC, *PTX_AF_A_RTS_MIC;
|
||||
|
||||
|
||||
|
||||
|
@ -579,7 +579,7 @@ typedef struct tagSTX_AF_A_CTS
|
|||
WORD wDuration_a_f0;
|
||||
WORD wDuration_a_f1;
|
||||
|
||||
} TX_AF_A_CTS, DEF* PTX_AF_A_CTS;
|
||||
} TX_AF_A_CTS, *PTX_AF_A_CTS;
|
||||
|
||||
|
||||
typedef struct tagSTX_AF_A_CTS_MIC
|
||||
|
@ -599,7 +599,7 @@ typedef struct tagSTX_AF_A_CTS_MIC
|
|||
WORD wDuration_a_f0;
|
||||
WORD wDuration_a_f1;
|
||||
|
||||
} TX_AF_A_CTS_MIC, DEF* PTX_AF_A_CTS_MIC;
|
||||
} TX_AF_A_CTS_MIC, *PTX_AF_A_CTS_MIC;
|
||||
|
||||
|
||||
//
|
||||
|
@ -626,7 +626,7 @@ typedef union tagUTX_BUFFER_CONTAINER
|
|||
TX_AF_A_CTS CTS_A_AutoFB;
|
||||
TX_AF_A_CTS_MIC CTS_A_AutoFB_MIC;
|
||||
|
||||
} TX_BUFFER_CONTAINER, DEF* PTX_BUFFER_CONTAINER;
|
||||
} TX_BUFFER_CONTAINER, *PTX_BUFFER_CONTAINER;
|
||||
|
||||
|
||||
//
|
||||
|
@ -648,7 +648,7 @@ typedef struct tagSTX_BUFFER
|
|||
// Actual message
|
||||
TX_BUFFER_CONTAINER BufferHeader;
|
||||
|
||||
} TX_BUFFER, DEF* PTX_BUFFER;
|
||||
} TX_BUFFER, *PTX_BUFFER;
|
||||
|
||||
|
||||
//
|
||||
|
@ -666,7 +666,7 @@ typedef struct tagSBEACON_BUFFER
|
|||
// Actual message
|
||||
TX_BUFFER_CONTAINER BufferHeader;
|
||||
|
||||
} BEACON_BUFFER, DEF* PBEACON_BUFFER;
|
||||
} BEACON_BUFFER, *PBEACON_BUFFER;
|
||||
|
||||
|
||||
/*--------------------- Export Variables --------------------------*/
|
||||
|
|
|
@ -120,7 +120,7 @@ typedef struct tagSSromReg {
|
|||
|
||||
BYTE abyReserved0[96]; // 0x10 (WORD)
|
||||
BYTE abyCIS[128]; // 0x80 (WORD)
|
||||
} SSromReg, DEF* PSSromReg;
|
||||
} SSromReg, *PSSromReg;
|
||||
|
||||
/*--------------------- Export Macros ------------------------------*/
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ typedef struct tagSEthernetHeader {
|
|||
BYTE abySrcAddr[U_ETHER_ADDR_LEN];
|
||||
WORD wType;
|
||||
}__attribute__ ((__packed__))
|
||||
SEthernetHeader, DEF* PSEthernetHeader;
|
||||
SEthernetHeader, *PSEthernetHeader;
|
||||
|
||||
|
||||
//
|
||||
|
@ -190,7 +190,7 @@ typedef struct tagS802_3Header {
|
|||
BYTE abySrcAddr[U_ETHER_ADDR_LEN];
|
||||
WORD wLen;
|
||||
}__attribute__ ((__packed__))
|
||||
S802_3Header, DEF* PS802_3Header;
|
||||
S802_3Header, *PS802_3Header;
|
||||
|
||||
//
|
||||
// 802_11 packet
|
||||
|
@ -204,7 +204,7 @@ typedef struct tagS802_11Header {
|
|||
WORD wSeqCtl;
|
||||
BYTE abyAddr4[U_ETHER_ADDR_LEN];
|
||||
}__attribute__ ((__packed__))
|
||||
S802_11Header, DEF* PS802_11Header;
|
||||
S802_11Header, *PS802_11Header;
|
||||
|
||||
/*--------------------- Export Macros ------------------------------*/
|
||||
// Frame type macro
|
||||
|
|
|
@ -30,23 +30,10 @@
|
|||
#ifndef __TMACRO_H__
|
||||
#define __TMACRO_H__
|
||||
|
||||
|
||||
#if !defined(__TTYPE_H__)
|
||||
#include "ttype.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/****** Common helper macros ***********************************************/
|
||||
|
||||
#if !defined(LONIBBLE)
|
||||
#define LONIBBLE(b) ((BYTE)(b) & 0x0F)
|
||||
#endif
|
||||
#if !defined(HINIBBLE)
|
||||
#define HINIBBLE(b) ((BYTE)(((WORD)(b) >> 4) & 0x0F))
|
||||
#endif
|
||||
|
||||
#if !defined(LOBYTE)
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#endif
|
||||
|
@ -66,82 +53,12 @@
|
|||
|
||||
|
||||
|
||||
#if !defined(MAKEBYTE)
|
||||
#define MAKEBYTE(ln, hn) ((BYTE)(((BYTE)(ln) & 0x0F) | ((BYTE)(hn) << 4)))
|
||||
#endif
|
||||
#if !defined(MAKEWORD)
|
||||
#define MAKEWORD(lb, hb) ((WORD)(((BYTE)(lb)) | (((WORD)((BYTE)(hb))) << 8)))
|
||||
#endif
|
||||
#if !defined(MAKEDWORD)
|
||||
#define MAKEDWORD(lw, hw) ((DWORD)(((WORD)(lw)) | (((DWORD)((WORD)(hw))) << 16)))
|
||||
#endif
|
||||
#if !defined(MAKEQWORD)
|
||||
#define MAKEQWORD(ld, hd, pq) {pq->u.dwLowDword = ld; pq->u.dwHighDword = hd;}
|
||||
#endif
|
||||
|
||||
#if !defined(MAKELONG)
|
||||
#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Bytes Reverse: big endian to little endian convert
|
||||
#if !defined(REVWORD)
|
||||
#define REVWORD(w) ((WORD)( ((WORD)(w) >> 8) | ((WORD)(w) << 8) ))
|
||||
#endif
|
||||
#if !defined(REVDWORD)
|
||||
#define REVDWORD(d) (MAKEDWORD(MAKEWORD(HIBYTE(HIWORD(d)),LOBYTE(HIWORD(d))),MAKEWORD(HIBYTE(LOWORD(d)),LOBYTE(LOWORD(d)))))
|
||||
#endif
|
||||
|
||||
/* map to known network names */
|
||||
/*
|
||||
#define ntohs(x) REVWORD(x)
|
||||
#define ntohl(x) REVDWORD(x)
|
||||
#define htons(x) REVWORD(x)
|
||||
#define htonl(x) REVDWORD(x)
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
#ifndef NOMINMAX
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#endif // NOMINMAX
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/****** Misc macros ********************************************************/
|
||||
|
||||
/* string equality shorthand */
|
||||
#define STR_EQ(x, y) (strcmp(x, y) == 0)
|
||||
#define STR_NE(x, y) (strcmp(x, y) != 0)
|
||||
|
||||
|
||||
// calculate element # of array
|
||||
#define ELEMENT_NUM(array) (sizeof(array) / sizeof(array[0]))
|
||||
//#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
|
||||
// null statement
|
||||
#define NULL_FUNC()
|
||||
|
||||
|
||||
/* Since not all compilers support structure assignment, the ASSIGN()
|
||||
* macro is used. This controls how it's actually implemented.
|
||||
*/
|
||||
#ifdef NOSTRUCTASSIGN /* Version for old compilers that don't support it */
|
||||
#define ASSIGN(a,b) memcpy((char *)&(a),(char *)&(b),sizeof(b);
|
||||
#else /* Version for compilers that do */
|
||||
#define ASSIGN(a,b) ((a) = (b))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __TMACRO_H__
|
||||
|
||||
|
|
|
@ -37,14 +37,6 @@
|
|||
#define VOID void
|
||||
#endif
|
||||
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
|
||||
#ifndef STATIC
|
||||
#define STATIC static
|
||||
#endif
|
||||
|
||||
#ifndef IN
|
||||
#define IN
|
||||
#endif
|
||||
|
@ -71,12 +63,7 @@
|
|||
#define Adhoc_STA
|
||||
#endif
|
||||
|
||||
#if! defined(__CPU8051)
|
||||
typedef int BOOL;
|
||||
typedef int BOOLEAN;
|
||||
#else // __CPU8051
|
||||
#define BOOL int
|
||||
#endif // __CPU8051
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE 1
|
||||
|
@ -89,9 +76,6 @@ typedef int BOOLEAN;
|
|||
#if !defined(SUCCESS)
|
||||
#define SUCCESS 0
|
||||
#endif
|
||||
#if !defined(FAILED)
|
||||
#define FAILED -1
|
||||
#endif
|
||||
|
||||
//2007-0809-01<Add>by MikeLiu
|
||||
#ifndef update_BssList
|
||||
|
@ -108,28 +92,18 @@ typedef int BOOLEAN;
|
|||
|
||||
/****** Simple typedefs ***************************************************/
|
||||
|
||||
#if! defined(__CPU8051)
|
||||
|
||||
/* These lines assume that your compiler's longs are 32 bits and
|
||||
* shorts are 16 bits. It is already assumed that chars are 8 bits,
|
||||
* but it doesn't matter if they're signed or unsigned.
|
||||
*/
|
||||
|
||||
typedef signed char I8; /* 8-bit signed integer */
|
||||
typedef signed short I16; /* 16-bit signed integer */
|
||||
typedef signed long I32; /* 32-bit signed integer */
|
||||
|
||||
typedef unsigned char U8; /* 8-bit unsigned integer */
|
||||
typedef unsigned short U16; /* 16-bit unsigned integer */
|
||||
typedef unsigned long U32; /* 32-bit unsigned integer */
|
||||
|
||||
|
||||
#if defined(__WIN32)
|
||||
typedef signed __int64 I64; /* 64-bit signed integer */
|
||||
typedef unsigned __int64 U64; /* 64-bit unsigned integer */
|
||||
#endif // __WIN32
|
||||
|
||||
|
||||
typedef char CHAR;
|
||||
typedef signed short SHORT;
|
||||
typedef signed int INT;
|
||||
|
@ -140,7 +114,6 @@ typedef unsigned short USHORT;
|
|||
typedef unsigned int UINT;
|
||||
typedef unsigned long ULONG;
|
||||
typedef unsigned long long ULONGLONG; //64 bit
|
||||
typedef unsigned long long ULONGULONG;
|
||||
|
||||
|
||||
|
||||
|
@ -161,169 +134,23 @@ typedef union tagUQuadWord {
|
|||
typedef UQuadWord QWORD; // 64-bit
|
||||
|
||||
|
||||
|
||||
#ifndef _TCHAR_DEFINED
|
||||
typedef char TCHAR;
|
||||
typedef char* PTCHAR;
|
||||
typedef unsigned char TBYTE;
|
||||
typedef unsigned char* PTBYTE;
|
||||
#define _TCHAR_DEFINED
|
||||
#endif
|
||||
|
||||
#else // __CPU8051
|
||||
|
||||
#define U8 unsigned char
|
||||
#define U16 unsigned short
|
||||
#define U32 unsigned long
|
||||
|
||||
#define USHORT unsigned short
|
||||
#define UINT unsigned int
|
||||
|
||||
#define BYTE unsigned char
|
||||
#define WORD unsigned short
|
||||
#define DWORD unsigned long
|
||||
|
||||
|
||||
#endif // __CPU8051
|
||||
|
||||
|
||||
// maybe this should be defined in <limits.h>
|
||||
#define U8_MAX 0xFFU
|
||||
#define U16_MAX 0xFFFFU
|
||||
#define U32_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define BYTE_MAX 0xFFU
|
||||
#define WORD_MAX 0xFFFFU
|
||||
#define DWORD_MAX 0xFFFFFFFFUL
|
||||
|
||||
|
||||
|
||||
|
||||
/******* 32-bit vs. 16-bit definitions and typedefs ************************/
|
||||
|
||||
#if !defined(NULL)
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif // __cplusplus
|
||||
#endif // !NULL
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__WIN32) || defined(__CPU8051)
|
||||
|
||||
#if !defined(FAR)
|
||||
#define FAR
|
||||
#endif
|
||||
#if !defined(NEAR)
|
||||
#define NEAR
|
||||
#endif
|
||||
#if !defined(DEF)
|
||||
#define DEF
|
||||
#endif
|
||||
#if !defined(CALLBACK)
|
||||
#define CALLBACK
|
||||
#endif
|
||||
|
||||
#else // !__WIN32__
|
||||
|
||||
#if !defined(FAR)
|
||||
#define FAR
|
||||
#endif
|
||||
#if !defined(NEAR)
|
||||
#define NEAR
|
||||
#endif
|
||||
#if !defined(DEF)
|
||||
// default pointer type is FAR, if you want near pointer just redefine it to NEAR
|
||||
#define DEF
|
||||
#endif
|
||||
#if !defined(CALLBACK)
|
||||
#define CALLBACK
|
||||
#endif
|
||||
|
||||
#endif // !__WIN32__
|
||||
|
||||
|
||||
|
||||
|
||||
/****** Common pointer types ***********************************************/
|
||||
|
||||
#if! defined(__CPU8051)
|
||||
|
||||
typedef signed char DEF* PI8;
|
||||
typedef signed short DEF* PI16;
|
||||
typedef signed long DEF* PI32;
|
||||
|
||||
typedef unsigned char DEF* PU8;
|
||||
typedef unsigned short DEF* PU16;
|
||||
typedef unsigned long DEF* PU32;
|
||||
|
||||
#if defined(__WIN32)
|
||||
typedef signed __int64 DEF* PI64;
|
||||
typedef unsigned __int64 DEF* PU64;
|
||||
#endif // __WIN32
|
||||
|
||||
#if !defined(_WIN64)
|
||||
typedef unsigned long ULONG_PTR; // 32-bit
|
||||
typedef unsigned long DWORD_PTR; // 32-bit
|
||||
#endif // _WIN64
|
||||
|
||||
|
||||
// boolean pointer
|
||||
typedef int DEF* PBOOL;
|
||||
typedef int NEAR* NPBOOL;
|
||||
typedef int FAR* LPBOOL;
|
||||
typedef unsigned int * PUINT;
|
||||
|
||||
typedef int DEF* PINT;
|
||||
typedef int NEAR* NPINT;
|
||||
typedef int FAR* LPINT;
|
||||
typedef const int DEF* PCINT;
|
||||
typedef const int NEAR* NPCINT;
|
||||
typedef const int FAR* LPCINT;
|
||||
typedef BYTE * PBYTE;
|
||||
|
||||
typedef unsigned int DEF* PUINT;
|
||||
typedef const unsigned int DEF* PCUINT;
|
||||
typedef WORD * PWORD;
|
||||
|
||||
typedef long DEF* PLONG;
|
||||
typedef long NEAR* NPLONG;
|
||||
typedef long FAR* LPLONG;
|
||||
//typedef const long DEF* PCLONG;
|
||||
typedef const long NEAR* NPCLONG;
|
||||
typedef const long FAR* LPCLONG;
|
||||
typedef DWORD * PDWORD;
|
||||
|
||||
typedef BYTE DEF* PBYTE;
|
||||
typedef BYTE NEAR* NPBYTE;
|
||||
typedef BYTE FAR* LPBYTE;
|
||||
typedef const BYTE DEF* PCBYTE;
|
||||
typedef const BYTE NEAR* NPCBYTE;
|
||||
typedef const BYTE FAR* LPCBYTE;
|
||||
typedef QWORD * PQWORD;
|
||||
|
||||
typedef WORD DEF* PWORD;
|
||||
typedef WORD NEAR* NPWORD;
|
||||
typedef WORD FAR* LPWORD;
|
||||
typedef const WORD DEF* PCWORD;
|
||||
typedef const WORD NEAR* NPCWORD;
|
||||
typedef const WORD FAR* LPCWORD;
|
||||
|
||||
typedef DWORD DEF* PDWORD;
|
||||
typedef DWORD NEAR* NPDWORD;
|
||||
typedef DWORD FAR* LPDWORD;
|
||||
typedef const DWORD DEF* PCDWORD;
|
||||
typedef const DWORD NEAR* NPCDWORD;
|
||||
typedef const DWORD FAR* LPCDWORD;
|
||||
|
||||
typedef QWORD DEF* PQWORD;
|
||||
typedef QWORD NEAR* NPQWORD;
|
||||
typedef QWORD FAR* LPQWORD;
|
||||
typedef const QWORD DEF* PCQWORD;
|
||||
typedef const QWORD NEAR* NPCQWORD;
|
||||
typedef const QWORD FAR* LPCQWORD;
|
||||
|
||||
typedef void DEF* PVOID;
|
||||
typedef void NEAR* NPVOID;
|
||||
typedef void FAR* LPVOID;
|
||||
typedef void * PVOID;
|
||||
|
||||
// handle declaration
|
||||
#ifdef STRICT
|
||||
|
@ -332,68 +159,4 @@ typedef void *HANDLE;
|
|||
typedef PVOID HANDLE;
|
||||
#endif
|
||||
|
||||
//
|
||||
// ANSI (Single-byte Character) types
|
||||
//
|
||||
typedef char DEF* PCH;
|
||||
typedef char NEAR* NPCH;
|
||||
typedef char FAR* LPCH;
|
||||
typedef const char DEF* PCCH;
|
||||
typedef const char NEAR* NPCCH;
|
||||
typedef const char FAR* LPCCH;
|
||||
|
||||
typedef char DEF* PSTR;
|
||||
typedef char NEAR* NPSTR;
|
||||
typedef char FAR* LPSTR;
|
||||
typedef const char DEF* PCSTR;
|
||||
typedef const char NEAR* NPCSTR;
|
||||
typedef const char FAR* LPCSTR;
|
||||
|
||||
#endif // !__CPU8051
|
||||
|
||||
|
||||
|
||||
|
||||
/****** Misc definitions, types ********************************************/
|
||||
|
||||
// parameter prefix
|
||||
#ifndef IN
|
||||
#define IN
|
||||
#endif
|
||||
|
||||
#ifndef OUT
|
||||
#define OUT
|
||||
#endif
|
||||
|
||||
|
||||
// unreferenced parameter macro to avoid warning message in MS C
|
||||
#if defined(__TURBOC__)
|
||||
|
||||
//you should use "#pragma argsused" to avoid warning message in Borland C
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
#define UNREFERENCED_PARAMETER(x)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
//#define UNREFERENCED_PARAMETER(x) x
|
||||
#define UNREFERENCED_PARAMETER(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// in-line assembly prefix
|
||||
#if defined(__TURBOC__)
|
||||
#define ASM asm
|
||||
#else // !__TURBOC__
|
||||
#define ASM _asm
|
||||
#endif // !__TURBOC__
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __TTYPE_H__
|
||||
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ s_nsBulkInUsbIoCompleteRead(
|
|||
PRCB pRCB = (PRCB)urb->context;
|
||||
PSDevice pDevice = (PSDevice)pRCB->pDevice;
|
||||
ULONG bytesRead;
|
||||
BOOLEAN bIndicateReceive = FALSE;
|
||||
BOOL bIndicateReceive = FALSE;
|
||||
BOOL bReAllocSkb = FALSE;
|
||||
NTSTATUS status;
|
||||
|
||||
|
|
|
@ -1265,7 +1265,7 @@ BOOL bScheduleCommand (
|
|||
break;
|
||||
|
||||
case WLAN_CMD_DISASSOCIATE:
|
||||
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((PBOOL)pbyItem0);
|
||||
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((int *)pbyItem0);
|
||||
break;
|
||||
/*
|
||||
case WLAN_CMD_DEAUTH:
|
||||
|
@ -1274,7 +1274,7 @@ BOOL bScheduleCommand (
|
|||
*/
|
||||
|
||||
case WLAN_CMD_RADIO:
|
||||
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((PBOOL)pbyItem0);
|
||||
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -64,7 +64,7 @@ typedef enum tagCMD_CODE {
|
|||
WLAN_CMD_MAC_DISPOWERSAVING,
|
||||
WLAN_CMD_11H_CHSW,
|
||||
WLAN_CMD_RUN_AP
|
||||
} CMD_CODE, DEF* PCMD_CODE;
|
||||
} CMD_CODE, *PCMD_CODE;
|
||||
|
||||
#define CMD_Q_SIZE 32
|
||||
|
||||
|
@ -76,7 +76,7 @@ typedef enum tagCMD_STATUS {
|
|||
CMD_STATUS_TIMEOUT,
|
||||
CMD_STATUS_PENDING
|
||||
|
||||
} CMD_STATUS, DEF* PCMD_STATUS;
|
||||
} CMD_STATUS, *PCMD_STATUS;
|
||||
|
||||
typedef struct tagCMD_ITEM {
|
||||
CMD_CODE eCmd;
|
||||
|
@ -85,7 +85,7 @@ typedef struct tagCMD_ITEM {
|
|||
BOOL bRadioCmd;
|
||||
BOOL bForceSCAN;
|
||||
WORD wDeAuthenReason;
|
||||
} CMD_ITEM, DEF* PCMD_ITEM;
|
||||
} CMD_ITEM, *PCMD_ITEM;
|
||||
|
||||
// Command state
|
||||
typedef enum tagCMD_STATE {
|
||||
|
@ -109,7 +109,7 @@ typedef enum tagCMD_STATE {
|
|||
WLAN_CMD_MAC_DISPOWERSAVING_START,
|
||||
WLAN_CMD_11H_CHSW_START,
|
||||
WLAN_CMD_IDLE
|
||||
} CMD_STATE, DEF* PCMD_STATE;
|
||||
} CMD_STATE, *PCMD_STATE;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ typedef struct tagSAssocInfo {
|
|||
// store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION
|
||||
ULONG RequestIELength;
|
||||
BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN];
|
||||
} SAssocInfo, DEF* PSAssocInfo;
|
||||
} SAssocInfo, *PSAssocInfo;
|
||||
//---
|
||||
|
||||
|
||||
|
@ -242,7 +242,7 @@ typedef struct tagSTxMgmtPacket {
|
|||
UINT cbMPDULen;
|
||||
UINT cbPayloadLen;
|
||||
|
||||
} STxMgmtPacket, DEF* PSTxMgmtPacket;
|
||||
} STxMgmtPacket, *PSTxMgmtPacket;
|
||||
|
||||
|
||||
// Rx Managment Packet descriptor
|
||||
|
@ -257,7 +257,7 @@ typedef struct tagSRxMgmtPacket {
|
|||
BYTE byRxRate;
|
||||
BYTE byRxChannel;
|
||||
|
||||
} SRxMgmtPacket, DEF* PSRxMgmtPacket;
|
||||
} SRxMgmtPacket, *PSRxMgmtPacket;
|
||||
|
||||
|
||||
|
||||
|
@ -416,7 +416,7 @@ typedef struct tagSMgmtObject
|
|||
|
||||
struct sk_buff skb;
|
||||
|
||||
} SMgmtObject, DEF *PSMgmtObject;
|
||||
} SMgmtObject, *PSMgmtObject;
|
||||
|
||||
|
||||
/*--------------------- Export Macros ------------------------------*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче