-
-
/*+
*
* Routine Description:
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)
BYTE abyIEs[1024]; // don't move this field !!
}__attribute__ ((__packed__))
-KnownBSS , DEF* PKnownBSS;
+KnownBSS , *PKnownBSS;
//2006-1116-01,<Add> by NomadZhao
#pragma pack()
UINT uTxFail[MAX_RATE+1];
UINT uTimeCount;
-} KnownNodeDB, DEF* PKnownNodeDB;
+} KnownNodeDB, *PKnownNodeDB;
/*--------------------- Export Functions --------------------------*/
UINT uFrequency;
BOOL bValid;
BYTE byMAP;
-}SChannelTblElement, DEF* PSChannelTblElement;
+}SChannelTblElement, *PSChannelTblElement;
//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
static BYTE abyDefaultSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
CHAR chCountryCode[2];
BYTE bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */
BYTE byPower[CB_MAX_CHANNEL];
-} SCountryTable, DEF* PSCountryTable;
+} SCountryTable, *PSCountryTable;
/*--------------------- Export Classes ----------------------------*/
volatile PDEVICE_RD_INFO pRDInfo;//4 bytes
volatile U32 Reserved[2];//8 bytes
} __attribute__ ((__packed__))
-SRxDesc, DEF* PSRxDesc;
-typedef const SRxDesc DEF* PCSRxDesc;
+SRxDesc, *PSRxDesc;
+typedef const SRxDesc *PCSRxDesc;
#ifdef __BIG_ENDIAN
volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
volatile U32 Reserved[2];//8 bytes
} __attribute__ ((__packed__))
-STxDesc, DEF* PSTxDesc;
-typedef const STxDesc DEF* PCSTxDesc;
+STxDesc, *PSTxDesc;
+typedef const STxDesc *PCSTxDesc;
typedef struct tagSTxSyncDesc {
volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
volatile DWORD m_dwReserved2;
} __attribute__ ((__packed__))
-STxSyncDesc, DEF* PSTxSyncDesc;
-typedef const STxSyncDesc DEF* PCSTxSyncDesc;
+STxSyncDesc, *PSTxSyncDesc;
+typedef const STxSyncDesc *PCSTxSyncDesc;
//
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;
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
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;
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 {
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 {
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 {
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;
//
BYTE abyRA[U_ETHER_ADDR_LEN];
WORD wReserved;
}__attribute__ ((__packed__))
-SCTSData, DEF* PSCTSData;
+SCTSData, *PSCTSData;
typedef struct tagSCTS {
BYTE bySignalField_b;
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;
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;
//
BYTE byTxPower;
BYTE 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
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;
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 {
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 {
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
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;
ULONG Version; // Version of the structure
ULONG NumCandidates; // No. of pmkid candidates
PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
-} SPMKIDCandidateEvent, DEF* PSPMKIDCandidateEvent;
+} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
//--
DWORD dwStartTime;
BYTE byPeriod;
WORD wDuration;
-} SQuietControl, DEF* PSQuietControl;
+} SQuietControl, *PSQuietControl;
//--
typedef struct __chip_info_tbl{
PBYTE pbyRxBuffer;
UINT cbFrameLength;
BOOL bInUse;
-} SDeFragControlBlock, DEF* PSDeFragControlBlock;
+} SDeFragControlBlock, *PSDeFragControlBlock;
//#include <linux/config.h>
#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
#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}
}
static void
-device_set_bool_opt(PU32 opt, int val,BOOL def,U32 flag, char* name,char* devname) {
+device_set_bool_opt(unsigned int *opt, int val,BOOL def,U32 flag, char* name,char* devname) {
(*opt)&=(~flag);
if (val==-1)
*opt|=(def ? flag : 0);
pRDInfo->skb->dev = pDevice->dev;
pRDInfo->skb_dma = pci_map_single(pDevice->pcid, skb_tail_pointer(pRDInfo->skb),
pDevice->rx_buf_sz, PCI_DMA_FROMDEVICE);
- *((PU32) &(pRD->m_rd0RD0)) = 0;
+ *((unsigned int *) &(pRD->m_rd0RD0)) = 0; /* FIX cast */
pRD->m_rd0RD0.wResCount = cpu_to_le16(pDevice->rx_buf_sz);
pRD->m_rd0RD0.f1Owner = OWNED_BY_NIC;
IN PBYTE pbyRsr,
OUT PBYTE pbyNewRsr,
OUT PSKeyItem *pKeyOut,
- OUT PBOOL pbExtIV,
+ int * pbExtIV,
OUT PWORD pwRxTSC15_0,
OUT PDWORD pdwRxTSC47_16
);
IN BOOL bOnFly,
IN PSKeyItem pKey,
OUT PBYTE pbyNewRsr,
- OUT PBOOL pbExtIV,
+ int * pbExtIV,
OUT PWORD pwRxTSC15_0,
OUT PDWORD pdwRxTSC47_16
IN PBYTE pbyRsr,
OUT PBYTE pbyNewRsr,
OUT PSKeyItem *pKeyOut,
- OUT PBOOL pbExtIV,
+ int * pbExtIV,
OUT PWORD pwRxTSC15_0,
OUT PDWORD pdwRxTSC47_16
)
IN BOOL bOnFly,
IN PSKeyItem pKey,
OUT PBYTE pbyNewRsr,
- OUT PBOOL pbExtIV,
+ int * pbExtIV,
OUT PWORD pwRxTSC15_0,
OUT PDWORD pdwRxTSC47_16
)
WLAN_CMD_ZONETYPE_SET,
WLAN_CMD_GET_NODE_LIST
-} WMAC_CMD, DEF* PWMAC_CMD;
+} WMAC_CMD, *PWMAC_CMD;
typedef enum tagWZONETYPE {
ZoneType_USA=0,
U32 ReceivedFragmentCount;
U32 MulticastReceivedFrameCount;
U32 FCSErrorCount;
-} SDot11MIBCount, DEF* PSDot11MIBCount;
+} SDot11MIBCount, *PSDot11MIBCount;
U32 ullTxBroadcastBytes[2];
U32 ullTxMulticastBytes[2];
U32 ullTxDirectedBytes[2];
-} SStatMIBCount, DEF* PSStatMIBCount;
+} SStatMIBCount, *PSStatMIBCount;
typedef struct tagSNodeItem {
#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
-
-
-#ifndef MODULE_LICESEN
-#define MODULE_LICESEN(x)
-#endif
-
#endif
BYTE byReserved0;
DWORD dwKeyIndex;
PVOID pvKeyTable;
-} SKeyItem, DEF* PSKeyItem; //64
+} SKeyItem, *PSKeyItem; //64
typedef struct tagSKeyTable
{
WORD wKeyCtl; // for address of wKeyCtl at align 4
BYTE byReserved1[6];
-} SKeyTable, DEF* PSKeyTable; //348
+} SKeyTable, *PSKeyTable; //348
typedef struct tagSKeyManagement
{
SKeyTable KeyTable[MAX_KEY_TABLE];
-} SKeyManagement, DEF* PSKeyManagement;
+} SKeyManagement, * PSKeyManagement;
/*--------------------- Export Types ------------------------------*/
// ULONGLONG WEPICVErrorCount;
// ULONGLONG DecryptSuccessCount;
// ULONGLONG DecryptFailureCount;
-} SDot11Counters, DEF* PSDot11Counters;
+} SDot11Counters, *PSDot11Counters;
//
//
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;
DWORD ifOutErrors;
DWORD ifOutQLen;
DWORD ifSpecific;
-} SMib2Counter, DEF* PSMib2Counter;
+} SMib2Counter, *PSMib2Counter;
// Value in the ifType entry
//#define ETHERNETCSMACD 6 //
DWORD etherStatsPkt1024to1518Octets;
DWORD etherStatsOwners;
DWORD etherStatsStatus;
-} SRmonCounter, DEF* PSRmonCounter;
+} SRmonCounter, *PSRmonCounter;
//
// Custom counter
ULONGLONG ullRsr9MCRCOk;
ULONGLONG ullRsr6MCRCOk;
-} SCustomCounters, DEF* PSCustomCounters;
+} SCustomCounters, *PSCustomCounters;
//
DWORD dwIsrSYNCFlushOK;
DWORD dwIsrSTIMER1Int;
/////////////////////////////////////
-} SISRCounters, DEF* PSISRCounters;
+} SISRCounters, *PSISRCounters;
// Value in the etherStatsStatus entry
ULONG SignalStren;
ULONG LinkQuality;
#endif
-} SStatCounter, DEF* PSStatCounter;
+} SStatCounter, *PSStatCounter;
/*--------------------- Export Classes ----------------------------*/
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);
RFvRSSITodBm (
IN PSDevice pDevice,
IN BYTE byCurrRSSI,
- OUT PLONG pldBm
+ long * pldBm
)
{
BYTE byIdx = (((byCurrRSSI & 0xC0) >> 6) & 0x03);
RFvRSSITodBm(
IN PSDevice pDevice,
IN BYTE byCurrRSSI,
- OUT PLONG pldBm
+ long *pldBm
);
//{{ RobertYu: 20050104
UINT uRTSFrameLen = 20;
WORD wLen = 0x0000;
- // dummy code, only to avoid compiler warning message
- UNREFERENCED_PARAMETER(bNeedAck);
-
if (pvRTS == NULL)
return;
BYTE abyReserved0[96]; // 0x10 (WORD)
BYTE abyCIS[128]; // 0x80 (WORD)
-} SSromReg, DEF* PSSromReg;
+} SSromReg, *PSSromReg;
/*--------------------- Export Macros ------------------------------*/
BYTE abySrcAddr[U_ETHER_ADDR_LEN];
WORD wType;
}__attribute__ ((__packed__))
-SEthernetHeader, DEF* PSEthernetHeader;
+SEthernetHeader, *PSEthernetHeader;
//
BYTE abySrcAddr[U_ETHER_ADDR_LEN];
WORD wLen;
}__attribute__ ((__packed__))
-S802_3Header, DEF* PS802_3Header;
+S802_3Header, *PS802_3Header;
//
// 802_11 packet
WORD wSeqCtl;
BYTE abyAddr4[U_ETHER_ADDR_LEN];
}__attribute__ ((__packed__))
-S802_11Header, DEF* PS802_11Header;
+S802_11Header, *PS802_11Header;
/*--------------------- Export Macros ------------------------------*/
// Frame type macro
#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
#define LODWORD(q) ((q).u.dwLowDword)
#define HIDWORD(q) ((q).u.dwHighDword)
-
-
-#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__
#define VOID void
#endif
-#ifndef CONST
-#define CONST const
-#endif
-
-#ifndef STATIC
-#define STATIC static
-#endif
-
#ifndef IN
#define IN
#endif
#ifndef TxInSleep
#define TxInSleep
#endif
-#if! defined(__CPU8051)
+
typedef int BOOL;
-#else // __CPU8051
-#define BOOL int
-#endif // __CPU8051
#if !defined(TRUE)
#define TRUE 1
#if !defined(SUCCESS)
#define SUCCESS 0
#endif
-#if !defined(FAILED)
-#define FAILED -1
-#endif
//2007-0809-01<Add>by MikeLiu
#ifndef update_BssList
/****** 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;
typedef unsigned int UINT;
typedef unsigned long ULONG;
typedef unsigned long long ULONGLONG; //64 bit
-typedef unsigned long long ULONGULONG;
} UQuadWord;
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 unsigned long ULONG_PTR; // 32-bit
+typedef unsigned long DWORD_PTR; // 32-bit
-typedef signed char DEF* PI8;
-typedef signed short DEF* PI16;
-typedef signed long DEF* PI32;
+// boolean pointer
+typedef unsigned int * PUINT;
-typedef unsigned char DEF* PU8;
-typedef unsigned short DEF* PU16;
-typedef unsigned long DEF* PU32;
+typedef BYTE * PBYTE;
-#if defined(__WIN32)
-typedef signed __int64 DEF* PI64;
-typedef unsigned __int64 DEF* PU64;
-#endif // __WIN32
+typedef WORD * PWORD;
-#if !defined(_WIN64)
-typedef unsigned long ULONG_PTR; // 32-bit
-typedef unsigned long DWORD_PTR; // 32-bit
-#endif // _WIN64
+typedef DWORD * PDWORD;
+typedef QWORD * PQWORD;
-// boolean pointer
-typedef int DEF* PBOOL;
-typedef int NEAR* NPBOOL;
-typedef int FAR* LPBOOL;
-
-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 unsigned int DEF* PUINT;
-typedef const unsigned int DEF* PCUINT;
-
-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 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 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
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__
-
-
break;
case WLAN_CMD_DISASSOCIATE:
- pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((PBOOL)pbyItem0);
+ pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((int *)pbyItem0);
break;
/*
case WLAN_CMD_DEAUTH:
break;
case WLAN_CMD_RADIO:
- pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((PBOOL)pbyItem0);
+ pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
break;
case WLAN_CMD_CHANGE_BBSENSITIVITY:
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
CMD_STATUS_TIMEOUT,
CMD_STATUS_PENDING
-} CMD_STATUS, DEF* PCMD_STATUS;
+} CMD_STATUS, *PCMD_STATUS;
typedef struct tagCMD_ITEM {
WORD wDeAuthenReason;
BOOL bRadioCmd;
BOOL bForceSCAN;
-} CMD_ITEM, DEF* PCMD_ITEM;
+} CMD_ITEM, *PCMD_ITEM;
// Command state
typedef enum tagCMD_STATE {
WLAN_CMD_RADIO_START,
WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE,
WLAN_CMD_IDLE
-} CMD_STATE, DEF* PCMD_STATE;
+} CMD_STATE, *PCMD_STATE;
// store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION
ULONG RequestIELength;
BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN];
-} SAssocInfo, DEF* PSAssocInfo;
+} SAssocInfo, *PSAssocInfo;
//---
UINT cbMPDULen;
UINT cbPayloadLen;
-} STxMgmtPacket, DEF* PSTxMgmtPacket;
+} STxMgmtPacket, *PSTxMgmtPacket;
// Rx Managment Packet descriptor
BYTE byRxRate;
BYTE byRxChannel;
-} SRxMgmtPacket, DEF* PSRxMgmtPacket;
+} SRxMgmtPacket, *PSRxMgmtPacket;
struct sk_buff skb;
-} SMgmtObject, DEF *PSMgmtObject;
+} SMgmtObject, *PSMgmtObject;
/*--------------------- Export Macros ------------------------------*/