|
@@ -31,7 +31,7 @@
|
|
|
|
|
|
#include "ttype.h"
|
|
|
|
|
|
-// ioctl Command code
|
|
|
+/* ioctl Command code */
|
|
|
#define MAGIC_CODE 0x3142
|
|
|
#define IOCTL_CMD_TEST (SIOCDEVPRIVATE + 0)
|
|
|
#define IOCTL_CMD_SET (SIOCDEVPRIVATE + 1)
|
|
@@ -88,9 +88,7 @@ typedef enum tagWZONETYPE {
|
|
|
#define WEP_104BIT_LEN 13
|
|
|
#define WEP_232BIT_LEN 16
|
|
|
|
|
|
-// Ioctl interface structure
|
|
|
-// Command structure
|
|
|
-//
|
|
|
+/* Ioctl interface structure, Command structure */
|
|
|
#pragma pack(1)
|
|
|
typedef struct tagSCmdRequest {
|
|
|
u8 name[16];
|
|
@@ -99,18 +97,12 @@ typedef struct tagSCmdRequest {
|
|
|
u16 wCmdCode;
|
|
|
} SCmdRequest, *PSCmdRequest;
|
|
|
|
|
|
-//
|
|
|
-// Scan
|
|
|
-//
|
|
|
-
|
|
|
+/* Scan */
|
|
|
typedef struct tagSCmdScan {
|
|
|
u8 ssid[SSID_MAXLEN + 2];
|
|
|
} SCmdScan, *PSCmdScan;
|
|
|
|
|
|
-//
|
|
|
-// BSS Join
|
|
|
-//
|
|
|
-
|
|
|
+/* BSS Join */
|
|
|
typedef struct tagSCmdBSSJoin {
|
|
|
u16 wBSSType;
|
|
|
u16 wBBPType;
|
|
@@ -120,10 +112,7 @@ typedef struct tagSCmdBSSJoin {
|
|
|
bool bShareKeyAuth;
|
|
|
} SCmdBSSJoin, *PSCmdBSSJoin;
|
|
|
|
|
|
-//
|
|
|
-// Zonetype Setting
|
|
|
-//
|
|
|
-
|
|
|
+/* Zonetype Setting */
|
|
|
typedef struct tagSCmdZoneTypeSet {
|
|
|
bool bWrite;
|
|
|
WZONETYPE ZoneType;
|
|
@@ -163,7 +152,7 @@ typedef struct tagSBSSIDItem {
|
|
|
u8 abySSID[SSID_MAXLEN + 1];
|
|
|
u8 byNetType;
|
|
|
u16 wBeaconInterval;
|
|
|
- u16 wCapInfo; // for address of byNetType at align 4
|
|
|
+ u16 wCapInfo; /* for address of byNetType at align 4 */
|
|
|
|
|
|
bool bWEPOn;
|
|
|
u32 uRSSI;
|
|
@@ -184,9 +173,7 @@ typedef struct tagSCmdLinkStatus {
|
|
|
u32 uLinkRate;
|
|
|
} SCmdLinkStatus, *PSCmdLinkStatus;
|
|
|
|
|
|
-//
|
|
|
-// 802.11 counter
|
|
|
-//
|
|
|
+/* 802.11 counter */
|
|
|
typedef struct tagSDot11MIBCount {
|
|
|
u32 TransmittedFragmentCount;
|
|
|
u32 MulticastTransmittedFrameCount;
|
|
@@ -202,13 +189,9 @@ typedef struct tagSDot11MIBCount {
|
|
|
u32 FCSErrorCount;
|
|
|
} SDot11MIBCount, *PSDot11MIBCount;
|
|
|
|
|
|
-//
|
|
|
-// statistic counter
|
|
|
-//
|
|
|
+/* statistic counter */
|
|
|
typedef struct tagSStatMIBCount {
|
|
|
- //
|
|
|
- // ISR status count
|
|
|
- //
|
|
|
+ /* ISR status count */
|
|
|
u32 dwIsrTx0OK;
|
|
|
u32 dwIsrTx1OK;
|
|
|
u32 dwIsrBeaconTxOK;
|
|
@@ -221,8 +204,7 @@ typedef struct tagSStatMIBCount {
|
|
|
|
|
|
u32 dwIsrUnknown;
|
|
|
|
|
|
- // RSR status count
|
|
|
- //
|
|
|
+ /* RSR status count */
|
|
|
u32 dwRsrFrmAlgnErr;
|
|
|
u32 dwRsrErr;
|
|
|
u32 dwRsrCRCErr;
|
|
@@ -243,10 +225,10 @@ typedef struct tagSStatMIBCount {
|
|
|
u32 dwRsrBroadcast;
|
|
|
u32 dwRsrMulticast;
|
|
|
u32 dwRsrDirected;
|
|
|
- // 64-bit OID
|
|
|
+ /* 64-bit OID */
|
|
|
u32 ullRsrOK;
|
|
|
|
|
|
- // for some optional OIDs (64 bits) and DMI support
|
|
|
+ /* for some optional OIDs (64 bits) and DMI support */
|
|
|
u32 ullRxBroadcastBytes;
|
|
|
u32 ullRxMulticastBytes;
|
|
|
u32 ullRxDirectedBytes;
|
|
@@ -262,13 +244,12 @@ typedef struct tagSStatMIBCount {
|
|
|
u32 dwRsrRxFrmLen512_1023;
|
|
|
u32 dwRsrRxFrmLen1024_1518;
|
|
|
|
|
|
- // TSR0,1 status count
|
|
|
- //
|
|
|
- u32 dwTsrTotalRetry[2]; // total collision retry count
|
|
|
- u32 dwTsrOnceRetry[2]; // this packet only occur one collision
|
|
|
- u32 dwTsrMoreThanOnceRetry[2]; // this packet occur more than one collision
|
|
|
- u32 dwTsrRetry[2]; // this packet has ever occur collision,
|
|
|
- // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
|
|
|
+ /* TSR0,1 status count */
|
|
|
+ u32 dwTsrTotalRetry[2]; /* total collision retry count */
|
|
|
+ u32 dwTsrOnceRetry[2]; /* this packet only occur one collision */
|
|
|
+ u32 dwTsrMoreThanOnceRetry[2]; /* this packet occur more than one collision */
|
|
|
+ u32 dwTsrRetry[2]; /* this packet has ever occur collision */
|
|
|
+ /* that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0) */
|
|
|
u32 dwTsrACKData[2];
|
|
|
u32 dwTsrErr[2];
|
|
|
u32 dwAllTsrOK[2];
|
|
@@ -281,23 +262,23 @@ typedef struct tagSStatMIBCount {
|
|
|
u32 dwTsrMulticast[2];
|
|
|
u32 dwTsrDirected[2];
|
|
|
|
|
|
- // RD/TD count
|
|
|
+ /* RD/TD count */
|
|
|
u32 dwCntRxFrmLength;
|
|
|
u32 dwCntTxBufLength;
|
|
|
|
|
|
u8 abyCntRxPattern[16];
|
|
|
u8 abyCntTxPattern[16];
|
|
|
|
|
|
- // Software check....
|
|
|
- u32 dwCntRxDataErr; // rx buffer data software compare CRC err count
|
|
|
- u32 dwCntDecryptErr; // rx buffer data software compare CRC err count
|
|
|
- u32 dwCntRxICVErr; // rx buffer data software compare CRC err count
|
|
|
- u32 idxRxErrorDesc; // index for rx data error RD
|
|
|
+ /* Software check */
|
|
|
+ u32 dwCntRxDataErr; /* rx buffer data software compare CRC err count */
|
|
|
+ u32 dwCntDecryptErr; /* rx buffer data software compare CRC err count */
|
|
|
+ u32 dwCntRxICVErr; /* rx buffer data software compare CRC err count */
|
|
|
+ u32 idxRxErrorDesc; /* index for rx data error RD */
|
|
|
|
|
|
- // 64-bit OID
|
|
|
+ /* 64-bit OID */
|
|
|
u32 ullTsrOK[2];
|
|
|
|
|
|
- // for some optional OIDs (64 bits) and DMI support
|
|
|
+ /* for some optional OIDs (64 bits) and DMI support */
|
|
|
u32 ullTxBroadcastFrames[2];
|
|
|
u32 ullTxMulticastFrames[2];
|
|
|
u32 ullTxDirectedFrames[2];
|
|
@@ -307,7 +288,7 @@ typedef struct tagSStatMIBCount {
|
|
|
} SStatMIBCount, *PSStatMIBCount;
|
|
|
|
|
|
typedef struct tagSNodeItem {
|
|
|
- // STA info
|
|
|
+ /* STA info */
|
|
|
u16 wAID;
|
|
|
u8 abyMACAddr[6];
|
|
|
u16 wTxDataRate;
|
|
@@ -318,7 +299,7 @@ typedef struct tagSNodeItem {
|
|
|
u8 byKeyIndex;
|
|
|
u16 wWepKeyLength;
|
|
|
u8 abyWepKey[WEP_KEYMAXLEN];
|
|
|
- // Auto rate fallback vars
|
|
|
+ /* Auto rate fallback vars */
|
|
|
bool bIsInFallback;
|
|
|
u32 uTxFailures;
|
|
|
u32 uTxAttempts;
|
|
@@ -334,10 +315,7 @@ typedef struct tagSCmdValue {
|
|
|
u32 dwValue;
|
|
|
} SCmdValue, *PSCmdValue;
|
|
|
|
|
|
-//
|
|
|
-// hostapd & viawget ioctl related
|
|
|
-//
|
|
|
-
|
|
|
+/* hostapd & viawget ioctl related */
|
|
|
enum {
|
|
|
VIAWGET_HOSTAPD_FLUSH = 1,
|
|
|
VIAWGET_HOSTAPD_ADD_STA = 2,
|
|
@@ -356,7 +334,7 @@ enum {
|
|
|
#define VIAWGET_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
|
|
|
((int)(&((struct viawget_hostapd_param *)0)->u.generic_elem.data))
|
|
|
|
|
|
-// Maximum length for algorithm names (-1 for nul termination) used in ioctl()
|
|
|
+/*Maximum length for algorithm names (-1 for nul termination) used in ioctl()*/
|
|
|
|
|
|
struct viawget_hostapd_param {
|
|
|
u32 cmd;
|
|
@@ -405,4 +383,4 @@ struct viawget_hostapd_param {
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
-#endif //__IOCMD_H__
|
|
|
+#endif /* __IOCMD_H__ */
|