diff options
author | Andres More <more.andres@gmail.com> | 2013-02-26 01:32:51 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-11 16:18:46 (GMT) |
commit | b902fbfebf2c80c3782e41eda24b487964a47fd1 (patch) | |
tree | 618fc5d478aa7b8d0b206c83fc93f490e44ffbe2 /drivers | |
parent | 175c51259cbb56e03e620f8ddfd95b8b62427eea (diff) | |
download | linux-b902fbfebf2c80c3782e41eda24b487964a47fd1.tar.xz |
staging: vt6656: replaced custom BYTE definition with u8
Checkpatch findings were not resolved, only direct replacement.
sed -i 's/\bBYTE\b/u8/g' drivers/staging/vt6656/*.[ch]
sed -i 's/\bPBYTE\b/u8 */g' drivers/staging/vt6656/*.[ch]
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
54 files changed, 874 insertions, 877 deletions
diff --git a/drivers/staging/vt6656/80211hdr.h b/drivers/staging/vt6656/80211hdr.h index b87d543..6d181bb 100644 --- a/drivers/staging/vt6656/80211hdr.h +++ b/drivers/staging/vt6656/80211hdr.h @@ -269,15 +269,15 @@ #define WLAN_MGMT_GET_TIM_OFFSET(b) (((b) & ~BIT0) >> 1) /* 3-Addr & 4-Addr */ -#define WLAN_HDR_A3_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR3_LEN) -#define WLAN_HDR_A4_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR4_LEN) +#define WLAN_HDR_A3_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR3_LEN) +#define WLAN_HDR_A4_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR4_LEN) /* IEEE ADDR */ #define IEEE_ADDR_UNIVERSAL 0x02 #define IEEE_ADDR_GROUP 0x01 typedef struct { - BYTE abyAddr[6]; + u8 abyAddr[6]; } IEEE_ADDR, *PIEEE_ADDR; /* 802.11 Header Format */ @@ -286,8 +286,8 @@ typedef struct tagWLAN_80211HDR_A2 { WORD wFrameCtl; WORD wDurationID; - BYTE abyAddr1[WLAN_ADDR_LEN]; - BYTE abyAddr2[WLAN_ADDR_LEN]; + u8 abyAddr1[WLAN_ADDR_LEN]; + u8 abyAddr2[WLAN_ADDR_LEN]; } __attribute__ ((__packed__)) WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; @@ -296,9 +296,9 @@ typedef struct tagWLAN_80211HDR_A3 { WORD wFrameCtl; WORD wDurationID; - BYTE abyAddr1[WLAN_ADDR_LEN]; - BYTE abyAddr2[WLAN_ADDR_LEN]; - BYTE abyAddr3[WLAN_ADDR_LEN]; + u8 abyAddr1[WLAN_ADDR_LEN]; + u8 abyAddr2[WLAN_ADDR_LEN]; + u8 abyAddr3[WLAN_ADDR_LEN]; WORD wSeqCtl; } __attribute__ ((__packed__)) @@ -308,11 +308,11 @@ typedef struct tagWLAN_80211HDR_A4 { WORD wFrameCtl; WORD wDurationID; - BYTE abyAddr1[WLAN_ADDR_LEN]; - BYTE abyAddr2[WLAN_ADDR_LEN]; - BYTE abyAddr3[WLAN_ADDR_LEN]; + u8 abyAddr1[WLAN_ADDR_LEN]; + u8 abyAddr2[WLAN_ADDR_LEN]; + u8 abyAddr3[WLAN_ADDR_LEN]; WORD wSeqCtl; - BYTE abyAddr4[WLAN_ADDR_LEN]; + u8 abyAddr4[WLAN_ADDR_LEN]; } __attribute__ ((__packed__)) WLAN_80211HDR_A4, *PWLAN_80211HDR_A4; diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c index 534d490..b494453 100644 --- a/drivers/staging/vt6656/80211mgr.c +++ b/drivers/staging/vt6656/80211mgr.c @@ -141,9 +141,9 @@ vMgrDecodeBeacon( + WLAN_BEACON_OFF_CAPINFO); /* Information elements */ - pItem = (PWLAN_IE)((PBYTE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))) + pItem = (PWLAN_IE)((u8 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))) + WLAN_BEACON_OFF_SSID); - while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) { + while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) { switch (pItem->byElementID) { case WLAN_EID_SSID: @@ -224,7 +224,7 @@ vMgrDecodeBeacon( break; } - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); } } @@ -376,7 +376,7 @@ vMgrDecodeAssocRequest( pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_SSID); - while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) { + while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) { switch (pItem->byElementID) { case WLAN_EID_SSID: if (pFrame->pSSID == NULL) @@ -407,7 +407,7 @@ vMgrDecodeAssocRequest( pItem->byElementID); break; } - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); } } @@ -474,9 +474,9 @@ vMgrDecodeAssocResponse( + WLAN_ASSOCRESP_OFF_SUPP_RATES); pItem = (PWLAN_IE)(pFrame->pSuppRates); - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); - if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) { + if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) { pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem); } else @@ -545,7 +545,7 @@ vMgrDecodeReassocRequest( pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_SSID); - while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) { + while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) { switch (pItem->byElementID) { case WLAN_EID_SSID: @@ -576,7 +576,7 @@ vMgrDecodeReassocRequest( pItem->byElementID); break; } - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); } } @@ -626,7 +626,7 @@ vMgrDecodeProbeRequest( /* Information elements */ pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))); - while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) { + while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) { switch (pItem->byElementID) { case WLAN_EID_SSID: @@ -649,7 +649,7 @@ vMgrDecodeProbeRequest( break; } - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); } } @@ -722,7 +722,7 @@ vMgrDecodeProbeResponse( pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_SSID); - while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) { + while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) { switch (pItem->byElementID) { case WLAN_EID_SSID: if (pFrame->pSSID == NULL) @@ -796,7 +796,7 @@ vMgrDecodeProbeResponse( break; } - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); } } @@ -862,7 +862,7 @@ vMgrDecodeAuthen( pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_CHALLENGE); - if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE)) + if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE)) pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem; } @@ -980,8 +980,8 @@ vMgrDecodeReassocResponse( + WLAN_REASSOCRESP_OFF_SUPP_RATES); pItem = (PWLAN_IE)(pFrame->pSuppRates); - pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len); + pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len); - if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) + if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem; } diff --git a/drivers/staging/vt6656/80211mgr.h b/drivers/staging/vt6656/80211mgr.h index f8e16d8..2a88f0c 100644 --- a/drivers/staging/vt6656/80211mgr.h +++ b/drivers/staging/vt6656/80211mgr.h @@ -223,56 +223,56 @@ #pragma pack(1) typedef struct tagWLAN_IE { - BYTE byElementID; - BYTE len; + u8 byElementID; + u8 len; } __attribute__ ((__packed__)) WLAN_IE, *PWLAN_IE; /* Service Set IDentity (SSID) */ #pragma pack(1) typedef struct tagWLAN_IE_SSID { - BYTE byElementID; - BYTE len; - BYTE abySSID[1]; + u8 byElementID; + u8 len; + u8 abySSID[1]; } __attribute__ ((__packed__)) WLAN_IE_SSID, *PWLAN_IE_SSID; /* Supported Rates */ #pragma pack(1) typedef struct tagWLAN_IE_SUPP_RATES { - BYTE byElementID; - BYTE len; - BYTE abyRates[1]; + u8 byElementID; + u8 len; + u8 abyRates[1]; } __attribute__ ((__packed__)) WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES; /* FH Parameter Set */ #pragma pack(1) typedef struct _WLAN_IE_FH_PARMS { - BYTE byElementID; - BYTE len; + u8 byElementID; + u8 len; WORD wDwellTime; - BYTE byHopSet; - BYTE byHopPattern; - BYTE byHopIndex; + u8 byHopSet; + u8 byHopPattern; + u8 byHopIndex; } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS; /* DS Parameter Set */ #pragma pack(1) typedef struct tagWLAN_IE_DS_PARMS { - BYTE byElementID; - BYTE len; - BYTE byCurrChannel; + u8 byElementID; + u8 len; + u8 byCurrChannel; } __attribute__ ((__packed__)) WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS; /* CF Parameter Set */ #pragma pack(1) typedef struct tagWLAN_IE_CF_PARMS { - BYTE byElementID; - BYTE len; - BYTE byCFPCount; - BYTE byCFPPeriod; + u8 byElementID; + u8 len; + u8 byCFPCount; + u8 byCFPPeriod; WORD wCFPMaxDuration; WORD wCFPDurRemaining; } __attribute__ ((__packed__)) @@ -281,20 +281,20 @@ WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS; /* TIM */ #pragma pack(1) typedef struct tagWLAN_IE_TIM { - BYTE byElementID; - BYTE len; - BYTE byDTIMCount; - BYTE byDTIMPeriod; - BYTE byBitMapCtl; - BYTE byVirtBitMap[1]; + u8 byElementID; + u8 len; + u8 byDTIMCount; + u8 byDTIMPeriod; + u8 byBitMapCtl; + u8 byVirtBitMap[1]; } __attribute__ ((__packed__)) WLAN_IE_TIM, *PWLAN_IE_TIM; /* IBSS Parameter Set */ #pragma pack(1) typedef struct tagWLAN_IE_IBSS_PARMS { - BYTE byElementID; - BYTE len; + u8 byElementID; + u8 len; WORD wATIMWindow; } __attribute__ ((__packed__)) WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS; @@ -302,22 +302,22 @@ WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS; /* Challenge Text */ #pragma pack(1) typedef struct tagWLAN_IE_CHALLENGE { - BYTE byElementID; - BYTE len; - BYTE abyChallenge[1]; + u8 byElementID; + u8 len; + u8 abyChallenge[1]; } __attribute__ ((__packed__)) WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE; #pragma pack(1) typedef struct tagWLAN_IE_RSN_EXT { - BYTE byElementID; - BYTE len; - BYTE abyOUI[4]; + u8 byElementID; + u8 len; + u8 abyOUI[4]; WORD wVersion; - BYTE abyMulticast[4]; + u8 abyMulticast[4]; WORD wPKCount; struct { - BYTE abyOUI[4]; + u8 abyOUI[4]; } PKSList[1]; /* the rest is variable so need to overlay ieauth structure */ } WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT; @@ -326,79 +326,79 @@ typedef struct tagWLAN_IE_RSN_EXT { typedef struct tagWLAN_IE_RSN_AUTH { WORD wAuthCount; struct { - BYTE abyOUI[4]; + u8 abyOUI[4]; } AuthKSList[1]; } WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH; /* RSN Identity */ #pragma pack(1) typedef struct tagWLAN_IE_RSN { - BYTE byElementID; - BYTE len; + u8 byElementID; + u8 len; WORD wVersion; - BYTE abyRSN[WLAN_MIN_ARRAY]; + u8 abyRSN[WLAN_MIN_ARRAY]; } WLAN_IE_RSN, *PWLAN_IE_RSN; /* CCX Identity DavidWang */ #pragma pack(1) typedef struct tagWLAN_IE_CCX { -BYTE byElementID; -BYTE len; -BYTE abyCCX[30]; +u8 byElementID; +u8 len; +u8 abyCCX[30]; } WLAN_IE_CCX, *PWLAN_IE_CCX; #pragma pack(1) typedef struct tagWLAN_IE_CCX_IP { -BYTE byElementID; -BYTE len; -BYTE abyCCXOUI[4]; -BYTE abyCCXIP[4]; -BYTE abyCCXREV[2]; +u8 byElementID; +u8 len; +u8 abyCCXOUI[4]; +u8 abyCCXIP[4]; +u8 abyCCXREV[2]; } WLAN_IE_CCX_IP, *PWLAN_IE_CCX_IP; #pragma pack(1) typedef struct tagWLAN_IE_CCX_Ver { -BYTE byElementID; -BYTE len; -BYTE abyCCXVer[5]; +u8 byElementID; +u8 len; +u8 abyCCXVer[5]; } WLAN_IE_CCX_Ver, *PWLAN_IE_CCX_Ver; /* ERP */ #pragma pack(1) typedef struct tagWLAN_IE_ERP { - BYTE byElementID; - BYTE len; - BYTE byContext; + u8 byElementID; + u8 len; + u8 byContext; } __attribute__ ((__packed__)) WLAN_IE_ERP, *PWLAN_IE_ERP; #pragma pack(1) typedef struct _MEASEURE_REQ { - BYTE byChannel; - BYTE abyStartTime[8]; - BYTE abyDuration[2]; + u8 byChannel; + u8 abyStartTime[8]; + u8 abyDuration[2]; } MEASEURE_REQ, *PMEASEURE_REQ, MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC, MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA, MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI; typedef struct _MEASEURE_REP_BASIC { - BYTE byChannel; - BYTE abyStartTime[8]; - BYTE abyDuration[2]; - BYTE byMap; + u8 byChannel; + u8 abyStartTime[8]; + u8 abyDuration[2]; + u8 byMap; } MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC; typedef struct _MEASEURE_REP_CCA { - BYTE byChannel; - BYTE abyStartTime[8]; - BYTE abyDuration[2]; - BYTE byCCABusyFraction; + u8 byChannel; + u8 abyStartTime[8]; + u8 abyDuration[2]; + u8 byCCABusyFraction; } MEASEURE_REP_CCA, *PMEASEURE_REP_CCA; typedef struct _MEASEURE_REP_RPI { - BYTE byChannel; - BYTE abyStartTime[8]; - BYTE abyDuration[2]; - BYTE abyRPIdensity[8]; + u8 byChannel; + u8 abyStartTime[8]; + u8 abyDuration[2]; + u8 abyRPIdensity[8]; } MEASEURE_REP_RPI, *PMEASEURE_REP_RPI; typedef union _MEASEURE_REP { @@ -410,85 +410,85 @@ typedef union _MEASEURE_REP { } MEASEURE_REP, *PMEASEURE_REP; typedef struct _WLAN_IE_MEASURE_REQ { - BYTE byElementID; - BYTE len; - BYTE byToken; - BYTE byMode; - BYTE byType; + u8 byElementID; + u8 len; + u8 byToken; + u8 byMode; + u8 byType; MEASEURE_REQ sReq; } WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ; typedef struct _WLAN_IE_MEASURE_REP { - BYTE byElementID; - BYTE len; - BYTE byToken; - BYTE byMode; - BYTE byType; + u8 byElementID; + u8 len; + u8 byToken; + u8 byMode; + u8 byType; MEASEURE_REP sRep; } WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP; typedef struct _WLAN_IE_CH_SW { - BYTE byElementID; - BYTE len; - BYTE byMode; - BYTE byChannel; - BYTE byCount; + u8 byElementID; + u8 len; + u8 byMode; + u8 byChannel; + u8 byCount; } WLAN_IE_CH_SW, *PWLAN_IE_CH_SW; typedef struct _WLAN_IE_QUIET { - BYTE byElementID; - BYTE len; - BYTE byQuietCount; - BYTE byQuietPeriod; - BYTE abyQuietDuration[2]; - BYTE abyQuietOffset[2]; + u8 byElementID; + u8 len; + u8 byQuietCount; + u8 byQuietPeriod; + u8 abyQuietDuration[2]; + u8 abyQuietOffset[2]; } WLAN_IE_QUIET, *PWLAN_IE_QUIET; typedef struct _WLAN_IE_COUNTRY { - BYTE byElementID; - BYTE len; - BYTE abyCountryString[3]; - BYTE abyCountryInfo[3]; + u8 byElementID; + u8 len; + u8 abyCountryString[3]; + u8 abyCountryInfo[3]; } WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY; typedef struct _WLAN_IE_PW_CONST { - BYTE byElementID; - BYTE len; - BYTE byPower; + u8 byElementID; + u8 len; + u8 byPower; } WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST; typedef struct _WLAN_IE_PW_CAP { - BYTE byElementID; - BYTE len; - BYTE byMinPower; - BYTE byMaxPower; + u8 byElementID; + u8 len; + u8 byMinPower; + u8 byMaxPower; } WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP; typedef struct _WLAN_IE_SUPP_CH { - BYTE byElementID; - BYTE len; - BYTE abyChannelTuple[2]; + u8 byElementID; + u8 len; + u8 abyChannelTuple[2]; } WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH; typedef struct _WLAN_IE_TPC_REQ { - BYTE byElementID; - BYTE len; + u8 byElementID; + u8 len; } WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ; typedef struct _WLAN_IE_TPC_REP { - BYTE byElementID; - BYTE len; - BYTE byTxPower; - BYTE byLinkMargin; + u8 byElementID; + u8 len; + u8 byTxPower; + u8 byLinkMargin; } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP; typedef struct _WLAN_IE_IBSS_DFS { - BYTE byElementID; - BYTE len; - BYTE abyDFSOwner[6]; - BYTE byDFSRecovery; - BYTE abyChannelMap[2]; + u8 byElementID; + u8 len; + u8 abyDFSOwner[6]; + u8 byDFSRecovery; + u8 abyChannelMap[2]; } WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS; #pragma pack() @@ -500,7 +500,7 @@ typedef struct tagWLAN_FR_MGMT { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; } WLAN_FR_MGMT, *PWLAN_FR_MGMT; @@ -510,7 +510,7 @@ typedef struct tagWLAN_FR_BEACON { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ u64 *pqwTimestamp; @@ -541,7 +541,7 @@ typedef struct tagWLAN_FR_IBSSATIM { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ @@ -555,7 +555,7 @@ typedef struct tagWLAN_FR_DISASSOC { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwReason; @@ -568,7 +568,7 @@ typedef struct tagWLAN_FR_ASSOCREQ { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwCapInfo; @@ -592,7 +592,7 @@ typedef struct tagWLAN_FR_ASSOCRESP { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwCapInfo; @@ -609,7 +609,7 @@ typedef struct tagWLAN_FR_REASSOCREQ { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ @@ -634,7 +634,7 @@ typedef struct tagWLAN_FR_REASSOCRESP { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwCapInfo; @@ -651,7 +651,7 @@ typedef struct tagWLAN_FR_PROBEREQ { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ /* info elements */ @@ -666,7 +666,7 @@ typedef struct tagWLAN_FR_PROBERESP { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ u64 *pqwTimestamp; @@ -695,7 +695,7 @@ typedef struct tagWLAN_FR_AUTHEN { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwAuthAlgorithm; @@ -711,7 +711,7 @@ typedef struct tagWLAN_FR_DEAUTHEN { unsigned int uType; unsigned int len; - PBYTE pBuf; + u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ PWORD pwReason; diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c index fb6124d..688e613 100644 --- a/drivers/staging/vt6656/aes_ccmp.c +++ b/drivers/staging/vt6656/aes_ccmp.c @@ -43,7 +43,7 @@ * SBOX Table */ -BYTE sbox_table[256] = { +u8 sbox_table[256] = { 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, @@ -62,7 +62,7 @@ BYTE sbox_table[256] = { 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 }; -BYTE dot2_table[256] = { +u8 dot2_table[256] = { 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, @@ -81,7 +81,7 @@ BYTE dot2_table[256] = { 0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5 }; -BYTE dot3_table[256] = { +u8 dot3_table[256] = { 0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, @@ -106,7 +106,7 @@ BYTE dot3_table[256] = { /*--------------------- Export Functions --------------------------*/ -static void xor_128(BYTE *a, BYTE *b, BYTE *out) +static void xor_128(u8 *a, u8 *b, u8 *out) { PDWORD dwPtrA = (PDWORD) a; PDWORD dwPtrB = (PDWORD) b; @@ -119,7 +119,7 @@ static void xor_128(BYTE *a, BYTE *b, BYTE *out) } -static void xor_32(BYTE *a, BYTE *b, BYTE *out) +static void xor_32(u8 *a, u8 *b, u8 *out) { PDWORD dwPtrA = (PDWORD) a; PDWORD dwPtrB = (PDWORD) b; @@ -128,10 +128,10 @@ static void xor_32(BYTE *a, BYTE *b, BYTE *out) (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); } -void AddRoundKey(BYTE *key, int round) +void AddRoundKey(u8 *key, int round) { - BYTE sbox_key[4]; - BYTE rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36}; + u8 sbox_key[4]; + u8 rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36}; sbox_key[0] = sbox_table[key[13]]; sbox_key[1] = sbox_table[key[14]]; @@ -146,7 +146,7 @@ void AddRoundKey(BYTE *key, int round) xor_32(&key[12], &key[8], &key[12]); } -void SubBytes(BYTE *in, BYTE *out) +void SubBytes(u8 *in, u8 *out) { int i; @@ -154,7 +154,7 @@ void SubBytes(BYTE *in, BYTE *out) out[i] = sbox_table[in[i]]; } -void ShiftRows(BYTE *in, BYTE *out) +void ShiftRows(u8 *in, u8 *out) { out[0] = in[0]; out[1] = in[5]; @@ -174,7 +174,7 @@ void ShiftRows(BYTE *in, BYTE *out) out[15] = in[11]; } -void MixColumns(BYTE *in, BYTE *out) +void MixColumns(u8 *in, u8 *out) { out[0] = dot2_table[in[0]] ^ dot3_table[in[1]] ^ in[2] ^ in[3]; @@ -183,13 +183,13 @@ void MixColumns(BYTE *in, BYTE *out) out[3] = dot3_table[in[0]] ^ in[1] ^ in[2] ^ dot2_table[in[3]]; } -void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext) +void AESv128(u8 *key, u8 *data, u8 *ciphertext) { int i; int round; - BYTE TmpdataA[16]; - BYTE TmpdataB[16]; - BYTE abyRoundKey[16]; + u8 TmpdataA[16]; + u8 TmpdataB[16]; + u8 abyRoundKey[16]; for (i = 0; i < 16; i++) abyRoundKey[i] = key[i]; @@ -231,26 +231,26 @@ void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext) * */ -bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) +bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize) { - BYTE abyNonce[13]; - BYTE MIC_IV[16]; - BYTE MIC_HDR1[16]; - BYTE MIC_HDR2[16]; - BYTE abyMIC[16]; - BYTE abyCTRPLD[16]; - BYTE abyTmp[16]; - BYTE abyPlainText[16]; - BYTE abyLastCipher[16]; + u8 abyNonce[13]; + u8 MIC_IV[16]; + u8 MIC_HDR1[16]; + u8 MIC_HDR2[16]; + u8 abyMIC[16]; + u8 abyCTRPLD[16]; + u8 abyTmp[16]; + u8 abyPlainText[16]; + u8 abyLastCipher[16]; PS802_11Header pMACHeader = (PS802_11Header) pbyFrame; - PBYTE pbyIV; - PBYTE pbyPayload; + u8 * pbyIV; + u8 * pbyPayload; WORD wHLen = 22; /* 8 is IV, 8 is MIC, 4 is CRC */ WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN; bool bA4 = false; - BYTE byTmp; + u8 byTmp; WORD wCnt; int ii, jj, kk; @@ -276,15 +276,15 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) /* MIC_IV */ MIC_IV[0] = 0x59; memcpy(&(MIC_IV[1]), &(abyNonce[0]), 13); - MIC_IV[14] = (BYTE)(wPayloadSize >> 8); - MIC_IV[15] = (BYTE)(wPayloadSize & 0xff); + MIC_IV[14] = (u8)(wPayloadSize >> 8); + MIC_IV[15] = (u8)(wPayloadSize & 0xff); /* MIC_HDR1 */ - MIC_HDR1[0] = (BYTE)(wHLen >> 8); - MIC_HDR1[1] = (BYTE)(wHLen & 0xff); - byTmp = (BYTE)(pMACHeader->wFrameCtl & 0xff); + MIC_HDR1[0] = (u8)(wHLen >> 8); + MIC_HDR1[1] = (u8)(wHLen & 0xff); + byTmp = (u8)(pMACHeader->wFrameCtl & 0xff); MIC_HDR1[2] = byTmp & 0x8f; - byTmp = (BYTE)(pMACHeader->wFrameCtl >> 8); + byTmp = (u8)(pMACHeader->wFrameCtl >> 8); byTmp &= 0x87; MIC_HDR1[3] = byTmp | 0x40; memcpy(&(MIC_HDR1[4]), pMACHeader->abyAddr1, ETH_ALEN); @@ -292,7 +292,7 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) /* MIC_HDR2 */ memcpy(&(MIC_HDR2[0]), pMACHeader->abyAddr3, ETH_ALEN); - byTmp = (BYTE)(pMACHeader->wSeqCtl & 0xff); + byTmp = (u8)(pMACHeader->wSeqCtl & 0xff); MIC_HDR2[6] = byTmp & 0x0f; MIC_HDR2[7] = 0; @@ -326,8 +326,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) for (jj = wPayloadSize; jj > 16; jj = jj-16) { - abyCTRPLD[14] = (BYTE) (wCnt >> 8); - abyCTRPLD[15] = (BYTE) (wCnt & 0xff); + abyCTRPLD[14] = (u8) (wCnt >> 8); + abyCTRPLD[15] = (u8) (wCnt & 0xff); AESv128(pbyRxKey, abyCTRPLD, abyTmp); @@ -349,8 +349,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) for (ii = jj; ii < 16; ii++) abyLastCipher[ii] = 0x00; - abyCTRPLD[14] = (BYTE) (wCnt >> 8); - abyCTRPLD[15] = (BYTE) (wCnt & 0xff); + abyCTRPLD[14] = (u8) (wCnt >> 8); + abyCTRPLD[15] = (u8) (wCnt & 0xff); AESv128(pbyRxKey, abyCTRPLD, abyTmp); for (kk = 0; kk < 16; kk++) @@ -370,8 +370,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) /* => above is the calculated MIC */ wCnt = 0; - abyCTRPLD[14] = (BYTE) (wCnt >> 8); - abyCTRPLD[15] = (BYTE) (wCnt & 0xff); + abyCTRPLD[14] = (u8) (wCnt >> 8); + abyCTRPLD[15] = (u8) (wCnt & 0xff); AESv128(pbyRxKey, abyCTRPLD, abyTmp); for (kk = 0; kk < 8; kk++) diff --git a/drivers/staging/vt6656/aes_ccmp.h b/drivers/staging/vt6656/aes_ccmp.h index a2e2c4e..f5ea0f1 100644 --- a/drivers/staging/vt6656/aes_ccmp.h +++ b/drivers/staging/vt6656/aes_ccmp.h @@ -41,6 +41,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize); +bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize); #endif /* __AES_CCMP_H__ */ diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index a9f525e..ac33206 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -66,7 +66,7 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Static Variables --------------------------*/ -BYTE abyVT3184_AGC[] = { +u8 abyVT3184_AGC[] = { 0x00, //0 0x00, //1 0x02, //2 @@ -134,7 +134,7 @@ BYTE abyVT3184_AGC[] = { }; -BYTE abyVT3184_AL2230[] = { +u8 abyVT3184_AL2230[] = { 0x31,//00 0x00, 0x00, @@ -396,7 +396,7 @@ BYTE abyVT3184_AL2230[] = { //{{RobertYu:20060515, new BB setting for VT3226D0 -BYTE abyVT3184_VT3226D0[] = { +u8 abyVT3184_VT3226D0[] = { 0x31,//00 0x00, 0x00, @@ -691,8 +691,8 @@ s_vClearSQ3Value(PSDevice pDevice); */ unsigned int BBuGetFrameTime( - BYTE byPreambleType, - BYTE byPktType, + u8 byPreambleType, + u8 byPktType, unsigned int cbFrameLength, WORD wRate ) @@ -964,10 +964,10 @@ int BBbVT3184Init(struct vnt_private *pDevice) { int ntStatus; WORD wLength; - PBYTE pbyAddr; - PBYTE pbyAgc; + u8 * pbyAddr; + u8 * pbyAgc; WORD wLengthAgc; - BYTE abyArray[256]; + u8 abyArray[256]; ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, @@ -1155,7 +1155,7 @@ else { */ void BBvLoopbackOn(struct vnt_private *pDevice) { - BYTE byData; + u8 byData; //CR C9 = 0x00 ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0xC9, &pDevice->byBBCRc9);//CR201 @@ -1169,7 +1169,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice) if (pDevice->wCurrentRate <= RATE_11M) { //CCK // Enable internal digital loopback: CR33 |= 0000 0001 ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x21, &byData);//CR33 - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (BYTE)(byData | 0x01));//CR33 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (u8)(byData | 0x01));//CR33 // CR154 = 0x00 ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, 0); //CR154 @@ -1178,7 +1178,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice) else { //OFDM // Enable internal digital loopback:CR154 |= 0000 0001 ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x9A, &byData);//CR154 - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (BYTE)(byData | 0x01));//CR154 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (u8)(byData | 0x01));//CR154 // CR33 = 0x00 ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, 0); //CR33 @@ -1190,7 +1190,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice) // Disable TX_IQUN ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x09, &pDevice->byBBCR09); - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x09, (BYTE)(pDevice->byBBCR09 & 0xDE)); + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x09, (u8)(pDevice->byBBCR09 & 0xDE)); } /* @@ -1218,13 +1218,13 @@ void BBvLoopbackOff(struct vnt_private *pDevice) if (pDevice->wCurrentRate <= RATE_11M) { // CCK // Set the CR33 Bit2 to disable internal Loopback. ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x21, &byData);//CR33 - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (BYTE)(byData & 0xFE));//CR33 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (u8)(byData & 0xFE));//CR33 } else { /* OFDM */ ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x9A, &byData);//CR154 - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (BYTE)(byData & 0xFE));//CR154 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (u8)(byData & 0xFE));//CR154 } ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x0E, &byData);//CR14 - ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0E, (BYTE)(byData | 0x80));//CR14 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0E, (u8)(byData | 0x80));//CR14 } @@ -1243,7 +1243,7 @@ void BBvLoopbackOff(struct vnt_private *pDevice) */ void BBvSetShortSlotTime(struct vnt_private *pDevice) { - BYTE byBBVGA=0; + u8 byBBVGA=0; if (pDevice->bShortSlotTime) pDevice->byBBRxConf &= 0xDF;//1101 1111 @@ -1258,7 +1258,7 @@ void BBvSetShortSlotTime(struct vnt_private *pDevice) } -void BBvSetVGAGainOffset(struct vnt_private *pDevice, BYTE byData) +void BBvSetVGAGainOffset(struct vnt_private *pDevice, u8 byData) { ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xE7, byData); diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index fba6160..935b19f 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -97,8 +97,8 @@ unsigned int BBuGetFrameTime( - BYTE byPreambleType, - BYTE byFreqType, + u8 byPreambleType, + u8 byFreqType, unsigned int cbFrameLength, WORD wRate ); diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index e214fcf..e08f719 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -430,7 +430,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, unsigned int uLen = pRSNWPA->len + 2; if (uLen <= (uIELength - - (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) { + (unsigned int) (ULONG_PTR) ((u8 *) pRSNWPA - pbyIEs))) { pBSSList->wWPALen = uLen; memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); WPA_ParseRSN(pBSSList, pRSNWPA); @@ -443,7 +443,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, unsigned int uLen = pRSN->len + 2; if (uLen <= (uIELength - - (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) { + (unsigned int) (ULONG_PTR) ((u8 *) pRSN - pbyIEs))) { pBSSList->wRSNLen = uLen; memcpy(pBSSList->byRSNIE, pRSN, uLen); WPA2vParseRSN(pBSSList, pRSN); @@ -483,7 +483,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, if (pDevice->bUpdateBBVGA) { // Monitor if RSSI is too strong. pBSSList->byRSSIStatCnt = 0; - RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &pBSSList->ldBmMAX); + RFvRSSITodBm(pDevice, (u8)(pRxPacket->uRSSI), &pBSSList->ldBmMAX); pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX; pBSSList->ldBmAverRange = pBSSList->ldBmMAX; for (ii = 1; ii < RSSI_STAT_COUNT; ii++) @@ -592,7 +592,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, if (pRSNWPA != NULL) { unsigned int uLen = pRSNWPA->len + 2; if (uLen <= (uIELength - - (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) { + (unsigned int) (ULONG_PTR) ((u8 *) pRSNWPA - pbyIEs))) { pBSSList->wWPALen = uLen; memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); WPA_ParseRSN(pBSSList, pRSNWPA); @@ -604,7 +604,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, if (pRSN != NULL) { unsigned int uLen = pRSN->len + 2; if (uLen <= (uIELength - - (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) { + (unsigned int) (ULONG_PTR) ((u8 *) pRSN - pbyIEs))) { pBSSList->wRSNLen = uLen; memcpy(pBSSList->byRSNIE, pRSN, uLen); WPA2vParseRSN(pBSSList, pRSN); @@ -612,7 +612,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, } if (pRxPacket->uRSSI != 0) { - RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &ldBm); + RFvRSSITodBm(pDevice, (u8)(pRxPacket->uRSSI), &ldBm); // Monitor if RSSI is too strong. pBSSList->byRSSIStatCnt++; pBSSList->byRSSIStatCnt %= RSSI_STAT_COUNT; @@ -1207,7 +1207,7 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, byTxRetry = (byTSR & 0xF0) >> 4; wRate = (WORD) (byPktNO & 0xF0) >> 4; wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl; - pbyDestAddr = (PBYTE) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]); + pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]); if (wFIFOCtl & FIFOCTL_AUTO_FB_0) { byFallBack = AUTO_FB_0; @@ -1433,7 +1433,7 @@ if(pDevice->bLinkPass !=true) } else { - RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); + RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm); if(-ldBm < 50) { RssiRatio = 4000; } @@ -1473,7 +1473,7 @@ static void s_vCheckPreEDThreshold(struct vnt_private *pDevice) ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) { pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID)pMgmt->abyCurrSSID); if (pBSSList != NULL) { - pDevice->byBBPreEDRSSI = (BYTE) (~(pBSSList->ldBmAverRange) + 1); + pDevice->byBBPreEDRSSI = (u8) (~(pBSSList->ldBmAverRange) + 1); BBvUpdatePreEDThreshold(pDevice, false); } } diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index 08091a0..d329f4b 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -80,7 +80,7 @@ typedef struct tagSERPObject { bool bERPExist; - BYTE byERP; + u8 byERP; } ERPObject, *PERPObject; @@ -93,19 +93,19 @@ typedef struct tagSRSNCapObject { typedef struct tagKnownBSS { // BSS info bool bActive; - BYTE abyBSSID[WLAN_BSSID_LEN]; + u8 abyBSSID[WLAN_BSSID_LEN]; unsigned int uChannel; - BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; - BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; + u8 abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; + u8 abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; unsigned int uRSSI; - BYTE bySQ; + u8 bySQ; WORD wBeaconInterval; WORD wCapInfo; - BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; - BYTE byRxRate; + u8 abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; + u8 byRxRate; // WORD wATIMWindow; - BYTE byRSSIStatCnt; + u8 byRSSIStatCnt; signed long ldBmMAX; signed long ldBmAverage[RSSI_STAT_COUNT]; signed long ldBmAverRange; @@ -114,32 +114,32 @@ typedef struct tagKnownBSS { //++ WPA informations bool bWPAValid; - BYTE byGKType; - BYTE abyPKType[4]; + u8 byGKType; + u8 abyPKType[4]; WORD wPKCount; - BYTE abyAuthType[4]; + u8 abyAuthType[4]; WORD wAuthCount; - BYTE byDefaultK_as_PK; - BYTE byReplayIdx; + u8 byDefaultK_as_PK; + u8 byReplayIdx; //-- //++ WPA2 informations bool bWPA2Valid; - BYTE byCSSGK; + u8 byCSSGK; WORD wCSSPKCount; - BYTE abyCSSPK[4]; + u8 abyCSSPK[4]; WORD wAKMSSAuthCount; - BYTE abyAKMSSAuthType[4]; + u8 abyAKMSSAuthType[4]; //++ wpactl - BYTE byWPAIE[MAX_WPA_IE_LEN]; - BYTE byRSNIE[MAX_WPA_IE_LEN]; + u8 byWPAIE[MAX_WPA_IE_LEN]; + u8 byRSNIE[MAX_WPA_IE_LEN]; WORD wWPALen; WORD wRSNLen; // Clear count unsigned int uClearCount; -// BYTE abyIEs[WLAN_BEACON_FR_MAXLEN]; +// u8 abyIEs[WLAN_BEACON_FR_MAXLEN]; unsigned int uIELength; u64 qwBSSTimestamp; u64 qwLocalTSF;/* local TSF timer */ @@ -148,7 +148,7 @@ typedef struct tagKnownBSS { ERPObject sERP; SRSNCapObject sRSNCapObj; - BYTE abyIEs[1024]; // don't move this field !! + u8 abyIEs[1024]; // don't move this field !! } __attribute__ ((__packed__)) KnownBSS , *PKnownBSS; @@ -168,9 +168,9 @@ typedef enum tagNODE_STATE { typedef struct tagKnownNodeDB { // STA info bool bActive; - BYTE abyMACAddr[WLAN_ADDR_LEN]; - BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; - BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; + u8 abyMACAddr[WLAN_ADDR_LEN]; + u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; + u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; WORD wTxDataRate; bool bShortPreamble; bool bERPExist; @@ -179,8 +179,8 @@ typedef struct tagKnownNodeDB { WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp. WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon. WORD wSuppRate; - BYTE byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode - BYTE byTopCCKBasicRate; //Records the highest basic rate in CCK mode + u8 byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode + u8 byTopCCKBasicRate; //Records the highest basic rate in CCK mode // For AP mode struct sk_buff_head sTxPSQueue; @@ -190,21 +190,21 @@ typedef struct tagKnownNodeDB { NODE_STATE eNodeState; bool bPSEnable; bool bRxPSPoll; - BYTE byAuthSequence; + u8 byAuthSequence; unsigned long ulLastRxJiffer; - BYTE bySuppRate; + u8 bySuppRate; DWORD dwFlags; WORD wEnQueueCnt; bool bOnFly; unsigned long long KeyRSC; - BYTE byKeyIndex; + u8 byKeyIndex; DWORD dwKeyIndex; - BYTE byCipherSuite; + u8 byCipherSuite; DWORD dwTSC47_16; WORD wTSC15_0; unsigned int uWepKeyLength; - BYTE abyWepKey[WLAN_WEPMAX_KEYLEN]; + u8 abyWepKey[WLAN_WEPMAX_KEYLEN]; // // Auto rate fallback vars bool bIsInFallback; @@ -270,7 +270,7 @@ int BSSbUpdateToBSSList(struct vnt_private *, u8 *pbyIEs, void *pRxPacketContext); -int BSSbIsSTAInNodeDB(struct vnt_private *, PBYTE abyDstAddr, +int BSSbIsSTAInNodeDB(struct vnt_private *, u8 * abyDstAddr, u32 *puNodeIndex); void BSSvCreateOneNode(struct vnt_private *, u32 *puNodeIndex); diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 22918a1..2cd120b 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -133,7 +133,7 @@ void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel) pDevice->byCurPwr = 0xFF; RFbRawSetPower(pDevice, pDevice->abyCCKPwrTbl[uConnectionChannel-1], RATE_1M); } - ControlvWriteByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_CHANNEL,(BYTE)(uConnectionChannel|0x80)); + ControlvWriteByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_CHANNEL,(u8)(uConnectionChannel|0x80)); } /* @@ -221,9 +221,9 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx) void CARDvCalculateOFDMRParameter ( WORD wRate, - BYTE byBBType, - PBYTE pbyTxRate, - PBYTE pbyRsvTime + u8 byBBType, + u8 * pbyTxRate, + u8 * pbyRsvTime ) { switch (wRate) { @@ -434,23 +434,23 @@ void CARDvSetRSPINF(struct vnt_private *pDevice, u8 byBBType) &abyTxRate[8], &abyRsvTime[8]); - abyData[0] = (BYTE)(awLen[0]&0xFF); - abyData[1] = (BYTE)(awLen[0]>>8); + abyData[0] = (u8)(awLen[0]&0xFF); + abyData[1] = (u8)(awLen[0]>>8); abyData[2] = abySignal[0]; abyData[3] = abyServ[0]; - abyData[4] = (BYTE)(awLen[1]&0xFF); - abyData[5] = (BYTE)(awLen[1]>>8); + abyData[4] = (u8)(awLen[1]&0xFF); + abyData[5] = (u8)(awLen[1]>>8); abyData[6] = abySignal[1]; abyData[7] = abyServ[1]; - abyData[8] = (BYTE)(awLen[2]&0xFF); - abyData[9] = (BYTE)(awLen[2]>>8); + abyData[8] = (u8)(awLen[2]&0xFF); + abyData[9] = (u8)(awLen[2]>>8); abyData[10] = abySignal[2]; abyData[11] = abyServ[2]; - abyData[12] = (BYTE)(awLen[3]&0xFF); - abyData[13] = (BYTE)(awLen[3]>>8); + abyData[12] = (u8)(awLen[3]&0xFF); + abyData[13] = (u8)(awLen[3]>>8); abyData[14] = abySignal[3]; abyData[15] = abyServ[3]; @@ -500,7 +500,7 @@ void vUpdateIFS(struct vnt_private *pDevice) byMaxMin = 5; } else {// PK_TYPE_11GA & PK_TYPE_11GB - BYTE byRate = 0; + u8 byRate = 0; bool bOFDMRate = false; unsigned int ii = 0; PWLAN_IE_SUPP_RATES pItemRates = NULL; @@ -515,7 +515,7 @@ void vUpdateIFS(struct vnt_private *pDevice) pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt.abyCurrSuppRates; for (ii = 0; ii < pItemRates->len; ii++) { - byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); + byRate = (u8)(pItemRates->abyRates[ii]&0x7F); if (RATEwGetRateIdx(byRate) > RATE_11M) { bOFDMRate = true; break; @@ -525,7 +525,7 @@ void vUpdateIFS(struct vnt_private *pDevice) pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt .abyCurrExtSuppRates; for (ii = 0; ii < pItemRates->len; ii++) { - byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); + byRate = (u8)(pItemRates->abyRates[ii]&0x7F); if (RATEwGetRateIdx(byRate) > RATE_11M) { bOFDMRate = true; break; @@ -544,10 +544,10 @@ void vUpdateIFS(struct vnt_private *pDevice) pDevice->uCwMax = C_CWMAX; pDevice->uEIFS = C_EIFS; - byData[0] = (BYTE)pDevice->uSIFS; - byData[1] = (BYTE)pDevice->uDIFS; - byData[2] = (BYTE)pDevice->uEIFS; - byData[3] = (BYTE)pDevice->uSlot; + byData[0] = (u8)pDevice->uSIFS; + byData[1] = (u8)pDevice->uDIFS; + byData[2] = (u8)pDevice->uEIFS; + byData[3] = (u8)pDevice->uSlot; CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, MAC_REG_SIFS, @@ -627,7 +627,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice) { if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B) { - return (BYTE)pDevice->byBBType; + return (u8)pDevice->byBBType; } else if (CARDbIsOFDMinBasicRate(pDevice)) { return PK_TYPE_11GA; @@ -653,7 +653,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice) * Return Value: TSF Offset value * */ -u64 CARDqGetTSFOffset(BYTE byRxRate, u64 qwTSF1, u64 qwTSF2) +u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2) { u64 qwTSFOffset = 0; WORD wRxBcnTSFOffst = 0; @@ -996,7 +996,7 @@ void CARDvSetBSSMode(struct vnt_private *pDevice) } vUpdateIFS(pDevice); - CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType); + CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); if ( pDevice->byBBType == BB_TYPE_11A ) { //request by Jack 2005-04-26 diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h index 5123bc7..146b51b 100644 --- a/drivers/staging/vt6656/card.h +++ b/drivers/staging/vt6656/card.h @@ -74,7 +74,7 @@ void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, WORD wBeaconInterval); void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF, WORD wBeaconInterval); u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval); -u64 CARDqGetTSFOffset(BYTE byRxRate, u64 qwTSF1, u64 qwTSF2); +u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2); int CARDbRadioPowerOff(struct vnt_private *pDevice); int CARDbRadioPowerOn(struct vnt_private *pDevice); u8 CARDbyGetPktType(struct vnt_private *pDevice); diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index 4181e3e..9421c5d 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c @@ -116,10 +116,10 @@ static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] = ************************************************************************/ static struct { - BYTE byChannelCountryCode; /* The country code */ + u8 byChannelCountryCode; /* The country code */ char chCountryCode[2]; - BYTE bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */ - BYTE byPower[CB_MAX_CHANNEL]; + u8 bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */ + u8 byPower[CB_MAX_CHANNEL]; } ChannelRuleTab[] = { /************************************************************************ @@ -425,7 +425,7 @@ exit: bool CHvChannelGetList ( unsigned int uCountryCodeIdx, - PBYTE pbyChannelTable + u8 * pbyChannelTable ) { if (uCountryCodeIdx >= CCODE_MAX) { @@ -508,10 +508,10 @@ void CHvInitChannelTable(struct vnt_private *pDevice) } } -BYTE CHbyGetChannelMapping(BYTE byChannelNumber) +u8 CHbyGetChannelMapping(u8 byChannelNumber) { -BYTE ii; -BYTE byCHMapping = 0; +u8 ii; +u8 byCHMapping = 0; for (ii = 1; ii <= CB_MAX_CHANNEL; ii++) { if (sChannelTbl[ii].byChannelNumber == byChannelNumber) diff --git a/drivers/staging/vt6656/channel.h b/drivers/staging/vt6656/channel.h index 9914dba..30cd46d 100644 --- a/drivers/staging/vt6656/channel.h +++ b/drivers/staging/vt6656/channel.h @@ -38,7 +38,7 @@ /*--------------------- Export Classes ----------------------------*/ typedef struct tagSChannelTblElement { - BYTE byChannelNumber; + u8 byChannelNumber; unsigned int uFrequency; bool bValid; } SChannelTblElement, *PSChannelTblElement; @@ -49,8 +49,8 @@ typedef struct tagSChannelTblElement { bool ChannelValid(unsigned int CountryCode, unsigned int ChannelNum); void CHvInitChannelTable(struct vnt_private *pDevice); -BYTE CHbyGetChannelMapping(BYTE byChannelNumber); +u8 CHbyGetChannelMapping(u8 byChannelNumber); -bool CHvChannelGetList(unsigned int uCountryCodeIdx, PBYTE pbyChannelTable); +bool CHvChannelGetList(unsigned int uCountryCodeIdx, u8 * pbyChannelTable); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c index 77464e8..7314f2b 100644 --- a/drivers/staging/vt6656/datarate.c +++ b/drivers/staging/vt6656/datarate.c @@ -57,7 +57,7 @@ /* static int msglevel = MSG_LEVEL_DEBUG; */ static int msglevel =MSG_LEVEL_INFO; -const BYTE acbyIERate[MAX_RATE] = +const u8 acbyIERate[MAX_RATE] = {0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; #define AUTORATE_TXOK_CNT 0x0400 @@ -70,7 +70,7 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable); void s_vResetCounter(PKnownNodeDB psNodeDBTable) { - BYTE ii; + u8 ii; /* clear statistics counter for auto_rate */ for (ii = 0; ii <= MAX_RATE; ii++) { @@ -92,19 +92,19 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable) * * Parameters: * In: - * BYTE - Rate value in SuppRates IE or ExtSuppRates IE + * u8 - Rate value in SuppRates IE or ExtSuppRates IE * Out: * none * * Return Value: RateIdx * -*/ -BYTE +u8 DATARATEbyGetRateIdx ( - BYTE byRate + u8 byRate ) { - BYTE ii; + u8 ii; /* erase BasicRate flag */ byRate = byRate & 0x7F; @@ -146,7 +146,7 @@ DATARATEbyGetRateIdx ( * * Parameters: * In: - * BYTE - Rate value in SuppRates IE or ExtSuppRates IE + * u8 - Rate value in SuppRates IE or ExtSuppRates IE * Out: * none * @@ -155,7 +155,7 @@ DATARATEbyGetRateIdx ( -*/ WORD RATEwGetRateIdx( - BYTE byRate + u8 byRate ) { WORD ii; @@ -216,7 +216,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, } for (ii = 0; ii < uRateLen; ii++) { - byRate = (BYTE)(pItemRates->abyRates[ii]); + byRate = (u8)(pItemRates->abyRates[ii]); if (WLAN_MGMT_IS_BASICRATE(byRate) && (bUpdateBasicRate == true)) { /* @@ -226,7 +226,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate)); } - byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); + byRate = (u8)(pItemRates->abyRates[ii]&0x7F); if (byHighSuppRate == 0) byHighSuppRate = byRate; if (byRate > byHighSuppRate) @@ -242,7 +242,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, uExtRateLen = WLAN_RATES_MAXLEN; for (ii = 0; ii < uExtRateLen ; ii++) { - byRate = (BYTE)(pItemExtRates->abyRates[ii]); + byRate = (u8)(pItemExtRates->abyRates[ii]); /* select highest basic rate */ if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) { /* @@ -252,7 +252,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate)); } - byRate = (BYTE)(pItemExtRates->abyRates[ii]&0x7F); + byRate = (u8)(pItemExtRates->abyRates[ii]&0x7F); if (byHighSuppRate == 0) byHighSuppRate = byRate; if (byRate > byHighSuppRate) @@ -400,7 +400,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, * Return Value: None * -*/ -BYTE +u8 RATEuSetIE ( PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates, @@ -423,6 +423,6 @@ RATEuSetIE ( } } } - return (BYTE)uRateCnt; + return (u8)uRateCnt; } diff --git a/drivers/staging/vt6656/datarate.h b/drivers/staging/vt6656/datarate.h index 8dc55bd..355e51f 100644 --- a/drivers/staging/vt6656/datarate.h +++ b/drivers/staging/vt6656/datarate.h @@ -77,7 +77,7 @@ void RATEvParseMaxRate(struct vnt_private *, PWLAN_IE_SUPP_RATES pItemRates, void RATEvTxRateFallBack(struct vnt_private *pDevice, PKnownNodeDB psNodeDBTable); -BYTE +u8 RATEuSetIE( PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates, @@ -86,13 +86,13 @@ RATEuSetIE( WORD RATEwGetRateIdx( - BYTE byRate + u8 byRate ); -BYTE +u8 DATARATEbyGetRateIdx( - BYTE byRate + u8 byRate ); #endif /* __DATARATE_H__ */ diff --git a/drivers/staging/vt6656/desc.h b/drivers/staging/vt6656/desc.h index 0c0b614..bfbaccd 100644 --- a/drivers/staging/vt6656/desc.h +++ b/drivers/staging/vt6656/desc.h @@ -190,19 +190,19 @@ typedef const SRrvTime_atim *PCSRrvTime_atim; typedef struct tagSRTSData { WORD wFrameControl; WORD wDurationID; - BYTE abyRA[ETH_ALEN]; - BYTE abyTA[ETH_ALEN]; + u8 abyRA[ETH_ALEN]; + u8 abyTA[ETH_ALEN]; } __attribute__ ((__packed__)) SRTSData, *PSRTSData; typedef const SRTSData *PCSRTSData; typedef struct tagSRTS_g { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_ba; WORD wDuration_aa; @@ -214,11 +214,11 @@ SRTS_g, *PSRTS_g; typedef const SRTS_g *PCSRTS_g; typedef struct tagSRTS_g_FB { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_ba; WORD wDuration_aa; @@ -235,8 +235,8 @@ SRTS_g_FB, *PSRTS_g_FB; typedef const SRTS_g_FB *PCSRTS_g_FB; typedef struct tagSRTS_ab { - BYTE bySignalField; - BYTE byServiceField; + u8 bySignalField; + u8 byServiceField; WORD wTransmitLength; WORD wDuration; WORD wReserved; @@ -247,8 +247,8 @@ SRTS_ab, *PSRTS_ab; typedef const SRTS_ab *PCSRTS_ab; typedef struct tagSRTS_a_FB { - BYTE bySignalField; - BYTE byServiceField; + u8 bySignalField; + u8 byServiceField; WORD wTransmitLength; WORD wDuration; WORD wReserved; @@ -266,14 +266,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB; typedef struct tagSCTSData { WORD wFrameControl; WORD wDurationID; - BYTE abyRA[ETH_ALEN]; + u8 abyRA[ETH_ALEN]; WORD wReserved; } __attribute__ ((__packed__)) SCTSData, *PSCTSData; typedef struct tagSCTS { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; WORD wDuration_ba; WORD wReserved; @@ -284,8 +284,8 @@ SCTS, *PSCTS; typedef const SCTS *PCSCTS; typedef struct tagSCTS_FB { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; WORD wDuration_ba; WORD wReserved; @@ -321,11 +321,11 @@ typedef const STxShortBufHead *PCSTxShortBufHead; * TX data header */ typedef struct tagSTxDataHead_g { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -337,11 +337,11 @@ STxDataHead_g, *PSTxDataHead_g; typedef const STxDataHead_g *PCSTxDataHead_g; typedef struct tagSTxDataHead_g_FB { - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -354,8 +354,8 @@ STxDataHead_g_FB, *PSTxDataHead_g_FB; typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB; typedef struct tagSTxDataHead_ab { - BYTE bySignalField; - BYTE byServiceField; + u8 bySignalField; + u8 byServiceField; WORD wTransmitLength; WORD wDuration; WORD wTimeStampOff; @@ -364,8 +364,8 @@ STxDataHead_ab, *PSTxDataHead_ab; typedef const STxDataHead_ab *PCSTxDataHead_ab; typedef struct tagSTxDataHead_a_FB { - BYTE bySignalField; - BYTE byServiceField; + u8 bySignalField; + u8 byServiceField; WORD wTransmitLength; WORD wDuration; WORD wTimeStampOff; @@ -397,14 +397,14 @@ SBEACONCtl; typedef struct tagSSecretKey { u32 dwLowDword; - BYTE byHighByte; + u8 byHighByte; } __attribute__ ((__packed__)) SSecretKey; typedef struct tagSKeyEntry { - BYTE abyAddrHi[2]; + u8 abyAddrHi[2]; WORD wKCTL; - BYTE abyAddrLo[4]; + u8 abyAddrLo[4]; u32 dwKey0[4]; u32 dwKey1[4]; u32 dwKey2[4]; diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 6bba2e0..486de1e 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -212,7 +212,7 @@ typedef struct _DEFAULT_CONFIG { */ typedef struct { unsigned int uDataLen; - PBYTE pDataBuf; + u8 * pDataBuf; /* struct urb *pUrb; */ bool bInUse; } INT_BUFFER, *PINT_BUFFER; @@ -310,14 +310,14 @@ typedef struct tagSPMKIDCandidateEvent { typedef struct tagSQuietControl { bool bEnable; DWORD dwStartTime; - BYTE byPeriod; + u8 byPeriod; WORD wDuration; } SQuietControl, *PSQuietControl; /* The receive duplicate detection cache entry */ typedef struct tagSCacheEntry{ WORD wFmSequence; - BYTE abyAddr2[ETH_ALEN]; + u8 abyAddr2[ETH_ALEN]; WORD wFrameCtl; } SCacheEntry, *PSCacheEntry; @@ -337,10 +337,10 @@ typedef struct tagSDeFragControlBlock { WORD wSequence; WORD wFragNum; - BYTE abyAddr2[ETH_ALEN]; + u8 abyAddr2[ETH_ALEN]; unsigned int uLifetime; struct sk_buff* skb; - PBYTE pbyRxBuffer; + u8 * pbyRxBuffer; unsigned int cbFrameLength; bool bInUse; } SDeFragControlBlock, *PSDeFragControlBlock; diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index e83f95e..e53b77b 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -64,7 +64,7 @@ //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; -const BYTE acbyRxRate[MAX_RATE] = +const u8 acbyRxRate[MAX_RATE] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108}; @@ -74,12 +74,12 @@ const BYTE acbyRxRate[MAX_RATE] = /*--------------------- Static Functions --------------------------*/ -static BYTE s_byGetRateIdx(BYTE byRate); +static u8 s_byGetRateIdx(u8 byRate); static void s_vGetDASA( - PBYTE pbyRxBufferAddr, + u8 * pbyRxBufferAddr, unsigned int *pcbHeaderSize, PSEthernetHeader psEthHeader ); @@ -135,7 +135,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, pMACHeader = (PS802_11Header) (pbyRxBufferAddr + cbHeaderSize); - s_vGetDASA((PBYTE)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader); + s_vGetDASA((u8 *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader); if (bIsWEP) { if (bExtIV) { @@ -150,7 +150,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, cbHeaderSize += WLAN_HDR_ADDR3_LEN; }; - pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize); + pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize); if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_Bridgetunnel[0])) { cbHeaderSize += 6; } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { @@ -188,7 +188,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, } cbHeaderSize -= (ETH_ALEN * 2); - pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize); + pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize); for (ii = 0; ii < ETH_ALEN; ii++) *pbyRxBuffer++ = pDevice->sRxEthHeader.abyDstAddr[ii]; for (ii = 0; ii < ETH_ALEN; ii++) @@ -200,9 +200,9 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, -static BYTE s_byGetRateIdx(BYTE byRate) +static u8 s_byGetRateIdx(u8 byRate) { - BYTE byRateIdx; + u8 byRateIdx; for (byRateIdx = 0; byRateIdx <MAX_RATE ; byRateIdx++) { if (acbyRxRate[byRateIdx%MAX_RATE] == byRate) @@ -215,7 +215,7 @@ static BYTE s_byGetRateIdx(BYTE byRate) static void s_vGetDASA ( - PBYTE pbyRxBufferAddr, + u8 * pbyRxBufferAddr, unsigned int *pcbHeaderSize, PSEthernetHeader psEthHeader ) @@ -321,7 +321,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, return false; } - pbyDAddress = (PBYTE)(skb->data); + pbyDAddress = (u8 *)(skb->data); pbyRxSts = pbyDAddress+4; pbyRxRate = pbyDAddress+5; @@ -407,7 +407,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // Use for TKIP MIC s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader); - if (!compare_ether_addr((PBYTE)&(pDevice->sRxEthHeader.abySrcAddr[0]), + if (!compare_ether_addr((u8 *)&(pDevice->sRxEthHeader.abySrcAddr[0]), pDevice->abyCurrentNetAddr)) return false; @@ -415,7 +415,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) { p802_11Header = (PS802_11Header) (pbyFrame); // get SA NodeIndex - if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p802_11Header->abyAddr2), &iSANodeIndex)) { + if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(p802_11Header->abyAddr2), &iSANodeIndex)) { pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies; pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0; } @@ -529,8 +529,8 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // Handle Control & Manage Frame if (IS_TYPE_MGMT((pbyFrame))) { - PBYTE pbyData1; - PBYTE pbyData2; + u8 * pbyData1; + u8 * pbyData2; pRxPacket = &(pRCB->sMngPacket); pRxPacket->p80211Header = (PUWLAN_80211HDR)(pbyFrame); @@ -622,9 +622,9 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } //mike add:station mode check eapol-key challenge---> { - BYTE Protocol_Version; //802.1x Authentication - BYTE Packet_Type; //802.1x Authentication - BYTE Descriptor_type; + u8 Protocol_Version; //802.1x Authentication + u8 Packet_Type; //802.1x Authentication + u8 Descriptor_type; WORD Key_info; if (bIsWEP) cbIVOffset = 8; @@ -703,7 +703,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // ----------------------------------------------- if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){ - BYTE abyMacHdr[24]; + u8 abyMacHdr[24]; // Only 802.1x packet incoming allowed if (bIsWEP) @@ -776,11 +776,11 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } MIC_vInit(dwMICKey0, dwMICKey1); - MIC_vAppend((PBYTE)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12); + MIC_vAppend((u8 *)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12); dwMIC_Priority = 0; - MIC_vAppend((PBYTE)&dwMIC_Priority, 4); + MIC_vAppend((u8 *)&dwMIC_Priority, 4); // 4 is Rcv buffer header, 24 is MAC Header, and 8 is IV and Ext IV. - MIC_vAppend((PBYTE)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8), + MIC_vAppend((u8 *)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8), FrameSize - WLAN_HDR_ADDR3_LEN - 8); MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R); MIC_vUnInit(); @@ -877,7 +877,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } // ----- End of Reply Counter Check -------------------------- - s_vProcessRxMACHeader(pDevice, (PBYTE)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset); + s_vProcessRxMACHeader(pDevice, (u8 *)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset); FrameSize -= cbHeaderOffset; cbHeaderOffset += 8; // 8 is Rcv buffer header @@ -946,7 +946,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, // reason = (6) class 2 received from nonauth sta vMgrDeAuthenBeginSta(pDevice, pMgmt, - (PBYTE)(p802_11Header->abyAddr2), + (u8 *)(p802_11Header->abyAddr2), (WLAN_MGMT_REASON_CLASS2_NONAUTH), &Status ); @@ -958,7 +958,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, // reason = (7) class 3 received from nonassoc sta vMgrDisassocBeginSta(pDevice, pMgmt, - (PBYTE)(p802_11Header->abyAddr2), + (u8 *)(p802_11Header->abyAddr2), (WLAN_MGMT_REASON_CLASS3_NONASSOC), &Status ); @@ -1011,7 +1011,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, else { vMgrDeAuthenBeginSta(pDevice, pMgmt, - (PBYTE)(p802_11Header->abyAddr2), + (u8 *)(p802_11Header->abyAddr2), (WLAN_MGMT_REASON_CLASS2_NONAUTH), &Status ); @@ -1301,7 +1301,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, if (FrameSize > CB_MAX_BUF_SIZE) return false; // check DA - if (is_multicast_ether_addr((PBYTE)(skb->data+cbHeaderOffset))) { + if (is_multicast_ether_addr((u8 *)(skb->data+cbHeaderOffset))) { if (pMgmt->sNodeDBTable[0].bPSEnable) { skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); @@ -1326,7 +1326,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, } else { // check if relay - if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(skb->data+cbHeaderOffset), &iDANodeIndex)) { + if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(skb->data+cbHeaderOffset), &iDANodeIndex)) { if (pMgmt->sNodeDBTable[iDANodeIndex].eNodeState >= NODE_ASSOC) { if (pMgmt->sNodeDBTable[iDANodeIndex].bPSEnable) { // queue this skb until next PS tx, and then release. @@ -1356,7 +1356,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, iDANodeIndex = 0; if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) { - bRelayPacketSend(pDevice, (PBYTE) (skb->data + cbHeaderOffset), + bRelayPacketSend(pDevice, (u8 *) (skb->data + cbHeaderOffset), FrameSize, (unsigned int) iDANodeIndex); } diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c index 4371a77..d5d99fb 100644 --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c @@ -142,7 +142,7 @@ int FIRMWAREbCheckVersion(struct vnt_private *pDevice) 0, MESSAGE_REQUEST_VERSION, 2, - (PBYTE) &(pDevice->wFirmwareVersion)); + (u8 *) &(pDevice->wFirmwareVersion)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion); if (ntStatus != STATUS_SUCCESS) { diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index bc5e9da..ab828b5 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -491,7 +491,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, dwKeyIndex = (DWORD)(param->u.crypt.idx); if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) { - pDevice->byKeyIndex = (BYTE)dwKeyIndex; + pDevice->byKeyIndex = (u8)dwKeyIndex; pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } @@ -515,7 +515,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, ¶m->sta_addr[0], dwKeyIndex & ~(USE_KEYRSC), param->u.crypt.key_len, - &KeyRSC, (PBYTE)abyKey, + &KeyRSC, (u8 *)abyKey, KEY_CTL_WEP ) == true) { @@ -585,7 +585,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, dwKeyIndex, param->u.crypt.key_len, &KeyRSC, - (PBYTE)abyKey, + (u8 *)abyKey, byKeyDecMode ) == true) { @@ -670,7 +670,7 @@ static int hostap_get_encryption(struct vnt_private *pDevice, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: %d\n", iNodeIndex); memset(param->u.crypt.seq, 0, 8); for (ii = 0 ; ii < 8 ; ii++) { - param->u.crypt.seq[ii] = (BYTE)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8); + param->u.crypt.seq[ii] = (u8)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8); } return ret; diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c index 51990bd..ed2222f 100644 --- a/drivers/staging/vt6656/int.c +++ b/drivers/staging/vt6656/int.c @@ -98,8 +98,8 @@ void INTnsProcessData(struct vnt_private *pDevice) pINTData = (PSINTData) pDevice->intBuf.pDataBuf; if (pINTData->byTSR0 & TSR_VALID) { STAvUpdateTDStatCounter(&(pDevice->scStatistic), - (BYTE)(pINTData->byPkt0 & 0x0F), - (BYTE)(pINTData->byPkt0>>4), + (u8)(pINTData->byPkt0 & 0x0F), + (u8)(pINTData->byPkt0>>4), pINTData->byTSR0); BSSvUpdateNodeTxCounter(pDevice, &(pDevice->scStatistic), @@ -109,8 +109,8 @@ void INTnsProcessData(struct vnt_private *pDevice) } if (pINTData->byTSR1 & TSR_VALID) { STAvUpdateTDStatCounter(&(pDevice->scStatistic), - (BYTE)(pINTData->byPkt1 & 0x0F), - (BYTE)(pINTData->byPkt1>>4), + (u8)(pINTData->byPkt1 & 0x0F), + (u8)(pINTData->byPkt1>>4), pINTData->byTSR1); BSSvUpdateNodeTxCounter(pDevice, &(pDevice->scStatistic), @@ -120,8 +120,8 @@ void INTnsProcessData(struct vnt_private *pDevice) } if (pINTData->byTSR2 & TSR_VALID) { STAvUpdateTDStatCounter(&(pDevice->scStatistic), - (BYTE)(pINTData->byPkt2 & 0x0F), - (BYTE)(pINTData->byPkt2>>4), + (u8)(pINTData->byPkt2 & 0x0F), + (u8)(pINTData->byPkt2>>4), pINTData->byTSR2); BSSvUpdateNodeTxCounter(pDevice, &(pDevice->scStatistic), @@ -131,8 +131,8 @@ void INTnsProcessData(struct vnt_private *pDevice) } if (pINTData->byTSR3 & TSR_VALID) { STAvUpdateTDStatCounter(&(pDevice->scStatistic), - (BYTE)(pINTData->byPkt3 & 0x0F), - (BYTE)(pINTData->byPkt3>>4), + (u8)(pINTData->byPkt3 & 0x0F), + (u8)(pINTData->byPkt3>>4), pINTData->byTSR3); BSSvUpdateNodeTxCounter(pDevice, &(pDevice->scStatistic), diff --git a/drivers/staging/vt6656/int.h b/drivers/staging/vt6656/int.h index 27c725f..b8a7943 100644 --- a/drivers/staging/vt6656/int.h +++ b/drivers/staging/vt6656/int.h @@ -35,26 +35,26 @@ /*--------------------- Export Definitions -------------------------*/ typedef struct tagSINTData { - BYTE byTSR0; - BYTE byPkt0; + u8 byTSR0; + u8 byPkt0; WORD wTime0; - BYTE byTSR1; - BYTE byPkt1; + u8 byTSR1; + u8 byPkt1; WORD wTime1; - BYTE byTSR2; - BYTE byPkt2; + u8 byTSR2; + u8 byPkt2; WORD wTime2; - BYTE byTSR3; - BYTE byPkt3; + u8 byTSR3; + u8 byPkt3; WORD wTime3; u64 qwTSF; - BYTE byISR0; - BYTE byISR1; - BYTE byRTSSuccess; - BYTE byRTSFail; - BYTE byACKFail; - BYTE byFCSErr; - BYTE abySW[2]; + u8 byISR0; + u8 byISR1; + u8 byRTSSuccess; + u8 byRTSFail; + u8 byACKFail; + u8 byFCSErr; + u8 abySW[2]; } __attribute__ ((__packed__)) SINTData, *PSINTData; diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 69971f3..598c138 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -61,8 +61,8 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) pDevice->wstats.status = pDevice->eOPMode; if (pDevice->scStatistic.LinkQuality > 100) pDevice->scStatistic.LinkQuality = 100; - pDevice->wstats.qual.qual =(BYTE)pDevice->scStatistic.LinkQuality; - RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); + pDevice->wstats.qual.qual =(u8)pDevice->scStatistic.LinkQuality; + RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm); pDevice->wstats.qual.level = ldBm; pDevice->wstats.qual.noise = 0; pDevice->wstats.qual.updated = 1; @@ -95,7 +95,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrq = &wrqu->data; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; struct iw_scan_req *req = (struct iw_scan_req *)extra; - BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; + u8 abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; PWLAN_IE_SSID pItemSSID = NULL; if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) @@ -238,7 +238,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, // ADD quality memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVQUAL; - RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm); + RFvRSSITodBm(pDevice, (u8)(pBSS->uRSSI), &ldBm); iwe.u.qual.level = ldBm; iwe.u.qual.noise = 0; @@ -532,7 +532,7 @@ int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, struct iw_range *range = (struct iw_range *)extra; int i; int k; - BYTE abySupportedRates[13] = { + u8 abySupportedRates[13] = { 0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90 }; @@ -635,7 +635,7 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *wrq = &wrqu->ap_addr; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; int rc = 0; - BYTE ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + u8 ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; PRINT_K(" SIOCSIWAP\n"); @@ -819,7 +819,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, if (pDevice->bWPASuppWextEnabled == true) { /*******search if in hidden ssid mode ****/ PKnownBSS pCurr = NULL; - BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; + u8 abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; unsigned ii; unsigned uSameBssidNum = 0; @@ -913,7 +913,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, int rc = 0; u8 brate = 0; int i; - BYTE abySupportedRates[13] = { + u8 abySupportedRates[13] = { 0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90 }; @@ -996,7 +996,7 @@ int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, return -EFAULT; { - BYTE abySupportedRates[13] = { + u8 abySupportedRates[13] = { 0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90 }; @@ -1227,7 +1227,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, KEY_CTL_WEP); spin_unlock_irq(&pDevice->lock); } - pDevice->byKeyIndex = (BYTE)dwKeyIndex; + pDevice->byKeyIndex = (u8)dwKeyIndex; pDevice->uKeyLength = wrq->length; pDevice->bTransmitKey = true; pDevice->bEncryptionEnable = true; @@ -1317,7 +1317,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, memcpy(abyKey, pKey->abyKey, pKey->uKeyLength); memcpy(extra, abyKey, WLAN_WEP232_KEYLEN); } - } else if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (BYTE)index, &pKey)) { + } else if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (u8)index, &pKey)) { wrq->length = pKey->uKeyLength; memcpy(abyKey, pKey->abyKey, pKey->uKeyLength); memcpy(extra, abyKey, WLAN_WEP232_KEYLEN); @@ -1424,7 +1424,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n"); if (pDevice->bLinkPass == true) { - RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); + RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm); wrq->value = ldBm; } else { wrq->value = 0; diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index 416175e..5e36967 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -79,7 +79,7 @@ static void s_vCheckKeyTableValid(struct vnt_private *pDevice, pTable->KeyTable[i].bInUse = false; pTable->KeyTable[i].wKeyCtl = 0; pTable->KeyTable[i].bSoftWEP = false; - pbyData[wLength++] = (BYTE) i; + pbyData[wLength++] = (u8) i; //MACvDisableKeyEntry(pDevice, i); } } @@ -130,9 +130,9 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable) pTable->KeyTable[i].wKeyCtl = 0; pTable->KeyTable[i].dwGTKeyIndex = 0; pTable->KeyTable[i].bSoftWEP = false; - pbyData[i] = (BYTE) i; + pbyData[i] = (u8) i; } - pbyData[i] = (BYTE) i; + pbyData[i] = (u8) i; CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_CLRKEYENTRY, 0, diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index 7ecddcd..d5ff9c7 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -59,27 +59,27 @@ typedef struct tagSKeyItem { bool bKeyValid; u32 uKeyLength; - BYTE abyKey[MAX_KEY_LEN]; + u8 abyKey[MAX_KEY_LEN]; u64 KeyRSC; DWORD dwTSC47_16; WORD wTSC15_0; - BYTE byCipherSuite; - BYTE byReserved0; + u8 byCipherSuite; + u8 byReserved0; DWORD dwKeyIndex; void *pvKeyTable; } SKeyItem, *PSKeyItem; //64 typedef struct tagSKeyTable { - BYTE abyBSSID[ETH_ALEN]; /* 6 */ - BYTE byReserved0[2]; //8 + u8 abyBSSID[ETH_ALEN]; /* 6 */ + u8 byReserved0[2]; //8 SKeyItem PairwiseKey; SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 DWORD dwGTKeyIndex; // GroupTransmitKey Index bool bInUse; WORD wKeyCtl; bool bSoftWEP; - BYTE byReserved1[6]; + u8 byReserved1[6]; } SKeyTable, *PSKeyTable; //352 typedef struct tagSKeyManagement diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index 76d307b..eccba6a 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -169,10 +169,10 @@ void MACvSetMISCFifo(struct vnt_private *pDevice, u16 wOffset, u32 dwData) if (wOffset > 273) return; - pbyData[0] = (BYTE)dwData; - pbyData[1] = (BYTE)(dwData>>8); - pbyData[2] = (BYTE)(dwData>>16); - pbyData[3] = (BYTE)(dwData>>24); + pbyData[0] = (u8)dwData; + pbyData[1] = (u8)(dwData>>8); + pbyData[2] = (u8)(dwData>>16); + pbyData[3] = (u8)(dwData>>24); CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE_MISCFF, @@ -203,7 +203,7 @@ void MACvDisableKeyEntry(struct vnt_private *pDevice, u32 uEntryIdx) u8 byData; - byData = (BYTE) uEntryIdx; + byData = (u8) uEntryIdx; wOffset = MISCFIFO_KEYETRY0; wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); @@ -294,16 +294,16 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx, VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); } */ - pbyKey = (PBYTE)pdwKey; - - pbyData[0] = (BYTE)dwData1; - pbyData[1] = (BYTE)(dwData1>>8); - pbyData[2] = (BYTE)(dwData1>>16); - pbyData[3] = (BYTE)(dwData1>>24); - pbyData[4] = (BYTE)dwData2; - pbyData[5] = (BYTE)(dwData2>>8); - pbyData[6] = (BYTE)(dwData2>>16); - pbyData[7] = (BYTE)(dwData2>>24); + pbyKey = (u8 *)pdwKey; + + pbyData[0] = (u8)dwData1; + pbyData[1] = (u8)(dwData1>>8); + pbyData[2] = (u8)(dwData1>>16); + pbyData[3] = (u8)(dwData1>>24); + pbyData[4] = (u8)dwData2; + pbyData[5] = (u8)(dwData2>>8); + pbyData[6] = (u8)(dwData2>>16); + pbyData[7] = (u8)(dwData2>>24); for (ii = 8; ii < 24; ii++) pbyData[ii] = *pbyKey++; @@ -358,8 +358,8 @@ void MACvWriteWord(struct vnt_private *pDevice, u8 byRegOfs, u16 wData) u8 pbyData[2]; - pbyData[0] = (BYTE)(wData & 0xff); - pbyData[1] = (BYTE)(wData >> 8); + pbyData[0] = (u8)(wData & 0xff); + pbyData[1] = (u8)(wData >> 8); CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, @@ -376,12 +376,12 @@ void MACvWriteBSSIDAddress(struct vnt_private *pDevice, u8 *pbyEtherAddr) u8 pbyData[6]; - pbyData[0] = *((PBYTE)pbyEtherAddr); - pbyData[1] = *((PBYTE)pbyEtherAddr+1); - pbyData[2] = *((PBYTE)pbyEtherAddr+2); - pbyData[3] = *((PBYTE)pbyEtherAddr+3); - pbyData[4] = *((PBYTE)pbyEtherAddr+4); - pbyData[5] = *((PBYTE)pbyEtherAddr+5); + pbyData[0] = *((u8 *)pbyEtherAddr); + pbyData[1] = *((u8 *)pbyEtherAddr+1); + pbyData[2] = *((u8 *)pbyEtherAddr+2); + pbyData[3] = *((u8 *)pbyEtherAddr+3); + pbyData[4] = *((u8 *)pbyEtherAddr+4); + pbyData[5] = *((u8 *)pbyEtherAddr+5); CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index d5f53e1..a38d2cb 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -258,8 +258,8 @@ static void usb_device_reset(struct vnt_private *pDevice); static void device_set_options(struct vnt_private *pDevice) { - BYTE abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - BYTE abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; + u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN); @@ -366,8 +366,8 @@ static int device_init_registers(struct vnt_private *pDevice, } } - sInitCmd.byInitClass = (BYTE)InitType; - sInitCmd.bExistSWNetAddr = (BYTE) pDevice->bExistSWNetAddr; + sInitCmd.byInitClass = (u8)InitType; + sInitCmd.bExistSWNetAddr = (u8) pDevice->bExistSWNetAddr; for (ii = 0; ii < 6; ii++) sInitCmd.bySWNetAddr[ii] = pDevice->abyCurrentNetAddr[ii]; sInitCmd.byShortRetryLimit = pDevice->byShortRetryLimit; @@ -379,7 +379,7 @@ static int device_init_registers(struct vnt_private *pDevice, 0, 0, sizeof(CMD_CARD_INIT), - (PBYTE) &(sInitCmd)); + (u8 *) &(sInitCmd)); if ( ntStatus != STATUS_SUCCESS ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Issue Card init fail \n"); @@ -388,7 +388,7 @@ static int device_init_registers(struct vnt_private *pDevice, } if (InitType == DEVICE_INIT_COLD) { - ntStatus = CONTROLnsRequestIn(pDevice,MESSAGE_TYPE_INIT_RSP,0,0,sizeof(RSP_CARD_INIT), (PBYTE) &(sInitRsp)); + ntStatus = CONTROLnsRequestIn(pDevice,MESSAGE_TYPE_INIT_RSP,0,0,sizeof(RSP_CARD_INIT), (u8 *) &(sInitRsp)); if (ntStatus != STATUS_SUCCESS) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Cardinit request in status fail!\n"); @@ -1470,8 +1470,8 @@ static void device_set_multi(struct net_device *dev) mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31)); } for (ii = 0; ii < 4; ii++) { - MACvWriteMultiAddr(pDevice, ii, *((PBYTE)&mc_filter[0] + ii)); - MACvWriteMultiAddr(pDevice, ii+ 4, *((PBYTE)&mc_filter[1] + ii)); + MACvWriteMultiAddr(pDevice, ii, *((u8 *)&mc_filter[0] + ii)); + MACvWriteMultiAddr(pDevice, ii+ 4, *((u8 *)&mc_filter[1] + ii)); } pDevice->byRxMode &= ~(RCR_UNICAST); pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST); diff --git a/drivers/staging/vt6656/mib.c b/drivers/staging/vt6656/mib.c index d4c7b0c..fd4202c 100644 --- a/drivers/staging/vt6656/mib.c +++ b/drivers/staging/vt6656/mib.c @@ -89,7 +89,7 @@ void STAvClearAllCounter (PSStatCounter pStatistic) * Return Value: none * */ -void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1) +void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1) { /**********************/ /* ABNORMAL interrupt */ @@ -152,9 +152,9 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr * */ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, - BYTE byRxSts, BYTE byRxRate, - PBYTE pbyBuffer, unsigned int cbFrameLength) + u8 byRSR, u8 byNewRSR, + u8 byRxSts, u8 byRxRate, + u8 * pbyBuffer, unsigned int cbFrameLength) { /* need change */ PS802_11Header pHeader = (PS802_11Header)pbyBuffer; @@ -390,11 +390,11 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, void STAvUpdateRDStatCounterEx ( PSStatCounter pStatistic, - BYTE byRSR, - BYTE byNewRSR, - BYTE byRxSts, - BYTE byRxRate, - PBYTE pbyBuffer, + u8 byRSR, + u8 byNewRSR, + u8 byRxSts, + u8 byRxRate, + u8 * pbyBuffer, unsigned int cbFrameLength ) { @@ -411,7 +411,7 @@ STAvUpdateRDStatCounterEx ( // rx length pStatistic->dwCntRxFrmLength = cbFrameLength; // rx pattern, we just see 10 bytes for sample - memcpy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10); + memcpy(pStatistic->abyCntRxPattern, (u8 *)pbyBuffer, 10); } @@ -435,12 +435,12 @@ STAvUpdateRDStatCounterEx ( void STAvUpdateTDStatCounter ( PSStatCounter pStatistic, - BYTE byPktNum, - BYTE byRate, - BYTE byTSR + u8 byPktNum, + u8 byRate, + u8 byTSR ) { - BYTE byRetyCnt; + u8 byRetyCnt; // increase tx packet count pStatistic->dwTsrTxPacket++; @@ -524,10 +524,10 @@ void STAvUpdate802_11Counter( PSDot11Counters p802_11Counter, PSStatCounter pStatistic, - BYTE byRTSSuccess, - BYTE byRTSFail, - BYTE byACKFail, - BYTE byFCSErr + u8 byRTSSuccess, + u8 byRTSFail, + u8 byACKFail, + u8 byFCSErr ) { //p802_11Counter->TransmittedFragmentCount diff --git a/drivers/staging/vt6656/mib.h b/drivers/staging/vt6656/mib.h index 85c28e9..9674865 100644 --- a/drivers/staging/vt6656/mib.h +++ b/drivers/staging/vt6656/mib.h @@ -92,7 +92,7 @@ typedef struct tagSMib2Counter { signed long ifType; signed long ifMtu; DWORD ifSpeed; - BYTE ifPhysAddress[ETH_ALEN]; + u8 ifPhysAddress[ETH_ALEN]; signed long ifAdminStatus; signed long ifOperStatus; DWORD ifLastChange; @@ -228,10 +228,10 @@ typedef struct tagSISRCounters { // Tx packet information // typedef struct tagSTxPktInfo { - BYTE byBroadMultiUni; + u8 byBroadMultiUni; WORD wLength; WORD wFIFOCtl; - BYTE abyDestAddr[ETH_ALEN]; + u8 abyDestAddr[ETH_ALEN]; } STxPktInfo, *PSTxPktInfo; @@ -318,8 +318,8 @@ typedef struct tagSStatCounter { DWORD dwCntRxFrmLength; DWORD dwCntTxBufLength; - BYTE abyCntRxPattern[16]; - BYTE abyCntTxPattern[16]; + u8 abyCntRxPattern[16]; + u8 abyCntTxPattern[16]; @@ -376,30 +376,30 @@ typedef struct tagSStatCounter { void STAvClearAllCounter(PSStatCounter pStatistic); void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, - BYTE byIsr0, - BYTE byIsr1); + u8 byIsr0, + u8 byIsr1); void STAvUpdateRDStatCounter(PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, - BYTE byRxRate, PBYTE pbyBuffer, + u8 byRSR, u8 byNewRSR, u8 byRxSts, + u8 byRxRate, u8 * pbyBuffer, unsigned int cbFrameLength); void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, - BYTE byRxRate, PBYTE pbyBuffer, + u8 byRSR, u8 byNewRSR, u8 byRxSts, + u8 byRxRate, u8 * pbyBuffer, unsigned int cbFrameLength); -void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byPktNum, - BYTE byRate, BYTE byTSR); +void STAvUpdateTDStatCounter(PSStatCounter pStatistic, u8 byPktNum, + u8 byRate, u8 byTSR); void STAvUpdate802_11Counter( PSDot11Counters p802_11Counter, PSStatCounter pStatistic, - BYTE byRTSSuccess, - BYTE byRTSFail, - BYTE byACKFail, - BYTE byFCSErr + u8 byRTSSuccess, + u8 byRTSFail, + u8 byACKFail, + u8 byFCSErr ); void STAvClear802_11Counter(PSDot11Counters p802_11Counter); diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c index 4d41981..1fb88e6 100644 --- a/drivers/staging/vt6656/michael.c +++ b/drivers/staging/vt6656/michael.c @@ -26,8 +26,8 @@ * Date: Sep 4, 2002 * * Functions: - * s_dwGetUINT32 - Convert from BYTE[] to DWORD in a portable way - * s_vPutUINT32 - Convert from DWORD to BYTE[] in a portable way + * s_dwGetUINT32 - Convert from u8[] to DWORD in a portable way + * s_vPutUINT32 - Convert from DWORD to u8[] in a portable way * s_vClear - Reset the state to the empty message. * s_vSetKey - Set the key. * MIC_vInit - Set the key. @@ -48,16 +48,16 @@ /*--------------------- Static Functions --------------------------*/ /* - * static DWORD s_dwGetUINT32(BYTE * p); Get DWORD from + * static DWORD s_dwGetUINT32(u8 * p); Get DWORD from * 4 bytes LSByte first - * static void s_vPutUINT32(BYTE* p, DWORD val); Put DWORD into + * static void s_vPutUINT32(u8* p, DWORD val); Put DWORD into * 4 bytes LSByte first */ static void s_vClear(void); /* Clear the internal message, * resets the object to the * state just after construction. */ static void s_vSetKey(DWORD dwK0, DWORD dwK1); -static void s_vAppendByte(BYTE b); /* Add a single byte to the internal +static void s_vAppendByte(u8 b); /* Add a single byte to the internal * message */ /*--------------------- Export Variables --------------------------*/ @@ -69,8 +69,8 @@ static unsigned int nBytesInM; /* # bytes in M */ /*--------------------- Export Functions --------------------------*/ /* -static DWORD s_dwGetUINT32 (BYTE * p) -// Convert from BYTE[] to DWORD in a portable way +static DWORD s_dwGetUINT32 (u8 * p) +// Convert from u8[] to DWORD in a portable way { DWORD res = 0; unsigned int i; @@ -79,12 +79,12 @@ static DWORD s_dwGetUINT32 (BYTE * p) return res; } -static void s_vPutUINT32(BYTE *p, DWORD val) -// Convert from DWORD to BYTE[] in a portable way +static void s_vPutUINT32(u8 *p, DWORD val) +// Convert from DWORD to u8[] in a portable way { unsigned int i; for (i = 0; i < 4; i++) { - *p++ = (BYTE) (val & 0xff); + *p++ = (u8) (val & 0xff); val >>= 8; } } @@ -108,7 +108,7 @@ static void s_vSetKey(DWORD dwK0, DWORD dwK1) s_vClear(); } -static void s_vAppendByte(BYTE b) +static void s_vAppendByte(u8 b) { /* Append the byte to our word-sized buffer */ M |= b << (8*nBytesInM); @@ -148,7 +148,7 @@ void MIC_vUnInit(void) s_vClear(); } -void MIC_vAppend(PBYTE src, unsigned int nBytes) +void MIC_vAppend(u8 * src, unsigned int nBytes) { /* This is simple */ while (nBytes > 0) { diff --git a/drivers/staging/vt6656/michael.h b/drivers/staging/vt6656/michael.h index 81351f5..0740232 100644 --- a/drivers/staging/vt6656/michael.h +++ b/drivers/staging/vt6656/michael.h @@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1); void MIC_vUnInit(void); // Append bytes to the message to be MICed -void MIC_vAppend(PBYTE src, unsigned int nBytes); +void MIC_vAppend(u8 * src, unsigned int nBytes); // Get the MIC result. Destination should accept 8 bytes of result. // This also resets the message to empty. diff --git a/drivers/staging/vt6656/rc4.c b/drivers/staging/vt6656/rc4.c index 5c3c2d0..2fd836f 100644 --- a/drivers/staging/vt6656/rc4.c +++ b/drivers/staging/vt6656/rc4.c @@ -32,27 +32,27 @@ #include "rc4.h" -void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len) +void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len) { unsigned int ust1, ust2; unsigned int keyindex; unsigned int stateindex; - PBYTE pbyst; + u8 * pbyst; unsigned int idx; pbyst = pRC4->abystate; pRC4->ux = 0; pRC4->uy = 0; for (idx = 0; idx < 256; idx++) - pbyst[idx] = (BYTE)idx; + pbyst[idx] = (u8)idx; keyindex = 0; stateindex = 0; for (idx = 0; idx < 256; idx++) { ust1 = pbyst[idx]; stateindex = (stateindex + pbyKey[keyindex] + ust1) & 0xff; ust2 = pbyst[stateindex]; - pbyst[stateindex] = (BYTE)ust1; - pbyst[idx] = (BYTE)ust2; + pbyst[stateindex] = (u8)ust1; + pbyst[idx] = (u8)ust2; if (++keyindex >= cbKey_len) keyindex = 0; } @@ -63,7 +63,7 @@ unsigned int rc4_byte(PRC4Ext pRC4) unsigned int ux; unsigned int uy; unsigned int ustx, usty; - PBYTE pbyst; + u8 * pbyst; pbyst = pRC4->abystate; ux = (pRC4->ux + 1) & 0xff; @@ -72,16 +72,16 @@ unsigned int rc4_byte(PRC4Ext pRC4) usty = pbyst[uy]; pRC4->ux = ux; pRC4->uy = uy; - pbyst[uy] = (BYTE)ustx; - pbyst[ux] = (BYTE)usty; + pbyst[uy] = (u8)ustx; + pbyst[ux] = (u8)usty; return pbyst[(ustx + usty) & 0xff]; } -void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, - PBYTE pbySrc, unsigned int cbData_len) +void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest, + u8 * pbySrc, unsigned int cbData_len) { unsigned int ii; for (ii = 0; ii < cbData_len; ii++) - pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4)); + pbyDest[ii] = (u8)(pbySrc[ii] ^ rc4_byte(pRC4)); } diff --git a/drivers/staging/vt6656/rc4.h b/drivers/staging/vt6656/rc4.h index d447879c..2751d06 100644 --- a/drivers/staging/vt6656/rc4.h +++ b/drivers/staging/vt6656/rc4.h @@ -37,12 +37,12 @@ typedef struct { unsigned int ux; unsigned int uy; - BYTE abystate[256]; + u8 abystate[256]; } RC4Ext, *PRC4Ext; -void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len); +void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len); unsigned int rc4_byte(PRC4Ext pRC4); -void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc, +void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest, u8 * pbySrc, unsigned int cbData_len); #endif /* __RC4_H__ */ diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index fccf7e9..e14b4f7 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h @@ -74,43 +74,43 @@ typedef struct _CMD_MESSAGE { - BYTE byData[256]; + u8 byData[256]; } CMD_MESSAGE, *PCMD_MESSAGE; typedef struct _CMD_WRITE_MASK { - BYTE byData; - BYTE byMask; + u8 byData; + u8 byMask; } CMD_WRITE_MASK, *PCMD_WRITE_MASK; typedef struct _CMD_CARD_INIT { - BYTE byInitClass; - BYTE bExistSWNetAddr; - BYTE bySWNetAddr[6]; - BYTE byShortRetryLimit; - BYTE byLongRetryLimit; + u8 byInitClass; + u8 bExistSWNetAddr; + u8 bySWNetAddr[6]; + u8 byShortRetryLimit; + u8 byLongRetryLimit; } CMD_CARD_INIT, *PCMD_CARD_INIT; typedef struct _RSP_CARD_INIT { - BYTE byStatus; - BYTE byNetAddr[6]; - BYTE byRFType; - BYTE byMinChannel; - BYTE byMaxChannel; + u8 byStatus; + u8 byNetAddr[6]; + u8 byRFType; + u8 byMinChannel; + u8 byMaxChannel; } RSP_CARD_INIT, *PRSP_CARD_INIT; typedef struct _CMD_SET_KEY { WORD wKCTL; - BYTE abyMacAddr[6]; - BYTE abyKey[16]; + u8 abyMacAddr[6]; + u8 abyKey[16]; } CMD_SET_KEY, *PCMD_SET_KEY; typedef struct _CMD_CLRKEY_ENTRY { - BYTE abyKeyEntry[11]; + u8 abyKeyEntry[11]; } CMD_CLRKEY_ENTRY, *PCMD_CLRKEY_ENTRY; typedef struct _CMD_WRITE_MISCFF @@ -120,29 +120,29 @@ typedef struct _CMD_WRITE_MISCFF typedef struct _CMD_SET_TSFTBTT { - BYTE abyTSF_TBTT[8]; + u8 abyTSF_TBTT[8]; } CMD_SET_TSFTBTT, *PCMD_SET_TSFTBTT; typedef struct _CMD_SET_SSTIFS { - BYTE bySIFS; - BYTE byDIFS; - BYTE byEIFS; - BYTE bySlotTime; - BYTE byCwMax_Min; - BYTE byBBCR10; + u8 bySIFS; + u8 byDIFS; + u8 byEIFS; + u8 bySlotTime; + u8 byCwMax_Min; + u8 byBBCR10; } CMD_SET_SSTIFS, *PCMD_SET_SSTIFS; typedef struct _CMD_CHANGE_BBTYPE { - BYTE bySIFS; - BYTE byDIFS; - BYTE byEIFS; - BYTE bySlotTime; - BYTE byCwMax_Min; - BYTE byBBCR10; - BYTE byBB_BBType; //CR88 - BYTE byMAC_BBType; + u8 bySIFS; + u8 byDIFS; + u8 byEIFS; + u8 bySlotTime; + u8 byCwMax_Min; + u8 byBBCR10; + u8 byBB_BBType; //CR88 + u8 byMAC_BBType; DWORD dwRSPINF_b_1; DWORD dwRSPINF_b_2; DWORD dwRSPINF_b_55; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index b939dcf..d019b44 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -222,13 +222,13 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN ){ - memcpy(pDevice->abyPRNG, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pDevice->abyPRNG, (u8 *)&(dwRevIVCounter), 3); memcpy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); } else { - memcpy(pbyBuf, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pbyBuf, (u8 *)&(dwRevIVCounter), 3); memcpy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); if(pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) { - memcpy(pbyBuf+8, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pbyBuf+8, (u8 *)&(dwRevIVCounter), 3); memcpy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength); } memcpy(pDevice->abyPRNG, pbyBuf, 16); @@ -252,7 +252,7 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, // Make IV memcpy(pdwIV, pDevice->abyPRNG, 3); - *(pbyIVHead+3) = (BYTE)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV + *(pbyIVHead+3) = (u8)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV // Append IV&ExtIV after Mac Header *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %x\n", @@ -267,33 +267,33 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, // Make IV *pdwIV = 0; - *(pbyIVHead+3) = (BYTE)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV + *(pbyIVHead+3) = (u8)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV *pdwIV |= cpu_to_le16((WORD)(pTransmitKey->wTSC15_0)); //Append IV&ExtIV after Mac Header *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16); //Fill MICHDR0 *pMICHDR = 0x59; - *((PBYTE)(pMICHDR+1)) = 0; // TxPriority + *((u8 *)(pMICHDR+1)) = 0; // TxPriority memcpy(pMICHDR+2, &(pMACHeader->abyAddr2[0]), 6); - *((PBYTE)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16)); - *((PBYTE)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16)); - *((PBYTE)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16)); - *((PBYTE)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16)); - *((PBYTE)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0); - *((PBYTE)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0); - *((PBYTE)(pMICHDR+14)) = HIBYTE(wPayloadLen); - *((PBYTE)(pMICHDR+15)) = LOBYTE(wPayloadLen); + *((u8 *)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16)); + *((u8 *)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16)); + *((u8 *)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16)); + *((u8 *)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16)); + *((u8 *)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0); + *((u8 *)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0); + *((u8 *)(pMICHDR+14)) = HIBYTE(wPayloadLen); + *((u8 *)(pMICHDR+15)) = LOBYTE(wPayloadLen); //Fill MICHDR1 - *((PBYTE)(pMICHDR+16)) = 0; // HLEN[15:8] + *((u8 *)(pMICHDR+16)) = 0; // HLEN[15:8] if (pDevice->bLongHeader) { - *((PBYTE)(pMICHDR+17)) = 28; // HLEN[7:0] + *((u8 *)(pMICHDR+17)) = 28; // HLEN[7:0] } else { - *((PBYTE)(pMICHDR+17)) = 22; // HLEN[7:0] + *((u8 *)(pMICHDR+17)) = 22; // HLEN[7:0] } wValue = cpu_to_le16(pMACHeader->wFrameCtl & 0xC78F); - memcpy(pMICHDR+18, (PBYTE)&wValue, 2); // MSKFRACTL + memcpy(pMICHDR+18, (u8 *)&wValue, 2); // MSKFRACTL memcpy(pMICHDR+20, &(pMACHeader->abyAddr1[0]), 6); memcpy(pMICHDR+26, &(pMACHeader->abyAddr2[0]), 6); @@ -302,7 +302,7 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, wValue = pMACHeader->wSeqCtl; wValue &= 0x000F; wValue = cpu_to_le16(wValue); - memcpy(pMICHDR+38, (PBYTE)&wValue, 2); // MSKSEQCTL + memcpy(pMICHDR+38, (u8 *)&wValue, 2); // MSKSEQCTL if (pDevice->bLongHeader) { memcpy(pMICHDR+40, &(pMACHeader->abyAddr4[0]), 6); } @@ -671,7 +671,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_ab pBuf = (PSTxDataHead_ab) pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, @@ -688,10 +688,10 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_g pBuf = (PSTxDataHead_g)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength_a), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) + (PWORD)&(pBuf->wTransmitLength_a), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); BBvCalculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(pBuf->wTransmitLength_b), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(pBuf->wTransmitLength_b), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); //Get Duration and TimeStamp pBuf->wDuration_a = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, @@ -711,10 +711,10 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength_a), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) + (PWORD)&(pBuf->wTransmitLength_a), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); BBvCalculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(pBuf->wTransmitLength_b), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(pBuf->wTransmitLength_b), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); //Get Duration and TimeStamp pBuf->wDuration_a = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, @@ -737,7 +737,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_a_FB pBuf = (PSTxDataHead_a_FB)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, @@ -754,7 +754,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, @@ -772,7 +772,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(pBuf->wTransmitLength), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, @@ -810,11 +810,11 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, PSRTS_g pBuf = (PSRTS_g)pvRTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration @@ -852,11 +852,11 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration @@ -901,7 +901,7 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -936,7 +936,7 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -972,7 +972,7 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -1028,7 +1028,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, PSCTS_FB pBuf = (PSCTS_FB)pvCTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); pBuf->wDuration_ba = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data @@ -1053,7 +1053,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, PSCTS pBuf = (PSCTS)pvCTS; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) + (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get CTSDuration_ba @@ -1195,7 +1195,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter END.\n"); } /* - PBYTE pbyBuffer,//point to pTxBufHead + u8 * pbyBuffer,//point to pTxBufHead WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last unsigned int cbFragmentSize,//Hdr+payoad+FCS */ @@ -1358,7 +1358,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pTxBufHead->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY); } - pbyTxBufferAddr = (PBYTE) &(pTxBufHead->adwTxKey[0]); + pbyTxBufferAddr = (u8 *) &(pTxBufHead->adwTxKey[0]); wTxBufSize = sizeof(STxBufHead); if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet if (byFBOption == AUTO_FB_NONE) { @@ -1437,9 +1437,9 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } // Auto Fall Back } - pbyMacHdr = (PBYTE)(pbyTxBufferAddr + cbHeaderLength); - pbyIVHead = (PBYTE)(pbyMacHdr + cbMACHdLen + uPadding); - pbyPayloadHead = (PBYTE)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen); + pbyMacHdr = (u8 *)(pbyTxBufferAddr + cbHeaderLength); + pbyIVHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding); + pbyPayloadHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen); //========================= @@ -1464,8 +1464,8 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, if (bNeedEncryption == true) { //Fill TXKEY - s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - pbyMacHdr, (WORD)cbFrameBodySize, (PBYTE)pMICHDR); + s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, + pbyMacHdr, (WORD)cbFrameBodySize, (u8 *)pMICHDR); if (pDevice->bEnableHostWEP) { pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16; @@ -1478,15 +1478,15 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, if (pDevice->dwDiagRefCount == 0) { if ((psEthHeader->wType == cpu_to_be16(ETH_P_IPX)) || (psEthHeader->wType == cpu_to_le16(0xF380))) { - memcpy((PBYTE) (pbyPayloadHead), + memcpy((u8 *) (pbyPayloadHead), abySNAP_Bridgetunnel, 6); } else { - memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); + memcpy((u8 *) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); } - pbyType = (PBYTE) (pbyPayloadHead + 6); + pbyType = (u8 *) (pbyPayloadHead + 6); memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD)); } else { - memcpy((PBYTE) (pbyPayloadHead), &(psEthHeader->wType), sizeof(WORD)); + memcpy((u8 *) (pbyPayloadHead), &(psEthHeader->wType), sizeof(WORD)); } @@ -1502,7 +1502,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } else { // while bRelayPacketSend psEthHeader is point to header+payload - memcpy((pbyPayloadHead + cb802_1_H_len), ((PBYTE)psEthHeader) + ETH_HLEN, uSkbPacketLen - ETH_HLEN); + memcpy((pbyPayloadHead + cb802_1_H_len), ((u8 *)psEthHeader) + ETH_HLEN, uSkbPacketLen - ETH_HLEN); } ASSERT(uLength == cbNdisBodySize); @@ -1525,9 +1525,9 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } // DO Software Michael MIC_vInit(dwMICKey0, dwMICKey1); - MIC_vAppend((PBYTE)&(psEthHeader->abyDstAddr[0]), 12); + MIC_vAppend((u8 *)&(psEthHeader->abyDstAddr[0]), 12); dwMIC_Priority = 0; - MIC_vAppend((PBYTE)&dwMIC_Priority, 4); + MIC_vAppend((u8 *)&dwMIC_Priority, 4); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %X, %X\n", dwMICKey0, dwMICKey1); @@ -1535,7 +1535,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, //DBG_PRN_GRP12(("Length:%d, %d\n", cbFrameBodySize, uFromHDtoPLDLength)); //for (ii = 0; ii < cbFrameBodySize; ii++) { - // DBG_PRN_GRP12(("%02x ", *((PBYTE)((pbyPayloadHead + cb802_1_H_len) + ii)))); + // DBG_PRN_GRP12(("%02x ", *((u8 *)((pbyPayloadHead + cb802_1_H_len) + ii)))); //} //DBG_PRN_GRP12(("\n\n\n")); @@ -1740,7 +1740,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } pTX_Buffer = (PTX_BUFFER) (&pContext->Data[0]); - pbyTxBufferAddr = (PBYTE)&(pTX_Buffer->adwTxKey[0]); + pbyTxBufferAddr = (u8 *)&(pTX_Buffer->adwTxKey[0]); cbFrameBodySize = pPacket->cbPayloadLen; pTxBufHead = (PSTxBufHead) pbyTxBufferAddr; wTxBufSize = sizeof(STxBufHead); @@ -1902,13 +1902,13 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, cbReqCount = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen + cbFrameBodySize; if (WLAN_GET_FC_ISWEP(pPacket->p80211Header->sA4.wFrameCtl) != 0) { - PBYTE pbyIVHead; - PBYTE pbyPayloadHead; - PBYTE pbyBSSID; + u8 * pbyIVHead; + u8 * pbyPayloadHead; + u8 * pbyBSSID; PSKeyItem pTransmitKey = NULL; - pbyIVHead = (PBYTE)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding); - pbyPayloadHead = (PBYTE)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen); + pbyIVHead = (u8 *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding); + pbyPayloadHead = (u8 *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen); do { if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) && (pDevice->bLinkPass == true)) { @@ -1935,11 +1935,11 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } } while(false); //Fill TXKEY - s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - (PBYTE)pMACHeader, (WORD)cbFrameBodySize, NULL); + s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, + (u8 *)pMACHeader, (WORD)cbFrameBodySize, NULL); memcpy(pMACHeader, pPacket->p80211Header, cbMacHdLen); - memcpy(pbyPayloadHead, ((PBYTE)(pPacket->p80211Header) + cbMacHdLen), + memcpy(pbyPayloadHead, ((u8 *)(pPacket->p80211Header) + cbMacHdLen), cbFrameBodySize); } else { @@ -1968,7 +1968,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, pTX_Buffer->wTxByteCount = cpu_to_le16((WORD)(cbReqCount)); - pTX_Buffer->byPKTNO = (BYTE) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); + pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x00; pContext->pPacket = NULL; @@ -1976,10 +1976,10 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, pContext->uBufLen = (WORD)cbReqCount + 4; //USB header if (WLAN_GET_FC_TODS(pMACHeader->wFrameCtl) == 0) { - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); } else { - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); } PIPEnsSendBulkOut(pDevice,pContext); @@ -2012,7 +2012,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, return status ; } pTX_Buffer = (PBEACON_BUFFER) (&pContext->Data[0]); - pbyTxBufferAddr = (PBYTE)&(pTX_Buffer->wFIFOCtl); + pbyTxBufferAddr = (u8 *)&(pTX_Buffer->wFIFOCtl); cbFrameBodySize = pPacket->cbPayloadLen; @@ -2025,7 +2025,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, pTxDataHead = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize); //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11A, - (PWORD)&(pTxDataHead->wTransmitLength), (PBYTE)&(pTxDataHead->byServiceField), (PBYTE)&(pTxDataHead->bySignalField) + (PWORD)&(pTxDataHead->wTransmitLength), (u8 *)&(pTxDataHead->byServiceField), (u8 *)&(pTxDataHead->bySignalField) ); //Get Duration and TimeStampOff pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, PK_TYPE_11A, @@ -2038,7 +2038,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, pTxDataHead = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize); //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11B, - (PWORD)&(pTxDataHead->wTransmitLength), (PBYTE)&(pTxDataHead->byServiceField), (PBYTE)&(pTxDataHead->bySignalField) + (PWORD)&(pTxDataHead->wTransmitLength), (u8 *)&(pTxDataHead->byServiceField), (u8 *)&(pTxDataHead->bySignalField) ); //Get Duration and TimeStampOff pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, PK_TYPE_11B, @@ -2060,7 +2060,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, cbReqCount = cbHeaderSize + WLAN_HDR_ADDR3_LEN + cbFrameBodySize; pTX_Buffer->wTxByteCount = (WORD)cbReqCount; - pTX_Buffer->byPKTNO = (BYTE) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); + pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x01; pContext->pPacket = NULL; @@ -2126,7 +2126,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } pTX_Buffer = (PTX_BUFFER)(&pContext->Data[0]); - pbyTxBufferAddr = (PBYTE)(&pTX_Buffer->adwTxKey[0]); + pbyTxBufferAddr = (u8 *)(&pTX_Buffer->adwTxKey[0]); pTxBufHead = (PSTxBufHead) pbyTxBufferAddr; wTxBufSize = sizeof(STxBufHead); memset(pTxBufHead, 0, wTxBufSize); @@ -2177,7 +2177,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } else { if (pDevice->bEnableHostWEP) { - if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p80211Header->sA3.abyAddr1), &uNodeIndex)) + if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(p80211Header->sA3.abyAddr1), &uNodeIndex)) bNodeExist = true; } bNeedACK = true; @@ -2314,9 +2314,9 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) cbReqCount = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen + (cbFrameBodySize + cbMIClen) + cbExtSuppRate; - pbyMacHdr = (PBYTE)(pbyTxBufferAddr + cbHeaderSize); - pbyPayloadHead = (PBYTE)(pbyMacHdr + cbMacHdLen + uPadding + cbIVlen); - pbyIVHead = (PBYTE)(pbyMacHdr + cbMacHdLen + uPadding); + pbyMacHdr = (u8 *)(pbyTxBufferAddr + cbHeaderSize); + pbyPayloadHead = (u8 *)(pbyMacHdr + cbMacHdLen + uPadding + cbIVlen); + pbyIVHead = (u8 *)(pbyMacHdr + cbMacHdLen + uPadding); // Copy the Packet into a tx Buffer memcpy(pbyMacHdr, skb->data, cbMacHdLen); @@ -2364,9 +2364,9 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) // DO Software Michael MIC_vInit(dwMICKey0, dwMICKey1); - MIC_vAppend((PBYTE)&(sEthHeader.abyDstAddr[0]), 12); + MIC_vAppend((u8 *)&(sEthHeader.abyDstAddr[0]), 12); dwMIC_Priority = 0; - MIC_vAppend((PBYTE)&dwMIC_Priority, 4); + MIC_vAppend((u8 *)&dwMIC_Priority, 4); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY:"\ " %X, %X\n", dwMICKey0, dwMICKey1); @@ -2393,8 +2393,8 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } - s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - pbyMacHdr, (WORD)cbFrameBodySize, (PBYTE)pMICHDR); + s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, + pbyMacHdr, (WORD)cbFrameBodySize, (u8 *)pMICHDR); if (pDevice->bEnableHostWEP) { pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16; @@ -2427,7 +2427,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } pTX_Buffer->wTxByteCount = cpu_to_le16((WORD)(cbReqCount)); - pTX_Buffer->byPKTNO = (BYTE) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); + pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x00; pContext->pPacket = skb; @@ -2435,10 +2435,10 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) pContext->uBufLen = (WORD)cbReqCount + 4; //USB header if (WLAN_GET_FC_TODS(pMACHeader->wFrameCtl) == 0) { - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); } else { - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); } PIPEnsSendBulkOut(pDevice,pContext); return ; @@ -2496,7 +2496,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, return 0; } - if (is_multicast_ether_addr((PBYTE)(skb->data))) { + if (is_multicast_ether_addr((u8 *)(skb->data))) { uNodeIndex = 0; bNodeExist = true; if (pMgmt->sNodeDBTable[0].bPSEnable) { @@ -2518,7 +2518,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, }else { - if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(skb->data), &uNodeIndex)) { + if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(skb->data), &uNodeIndex)) { if (pMgmt->sNodeDBTable[uNodeIndex].bPSEnable) { @@ -2562,13 +2562,13 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, return STATUS_RESOURCES; } - memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN); + memcpy(pDevice->sTxEthHeader.abyDstAddr, (u8 *)(skb->data), ETH_HLEN); //mike add:station mode check eapol-key challenge---> { - BYTE Protocol_Version; //802.1x Authentication - BYTE Packet_Type; //802.1x Authentication - BYTE Descriptor_type; + u8 Protocol_Version; //802.1x Authentication + u8 Packet_Type; //802.1x Authentication + u8 Descriptor_type; WORD Key_info; Protocol_Version = skb->data[ETH_HLEN]; @@ -2665,7 +2665,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } } - byPktType = (BYTE)pDevice->byPacketType; + byPktType = (u8)pDevice->byPacketType; if (pDevice->bFixRate) { if (pDevice->byBBType == BB_TYPE_11B) { @@ -2793,9 +2793,9 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType, - (PBYTE)(&pContext->Data[0]), bNeedEncryption, + (u8 *)(&pContext->Data[0]), bNeedEncryption, skb->len, uDMAIdx, &pDevice->sTxEthHeader, - (PBYTE)skb->data, pTransmitKey, uNodeIndex, + (u8 *)skb->data, pTransmitKey, uNodeIndex, pDevice->wCurrentRate, &uHeaderLen, &BytesToWrite ); @@ -2816,21 +2816,21 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } pTX_Buffer = (PTX_BUFFER)&(pContext->Data[0]); - pTX_Buffer->byPKTNO = (BYTE) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); + pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->wTxByteCount = (WORD)BytesToWrite; pContext->pPacket = skb; pContext->Type = CONTEXT_DATA_PACKET; pContext->uBufLen = (WORD)BytesToWrite + 4 ; //USB header - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pContext->sEthHeader.abyDstAddr[0]),(WORD) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pContext->sEthHeader.abyDstAddr[0]),(WORD) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); status = PIPEnsSendBulkOut(pDevice,pContext); if (bNeedDeAuth == true) { WORD wReason = WLAN_MGMT_REASON_MIC_FAILURE; - bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (PBYTE) &wReason); + bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (u8 *) &wReason); } if(status!=STATUS_PENDING) { @@ -2885,7 +2885,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, return false; } - memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)pbySkbData, ETH_HLEN); + memcpy(pDevice->sTxEthHeader.abyDstAddr, (u8 *)pbySkbData, ETH_HLEN); if (pDevice->bEncryptionEnable == true) { bNeedEncryption = true; @@ -2919,7 +2919,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, return false; } - byPktTyp = (BYTE)pDevice->byPacketType; + byPktTyp = (u8)pDevice->byPacketType; if (pDevice->bFixRate) { if (pDevice->byBBType == BB_TYPE_11B) { @@ -2957,7 +2957,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, // and send the irp. fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType, - (PBYTE)(&pContext->Data[0]), bNeedEncryption, + (u8 *)(&pContext->Data[0]), bNeedEncryption, uDataLen, TYPE_AC0DMA, &pDevice->sTxEthHeader, pbySkbData, pTransmitKey, uNodeIndex, pDevice->wCurrentRate, @@ -2970,14 +2970,14 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, } pTX_Buffer = (PTX_BUFFER)&(pContext->Data[0]); - pTX_Buffer->byPKTNO = (BYTE) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); + pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->wTxByteCount = (WORD)BytesToWrite; pContext->pPacket = NULL; pContext->Type = CONTEXT_DATA_PACKET; pContext->uBufLen = (WORD)BytesToWrite + 4 ; //USB header - s_vSaveTxPktInfo(pDevice, (BYTE) (pTX_Buffer->byPKTNO & 0x0F), &(pContext->sEthHeader.abyDstAddr[0]),(WORD) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pContext->sEthHeader.abyDstAddr[0]),(WORD) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); status = PIPEnsSendBulkOut(pDevice,pContext); diff --git a/drivers/staging/vt6656/rxtx.h b/drivers/staging/vt6656/rxtx.h index 9f53702..7ca185e 100644 --- a/drivers/staging/vt6656/rxtx.h +++ b/drivers/staging/vt6656/rxtx.h @@ -43,8 +43,8 @@ typedef struct tagSRTSDataF { WORD wFrameControl; WORD wDurationID; - BYTE abyRA[ETH_ALEN]; - BYTE abyTA[ETH_ALEN]; + u8 abyRA[ETH_ALEN]; + u8 abyTA[ETH_ALEN]; } SRTSDataF, *PSRTSDataF; // @@ -53,7 +53,7 @@ typedef struct tagSRTSDataF { typedef struct tagSCTSDataF { WORD wFrameControl; WORD wDurationID; - BYTE abyRA[ETH_ALEN]; + u8 abyRA[ETH_ALEN]; WORD wReserved; } SCTSDataF, *PSCTSDataF; @@ -78,11 +78,11 @@ typedef struct tagSTX_NAF_G_RTS WORD wTxRrvTime_a; //RTS - BYTE byRTSSignalField_b; - BYTE byRTSServiceField_b; + u8 byRTSSignalField_b; + u8 byRTSServiceField_b; WORD wRTSTransmitLength_b; - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_ba; WORD wRTSDuration_aa; @@ -91,11 +91,11 @@ typedef struct tagSTX_NAF_G_RTS SRTSDataF sRTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -117,11 +117,11 @@ typedef struct tagSTX_NAF_G_RTS_MIC SMICHDR sMICHDR; //RTS - BYTE byRTSSignalField_b; - BYTE byRTSServiceField_b; + u8 byRTSSignalField_b; + u8 byRTSServiceField_b; WORD wRTSTransmitLength_b; - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_ba; WORD wRTSDuration_aa; @@ -130,11 +130,11 @@ typedef struct tagSTX_NAF_G_RTS_MIC SRTSDataF sRTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -152,19 +152,19 @@ typedef struct tagSTX_NAF_G_CTS WORD wTxRrvTime_a; //CTS - BYTE byCTSSignalField_b; - BYTE byCTSServiceField_b; + u8 byCTSSignalField_b; + u8 byCTSServiceField_b; WORD wCTSTransmitLength_b; WORD wCTSDuration_ba; WORD wReserved3; SCTSDataF sCTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -186,19 +186,19 @@ typedef struct tagSTX_NAF_G_CTS_MIC SMICHDR sMICHDR; //CTS - BYTE byCTSSignalField_b; - BYTE byCTSServiceField_b; + u8 byCTSSignalField_b; + u8 byCTSServiceField_b; WORD wCTSTransmitLength_b; WORD wCTSDuration_ba; WORD wReserved3; SCTSDataF sCTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -214,16 +214,16 @@ typedef struct tagSTX_NAF_G_BEACON WORD wTimeStamp; //CTS - BYTE byCTSSignalField_b; - BYTE byCTSServiceField_b; + u8 byCTSSignalField_b; + u8 byCTSServiceField_b; WORD wCTSTransmitLength_b; WORD wCTSDuration_ba; WORD wReserved1; SCTSDataF sCTS; //Data - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_a; WORD wTimeStampOff_a; @@ -239,16 +239,16 @@ typedef struct tagSTX_NAF_AB_RTS WORD wTxRrvTime_ab; //RTS - BYTE byRTSSignalField_ab; - BYTE byRTSServiceField_ab; + u8 byRTSSignalField_ab; + u8 byRTSServiceField_ab; WORD wRTSTransmitLength_ab; WORD wRTSDuration_ab; WORD wReserved2; SRTSDataF sRTS; //Data - BYTE bySignalField_ab; - BYTE byServiceField_ab; + u8 bySignalField_ab; + u8 byServiceField_ab; WORD wTransmitLength_ab; WORD wDuration_ab; WORD wTimeStampOff_ab; @@ -266,16 +266,16 @@ typedef struct tagSTX_NAF_AB_RTS_MIC SMICHDR sMICHDR; //RTS - BYTE byRTSSignalField_ab; - BYTE byRTSServiceField_ab; + u8 byRTSSignalField_ab; + u8 byRTSServiceField_ab; WORD wRTSTransmitLength_ab; WORD wRTSDuration_ab; WORD wReserved2; SRTSDataF sRTS; //Data - BYTE bySignalField_ab; - BYTE byServiceField_ab; + u8 bySignalField_ab; + u8 byServiceField_ab; WORD wTransmitLength_ab; WORD wDuration_ab; WORD wTimeStampOff_ab; @@ -292,8 +292,8 @@ typedef struct tagSTX_NAF_AB_CTS WORD wTxRrvTime_ab; //Data - BYTE bySignalField_ab; - BYTE byServiceField_ab; + u8 bySignalField_ab; + u8 byServiceField_ab; WORD wTransmitLength_ab; WORD wDuration_ab; WORD wTimeStampOff_ab; @@ -309,8 +309,8 @@ typedef struct tagSTX_NAF_AB_CTS_MIC SMICHDR sMICHDR; //Data - BYTE bySignalField_ab; - BYTE byServiceField_ab; + u8 bySignalField_ab; + u8 byServiceField_ab; WORD wTransmitLength_ab; WORD wDuration_ab; WORD wTimeStampOff_ab; @@ -324,8 +324,8 @@ typedef struct tagSTX_NAF_AB_BEACON WORD wTimeStamp; //Data - BYTE bySignalField_ab; - BYTE byServiceField_ab; + u8 bySignalField_ab; + u8 byServiceField_ab; WORD wTransmitLength_ab; WORD wDuration_ab; WORD wTimeStampOff_ab; @@ -343,11 +343,11 @@ typedef struct tagSTX_AF_G_RTS WORD wTxRrvTime_a; //RTS - BYTE byRTSSignalField_b; - BYTE byRTSServiceField_b; + u8 byRTSSignalField_b; + u8 byRTSServiceField_b; WORD wRTSTransmitLength_b; - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_ba; WORD wRTSDuration_aa; @@ -360,11 +360,11 @@ typedef struct tagSTX_AF_G_RTS SRTSDataF sRTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -389,11 +389,11 @@ typedef struct tagSTX_AF_G_RTS_MIC SMICHDR sMICHDR; //RTS - BYTE byRTSSignalField_b; - BYTE byRTSServiceField_b; + u8 byRTSSignalField_b; + u8 byRTSServiceField_b; WORD wRTSTransmitLength_b; - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_ba; WORD wRTSDuration_aa; @@ -406,11 +406,11 @@ typedef struct tagSTX_AF_G_RTS_MIC SRTSDataF sRTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -432,8 +432,8 @@ typedef struct tagSTX_AF_G_CTS WORD wTxRrvTime_a; //CTS - BYTE byCTSSignalField_b; - BYTE byCTSServiceField_b; + u8 byCTSSignalField_b; + u8 byCTSServiceField_b; WORD wCTSTransmitLength_b; WORD wCTSDuration_ba; WORD wReserved3; @@ -442,11 +442,11 @@ typedef struct tagSTX_AF_G_CTS SCTSDataF sCTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -470,8 +470,8 @@ typedef struct tagSTX_AF_G_CTS_MIC SMICHDR sMICHDR; //CTS - BYTE byCTSSignalField_b; - BYTE byCTSServiceField_b; + u8 byCTSSignalField_b; + u8 byCTSServiceField_b; WORD wCTSTransmitLength_b; WORD wCTSDuration_ba; WORD wReserved3; @@ -480,11 +480,11 @@ typedef struct tagSTX_AF_G_CTS_MIC SCTSDataF sCTS; //Data - BYTE bySignalField_b; - BYTE byServiceField_b; + u8 bySignalField_b; + u8 byServiceField_b; WORD wTransmitLength_b; - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_b; WORD wDuration_a; @@ -504,8 +504,8 @@ typedef struct tagSTX_AF_A_RTS WORD wTxRrvTime_a; //RTS - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_a; WORD wReserved2; @@ -514,8 +514,8 @@ typedef struct tagSTX_AF_A_RTS SRTSDataF sRTS; //Data - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_a; WORD wTimeStampOff_a; @@ -534,8 +534,8 @@ typedef struct tagSTX_AF_A_RTS_MIC SMICHDR sMICHDR; //RTS - BYTE byRTSSignalField_a; - BYTE byRTSServiceField_a; + u8 byRTSSignalField_a; + u8 byRTSServiceField_a; WORD wRTSTransmitLength_a; WORD wRTSDuration_a; WORD wReserved2; @@ -544,8 +544,8 @@ typedef struct tagSTX_AF_A_RTS_MIC SRTSDataF sRTS; //Data - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_a; WORD wTimeStampOff_a; @@ -563,8 +563,8 @@ typedef struct tagSTX_AF_A_CTS WORD wTxRrvTime_a; //Data - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_a; WORD wTimeStampOff_a; @@ -583,8 +583,8 @@ typedef struct tagSTX_AF_A_CTS_MIC SMICHDR sMICHDR; //Data - BYTE bySignalField_a; - BYTE byServiceField_a; + u8 bySignalField_a; + u8 byServiceField_a; WORD wTransmitLength_a; WORD wDuration_a; WORD wTimeStampOff_a; @@ -626,8 +626,8 @@ typedef union tagUTX_BUFFER_CONTAINER // typedef struct tagSTX_BUFFER { - BYTE byType; - BYTE byPKTNO; + u8 byType; + u8 byPKTNO; WORD wTxByteCount; u32 adwTxKey[4]; @@ -648,8 +648,8 @@ typedef struct tagSTX_BUFFER // typedef struct tagSBEACON_BUFFER { - BYTE byType; - BYTE byPKTNO; + u8 byType; + u8 byPKTNO; WORD wTxByteCount; WORD wFIFOCtl; diff --git a/drivers/staging/vt6656/srom.h b/drivers/staging/vt6656/srom.h index dba21a5..c681789 100644 --- a/drivers/staging/vt6656/srom.h +++ b/drivers/staging/vt6656/srom.h @@ -86,34 +86,34 @@ // 2048 bits = 256 bytes = 128 words // typedef struct tagSSromReg { - BYTE abyPAR[6]; // 0x00 (WORD) + u8 abyPAR[6]; // 0x00 (WORD) WORD wSUB_VID; // 0x03 (WORD) WORD wSUB_SID; - BYTE byBCFG0; // 0x05 (WORD) - BYTE byBCFG1; - - BYTE byFCR0; // 0x06 (WORD) - BYTE byFCR1; - BYTE byPMC0; // 0x07 (WORD) - BYTE byPMC1; - BYTE byMAXLAT; // 0x08 (WORD) - BYTE byMINGNT; - BYTE byCFG0; // 0x09 (WORD) - BYTE byCFG1; + u8 byBCFG0; // 0x05 (WORD) + u8 byBCFG1; + + u8 byFCR0; // 0x06 (WORD) + u8 byFCR1; + u8 byPMC0; // 0x07 (WORD) + u8 byPMC1; + u8 byMAXLAT; // 0x08 (WORD) + u8 byMINGNT; + u8 byCFG0; // 0x09 (WORD) + u8 byCFG1; WORD wCISPTR; // 0x0A (WORD) WORD wRsv0; // 0x0B (WORD) WORD wRsv1; // 0x0C (WORD) - BYTE byBBPAIR; // 0x0D (WORD) - BYTE byRFTYPE; - BYTE byMinChannel; // 0x0E (WORD) - BYTE byMaxChannel; - BYTE bySignature; // 0x0F (WORD) - BYTE byCheckSum; - - BYTE abyReserved0[96]; // 0x10 (WORD) - BYTE abyCIS[128]; // 0x80 (WORD) + u8 byBBPAIR; // 0x0D (WORD) + u8 byRFTYPE; + u8 byMinChannel; // 0x0E (WORD) + u8 byMaxChannel; + u8 bySignature; // 0x0F (WORD) + u8 byCheckSum; + + u8 abyReserved0[96]; // 0x10 (WORD) + u8 abyCIS[128]; // 0x80 (WORD) } SSromReg, *PSSromReg; /*--------------------- Export Macros ------------------------------*/ diff --git a/drivers/staging/vt6656/tcrc.c b/drivers/staging/vt6656/tcrc.c index 2237eeb..d4db713 100644 --- a/drivers/staging/vt6656/tcrc.c +++ b/drivers/staging/vt6656/tcrc.c @@ -132,13 +132,13 @@ static const DWORD s_adwCrc32Table[256] = { * Return Value: CRC-32 * -*/ -DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed) +DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed) { DWORD dwCrc; dwCrc = dwCrcSeed; while (cbByte--) { - dwCrc = s_adwCrc32Table[(BYTE)((dwCrc ^ (*pbyData)) & 0xFF)] ^ + dwCrc = s_adwCrc32Table[(u8)((dwCrc ^ (*pbyData)) & 0xFF)] ^ (dwCrc >> 8); pbyData++; } @@ -165,7 +165,7 @@ DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte) +DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte) { return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL); } @@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC) +DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC) { return CRCdwCrc32(pbyData, cbByte, dwPreCRC); } diff --git a/drivers/staging/vt6656/tcrc.h b/drivers/staging/vt6656/tcrc.h index dc54bd8..342061d 100644 --- a/drivers/staging/vt6656/tcrc.h +++ b/drivers/staging/vt6656/tcrc.h @@ -43,8 +43,8 @@ /*--------------------- Export Functions --------------------------*/ -DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed); -DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte); -DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC); +DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed); +DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte); +DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC); #endif /* __TCRC_H__ */ diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c index 95286c4..c92efda 100644 --- a/drivers/staging/vt6656/tether.c +++ b/drivers/staging/vt6656/tether.c @@ -61,14 +61,14 @@ * Return Value: Hash value * */ -BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr) +u8 ETHbyGetHashIndexByCrc32(u8 * pbyMultiAddr) { int ii; - BYTE byTmpHash; - BYTE byHash = 0; + u8 byTmpHash; + u8 byHash = 0; /* get the least 6-bits from CRC generator */ - byTmpHash = (BYTE)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN, + byTmpHash = (u8)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN, 0xFFFFFFFFL) & 0x3F); /* reverse most bit to least bit */ for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) { @@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr) * Return Value: true if ok; false if error. * */ -bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength) +bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength) { DWORD dwCRC; diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h index 2f8f485..0b8a40f 100644 --- a/drivers/staging/vt6656/tether.h +++ b/drivers/staging/vt6656/tether.h @@ -120,8 +120,8 @@ // Ethernet packet // typedef struct tagSEthernetHeader { - BYTE abyDstAddr[ETH_ALEN]; - BYTE abySrcAddr[ETH_ALEN]; + u8 abyDstAddr[ETH_ALEN]; + u8 abySrcAddr[ETH_ALEN]; WORD wType; } __attribute__ ((__packed__)) SEthernetHeader, *PSEthernetHeader; @@ -131,8 +131,8 @@ SEthernetHeader, *PSEthernetHeader; // 802_3 packet // typedef struct tagS802_3Header { - BYTE abyDstAddr[ETH_ALEN]; - BYTE abySrcAddr[ETH_ALEN]; + u8 abyDstAddr[ETH_ALEN]; + u8 abySrcAddr[ETH_ALEN]; WORD wLen; } __attribute__ ((__packed__)) S802_3Header, *PS802_3Header; @@ -143,11 +143,11 @@ S802_3Header, *PS802_3Header; typedef struct tagS802_11Header { WORD wFrameCtl; WORD wDurationID; - BYTE abyAddr1[ETH_ALEN]; - BYTE abyAddr2[ETH_ALEN]; - BYTE abyAddr3[ETH_ALEN]; + u8 abyAddr1[ETH_ALEN]; + u8 abyAddr2[ETH_ALEN]; + u8 abyAddr3[ETH_ALEN]; WORD wSeqCtl; - BYTE abyAddr4[ETH_ALEN]; + u8 abyAddr4[ETH_ALEN]; } __attribute__ ((__packed__)) S802_11Header, *PS802_11Header; @@ -159,8 +159,8 @@ S802_11Header, *PS802_11Header; /*--------------------- Export Functions --------------------------*/ -BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr); -//BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr); -bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength); +u8 ETHbyGetHashIndexByCrc32(u8 * pbyMultiAddr); +//u8 ETHbyGetHashIndexByCrc(u8 * pbyMultiAddr); +bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength); #endif /* __TETHER_H__ */ diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c index 282c08d..c6d3a83 100644 --- a/drivers/staging/vt6656/tkip.c +++ b/drivers/staging/vt6656/tkip.c @@ -55,7 +55,7 @@ /* The 2nd table is the same as the 1st but with the upper and lower */ /* bytes swapped. To allow an endian tolerant implementation, the byte */ /* halves have been expressed independently here. */ -const BYTE TKIP_Sbox_Lower[256] = { +const u8 TKIP_Sbox_Lower[256] = { 0xA5,0x84,0x99,0x8D,0x0D,0xBD,0xB1,0x54, 0x50,0x03,0xA9,0x7D,0x19,0x62,0xE6,0x9A, 0x45,0x9D,0x40,0x87,0x15,0xEB,0xC9,0x0B, @@ -90,7 +90,7 @@ const BYTE TKIP_Sbox_Lower[256] = { 0xC3,0xB0,0x77,0x11,0xCB,0xFC,0xD6,0x3A }; -const BYTE TKIP_Sbox_Upper[256] = { +const u8 TKIP_Sbox_Upper[256] = { 0xC6,0xF8,0xEE,0xF6,0xFF,0xD6,0xDE,0x91, 0x60,0x02,0xCE,0x56,0xE7,0xB5,0x4D,0xEC, 0x8F,0x1F,0x89,0xFA,0xEF,0xB2,0x8E,0xFB, @@ -182,11 +182,11 @@ static unsigned int rotr1(unsigned int a) * */ void TKIPvMixKey( - PBYTE pbyTKey, - PBYTE pbyTA, + u8 * pbyTKey, + u8 * pbyTA, WORD wTSC15_0, DWORD dwTSC47_16, - PBYTE pbyRC4Key + u8 * pbyRC4Key ) { u32 p1k[5]; diff --git a/drivers/staging/vt6656/tkip.h b/drivers/staging/vt6656/tkip.h index 47c3a85..b8e5d44 100644 --- a/drivers/staging/vt6656/tkip.h +++ b/drivers/staging/vt6656/tkip.h @@ -47,11 +47,11 @@ /*--------------------- Export Functions --------------------------*/ void TKIPvMixKey( - PBYTE pbyTKey, - PBYTE pbyTA, + u8 * pbyTKey, + u8 * pbyTA, WORD wTSC15_0, DWORD dwTSC47_16, - PBYTE pbyRC4Key + u8 * pbyRC4Key ); #endif /* __TKIP_H__ */ diff --git a/drivers/staging/vt6656/tmacro.h b/drivers/staging/vt6656/tmacro.h index 3c81e2b..4ad4f05 100644 --- a/drivers/staging/vt6656/tmacro.h +++ b/drivers/staging/vt6656/tmacro.h @@ -34,10 +34,10 @@ /****** Common helper macros ***********************************************/ #if !defined(LOBYTE) -#define LOBYTE(w) ((BYTE)(w)) +#define LOBYTE(w) ((u8)(w)) #endif #if !defined(HIBYTE) -#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF)) +#define HIBYTE(w) ((u8)(((WORD)(w) >> 8) & 0xFF)) #endif #if !defined(LOWORD) @@ -51,7 +51,7 @@ #define HIDWORD(q) ((q).u.dwHighDword) #if !defined(MAKEWORD) -#define MAKEWORD(lb, hb) ((WORD)(((BYTE)(lb)) | (((WORD)((BYTE)(hb))) << 8))) +#define MAKEWORD(lb, hb) ((WORD)(((u8)(lb)) | (((WORD)((u8)(hb))) << 8))) #endif #if !defined(MAKEDWORD) #define MAKEDWORD(lw, hw) ((DWORD)(((WORD)(lw)) | (((DWORD)((WORD)(hw))) << 16))) diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index d7b6489..a4cafc6 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -35,7 +35,6 @@ /****** Simple typedefs ***************************************************/ -typedef u8 BYTE; typedef u16 WORD; typedef u32 DWORD; @@ -46,8 +45,6 @@ typedef u32 DWORD_PTR; // boolean pointer -typedef BYTE * PBYTE; - typedef WORD * PWORD; typedef DWORD * PDWORD; diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 4bb652b..904b5da 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -260,7 +260,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice, + WLAN_PROBEREQ_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_PROBEREQ_FR_MAXLEN; vMgrEncodeProbeRequest(&sFrame); sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16( @@ -845,7 +845,7 @@ void vRunCommand(struct vnt_private *pDevice) { int ntStatus = STATUS_SUCCESS; - BYTE byTmp; + u8 byTmp; ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h index c40e6ba..5763509 100644 --- a/drivers/staging/vt6656/wcmd.h +++ b/drivers/staging/vt6656/wcmd.h @@ -73,7 +73,7 @@ typedef enum tagCMD_STATUS { typedef struct tagCMD_ITEM { CMD_CODE eCmd; - BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; + u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; bool bNeedRadioOFF; bool bRadioCmd; bool bForceSCAN; diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c index baa48a1..a02ea03 100644 --- a/drivers/staging/vt6656/wctl.c +++ b/drivers/staging/vt6656/wctl.c @@ -213,8 +213,8 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, } } // reserve 8 byte to match MAC RX Buffer - pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 8); -// pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4); + pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 8); +// pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4); memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; @@ -229,7 +229,7 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum == (pMACHeader->wSeqCtl & 0x000F)) && ((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength + cbFrameLength - uHeaderSize) < 2346)) { - memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((PBYTE) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize)); + memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((u8 *) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize)); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength += (cbFrameLength - uHeaderSize); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index 5dced0a..c9ad7ca 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -191,8 +191,8 @@ static bool s_bCipherMatch ( PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus, - PBYTE pbyCCSPK, - PBYTE pbyCCSGK + u8 * pbyCCSPK, + u8 * pbyCCSGK ); static void Encyption_Rebuild(struct vnt_private *, PKnownBSS pCurr); @@ -426,7 +426,7 @@ void vMgrDisassocBeginSta(struct vnt_private *pDevice, + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_DISASSOC_FR_MAXLEN; // format fixed field frame structure @@ -496,7 +496,7 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, memset(abyCurrSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1); memset(abyCurrExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1); sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeAssocRequest(&sFrame); @@ -643,7 +643,7 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, //decode the frame memset(&sFrame, 0, sizeof(WLAN_FR_REASSOCREQ)); sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeReassocRequest(&sFrame); if (pMgmt->sNodeDBTable[uNodeIndex].eNodeState >= NODE_AUTH) { @@ -777,7 +777,7 @@ static void s_vMgrRxAssocResponse(struct vnt_private *pDevice, pMgmt->eCurrState == WMAC_STATE_ASSOC) { sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; // decode the frame vMgrDecodeAssocResponse(&sFrame); if ((sFrame.pwCapInfo == NULL) @@ -820,7 +820,7 @@ static void s_vMgrRxAssocResponse(struct vnt_private *pDevice, //if(pDevice->bWPASuppWextEnabled == true) { - BYTE buf[512]; + u8 buf[512]; size_t len; union iwreq_data wrqu; int we_event; @@ -906,7 +906,7 @@ void vMgrAuthenBeginSta(struct vnt_private *pDevice, + WLAN_AUTHEN_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_AUTHEN_FR_MAXLEN; vMgrEncodeAuthen(&sFrame); /* insert values */ @@ -960,7 +960,7 @@ void vMgrDeAuthenBeginSta(struct vnt_private *pDevice, + WLAN_DEAUTHEN_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_DEAUTHEN_FR_MAXLEN; vMgrEncodeDeauthen(&sFrame); /* insert values */ @@ -1012,7 +1012,7 @@ static void s_vMgrRxAuthentication(struct vnt_private *pDevice, // decode the frame sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeAuthen(&sFrame); switch (cpu_to_le16((*(sFrame.pwAuthSequence )))){ case 1: @@ -1082,7 +1082,7 @@ static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice, + WLAN_AUTHEN_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_AUTHEN_FR_MAXLEN; // format buffer structure vMgrEncodeAuthen(&sFrame); @@ -1193,7 +1193,7 @@ static void s_vMgrRxAuthenSequence_2(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_AUTHEN_FR_MAXLEN; // format buffer structure vMgrEncodeAuthen(&sFrame); @@ -1297,7 +1297,7 @@ reply: + WLAN_AUTHEN_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_AUTHEN_FR_MAXLEN; // format buffer structure vMgrEncodeAuthen(&sFrame); @@ -1385,7 +1385,7 @@ static void s_vMgrRxDisassociation(struct vnt_private *pDevice, // if is acting an AP.. // a STA is leaving this BSS.. sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) { BSSvRemoveOneNode(pDevice, uNodeIndex); } @@ -1395,7 +1395,7 @@ static void s_vMgrRxDisassociation(struct vnt_private *pDevice, } else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ){ sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeDisassociation(&sFrame); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); @@ -1454,7 +1454,7 @@ static void s_vMgrRxDeauthentication(struct vnt_private *pDevice, // if is acting an AP.. // a STA is leaving this BSS.. sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) { BSSvRemoveOneNode(pDevice, uNodeIndex); } @@ -1465,7 +1465,7 @@ static void s_vMgrRxDeauthentication(struct vnt_private *pDevice, else { if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ) { sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeDeauthen(&sFrame); pDevice->fWPA_Authened = false; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason)))); @@ -1576,7 +1576,7 @@ static void s_vMgrRxBeacon(struct vnt_private *pDevice, memset(&sFrame, 0, sizeof(WLAN_FR_BEACON)); sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; // decode the beacon frame vMgrDecodeBeacon(&sFrame); @@ -1672,7 +1672,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) return; } - if(byCurrChannel == (BYTE)pMgmt->uCurrChannel) + if(byCurrChannel == (u8)pMgmt->uCurrChannel) bIsChannelEqual = true; if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { @@ -1785,7 +1785,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) pDevice->byPreambleType = 0; } if (pDevice->byPreambleType != byOldPreambleType) - CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType); + CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); // // Basic Rate Set may change dynamically // @@ -2009,7 +2009,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) pDevice->byPreambleType = 0; } if (pDevice->byPreambleType != byOldPreambleType) - CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType); + CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); // MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); @@ -2411,9 +2411,9 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) if (pItemExtRates->len <= ii) break; } - pItemRates->len += (BYTE)ii; + pItemRates->len += (u8)ii; if (pItemExtRates->len - ii > 0) { - pItemExtRates->len -= (BYTE)ii; + pItemExtRates->len -= (u8)ii; for (uu = 0; uu < pItemExtRates->len; uu ++) { pItemExtRates->abyRates[uu] = pItemExtRates->abyRates[uu + ii]; } @@ -2466,7 +2466,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) pDevice->byPreambleType = 0; } // Change PreambleType must set RSPINF again - CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType); + CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join ESS\n"); @@ -2597,7 +2597,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) pDevice->byPreambleType = 0; } // Change PreambleType must set RSPINF again - CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType); + CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); // Prepare beacon bMgrPrepareBeaconToSend((void *) pDevice, pMgmt); @@ -2906,7 +2906,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure. - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_BEACON_FR_MAXLEN; vMgrEncodeBeacon(&sFrame); // Setup the header @@ -2945,7 +2945,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, sFrame.len += (1) + WLAN_IEHDR_LEN; sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS; sFrame.pDSParms->len = 1; - sFrame.pDSParms->byCurrChannel = (BYTE)uCurrChannel; + sFrame.pDSParms->byCurrChannel = (u8)uCurrChannel; } // TIM field if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { @@ -3073,7 +3073,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure. - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_PROBERESP_FR_MAXLEN; vMgrEncodeProbeResponse(&sFrame); // Setup the header @@ -3114,7 +3114,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, sFrame.len += (1) + WLAN_IEHDR_LEN; sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS; sFrame.pDSParms->len = 1; - sFrame.pDSParms->byCurrChannel = (BYTE)uCurrChannel; + sFrame.pDSParms->byCurrChannel = (u8)uCurrChannel; } if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP) { @@ -3199,7 +3199,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure. - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_ASSOCREQ_FR_MAXLEN; // format fixed field frame structure vMgrEncodeAssocRequest(&sFrame); @@ -3287,7 +3287,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE; } // Auth Key Management Suite - pbyRSN = (PBYTE)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len); + pbyRSN = (u8 *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len); *pbyRSN++=0x01; *pbyRSN++=0x00; *pbyRSN++=0x00; @@ -3457,7 +3457,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); /* Setup the sFrame structure. */ - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_REASSOCREQ_FR_MAXLEN; // format fixed field frame structure @@ -3546,7 +3546,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE; } // Auth Key Management Suite - pbyRSN = (PBYTE)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len); + pbyRSN = (u8 *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len); *pbyRSN++=0x01; *pbyRSN++=0x00; *pbyRSN++=0x00; @@ -3704,7 +3704,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN; vMgrEncodeAssocResponse(&sFrame); // Setup the header @@ -3773,7 +3773,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); // Setup the sFrame structure - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN; vMgrEncodeReassocResponse(&sFrame); // Setup the header @@ -3839,7 +3839,7 @@ static void s_vMgrRxProbeResponse(struct vnt_private *pDevice, memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP)); // decode the frame sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeProbeResponse(&sFrame); if ((sFrame.pqwTimestamp == NULL) @@ -3969,7 +3969,7 @@ static void s_vMgrRxProbeRequest(struct vnt_private *pDevice, memset(&sFrame, 0, sizeof(WLAN_FR_PROBEREQ)); // decode the frame sFrame.len = pRxPacket->cbMPDULen; - sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; + sFrame.pBuf = (u8 *)pRxPacket->p80211Header; vMgrDecodeProbeRequest(&sFrame); /* DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request rx:MAC addr:%pM\n", @@ -4000,7 +4000,7 @@ static void s_vMgrRxProbeRequest(struct vnt_private *pDevice, 0, sFrame.pHdr->sA3.abyAddr2, (PWLAN_IE_SSID)pMgmt->abyCurrSSID, - (PBYTE)pMgmt->abyCurrBSSID, + (u8 *)pMgmt->abyCurrBSSID, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, byPHYType @@ -4199,7 +4199,7 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, pMgmt->uCurrChannel, pMgmt->wCurrATIMWindow, //0, (PWLAN_IE_SSID)pMgmt->abyCurrSSID, - (PBYTE)pMgmt->abyCurrBSSID, + (u8 *)pMgmt->abyCurrBSSID, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates ); @@ -4368,12 +4368,12 @@ static bool s_bCipherMatch ( PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus, - PBYTE pbyCCSPK, - PBYTE pbyCCSGK + u8 * pbyCCSPK, + u8 * pbyCCSGK ) { - BYTE byMulticastCipher = KEY_CTL_INVALID; - BYTE byCipherMask = 0x00; + u8 byMulticastCipher = KEY_CTL_INVALID; + u8 byCipherMask = 0x00; int i; if (pBSSNode == NULL) diff --git a/drivers/staging/vt6656/wpa.c b/drivers/staging/vt6656/wpa.c index f037be3..619ce3c 100644 --- a/drivers/staging/vt6656/wpa.c +++ b/drivers/staging/vt6656/wpa.c @@ -45,12 +45,12 @@ /*--------------------- Static Variables --------------------------*/ static int msglevel =MSG_LEVEL_INFO; -const BYTE abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 }; -const BYTE abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 }; -const BYTE abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 }; -const BYTE abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 }; -const BYTE abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 }; -const BYTE abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 }; +const u8 abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 }; +const u8 abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 }; +const u8 abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 }; +const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 }; +const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 }; +const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 }; /*+ @@ -112,7 +112,7 @@ WPA_ParseRSN( { PWLAN_IE_RSN_AUTH pIE_RSN_Auth = NULL; int i, j, m, n = 0; - PBYTE pbyCaps; + u8 * pbyCaps; WPA_ClearRSN(pBSSList); @@ -209,7 +209,7 @@ WPA_ParseRSN( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4); if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2) - pbyCaps = (PBYTE)pIE_RSN_Auth->AuthKSList[n].abyOUI; + pbyCaps = (u8 *)pIE_RSN_Auth->AuthKSList[n].abyOUI; pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); pBSSList->sRSNCapObj.bRSNCapExist = true; @@ -241,13 +241,13 @@ WPA_ParseRSN( -*/ bool WPA_SearchRSN( - BYTE byCmd, - BYTE byEncrypt, + u8 byCmd, + u8 byEncrypt, PKnownBSS pBSSList ) { int ii; - BYTE byPKType = WPA_NONE; + u8 byPKType = WPA_NONE; if (pBSSList->bWPAValid == false) return false; diff --git a/drivers/staging/vt6656/wpa.h b/drivers/staging/vt6656/wpa.h index 0369cbf..2e35856 100644 --- a/drivers/staging/vt6656/wpa.h +++ b/drivers/staging/vt6656/wpa.h @@ -71,8 +71,8 @@ WPA_ParseRSN( bool WPA_SearchRSN( - BYTE byCmd, - BYTE byEncrypt, + u8 byCmd, + u8 byEncrypt, PKnownBSS pBSSList ); diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c index a89456a..71a6fa5 100644 --- a/drivers/staging/vt6656/wpa2.c +++ b/drivers/staging/vt6656/wpa2.c @@ -41,14 +41,14 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Static Variables --------------------------*/ -const BYTE abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 }; -const BYTE abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 }; -const BYTE abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 }; -const BYTE abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 }; -const BYTE abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 }; +const u8 abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 }; +const u8 abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 }; +const u8 abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 }; +const u8 abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 }; +const u8 abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 }; -const BYTE abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 }; -const BYTE abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 }; +const u8 abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 }; +const u8 abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 }; /*--------------------- Static Functions --------------------------*/ @@ -114,7 +114,7 @@ WPA2vParseRSN ( { int i, j; WORD m = 0, n = 0; - PBYTE pbyOUI; + u8 * pbyOUI; bool bUseGK = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len); @@ -167,7 +167,7 @@ WPA2vParseRSN ( j = 0; pbyOUI = &(pRSN->abyRSN[6]); - for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(BYTE)); i++) { + for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(u8)); i++) { if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i) if ( !memcmp(pbyOUI, abyOUIGK, 4)) { @@ -218,7 +218,7 @@ WPA2vParseRSN ( pBSSNode->wAKMSSAuthCount = *((PWORD) &(pRSN->abyRSN[6+4*m])); j = 0; pbyOUI = &(pRSN->abyRSN[8+4*m]); - for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(BYTE)); i++) { + for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) { if (pRSN->len >= 10+(m+i)*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSS(2)+AKS(4*i) if ( !memcmp(pbyOUI, abyOUI8021X, 4)) pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_802_1X; @@ -274,7 +274,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs) (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { /* WPA2 IE */ - pbyBuffer = (PBYTE) pRSNIEs; + pbyBuffer = (u8 *) pRSNIEs; pRSNIEs->byElementID = WLAN_EID_RSN; pRSNIEs->len = 6; //Version(2)+GK(4) pRSNIEs->wVersion = 1; diff --git a/drivers/staging/vt6656/wpa2.h b/drivers/staging/vt6656/wpa2.h index c359252..03b14c7 100644 --- a/drivers/staging/vt6656/wpa2.h +++ b/drivers/staging/vt6656/wpa2.h @@ -40,8 +40,8 @@ #define MAX_PMKID_CACHE 16 typedef struct tagsPMKIDInfo { - BYTE abyBSSID[6]; - BYTE abyPMKID[16]; + u8 abyBSSID[6]; + u8 abyPMKID[16]; } PMKIDInfo, *PPMKIDInfo; typedef struct tagSPMKIDCache { diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index 53629b2..c0886c1 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -72,10 +72,10 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) struct viawget_wpa_param *param = ctx; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; DWORD dwKeyIndex = 0; - BYTE abyKey[MAX_KEY_LEN]; - BYTE abySeq[MAX_KEY_LEN]; + u8 abyKey[MAX_KEY_LEN]; + u8 abySeq[MAX_KEY_LEN]; u64 KeyRSC; - BYTE byKeyDecMode = KEY_CTL_WEP; + u8 byKeyDecMode = KEY_CTL_WEP; int ret = 0; int uu; int ii; @@ -108,7 +108,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) return -EINVAL; } else { if (param->u.wpa_key.set_tx) { - pDevice->byKeyIndex = (BYTE)dwKeyIndex; + pDevice->byKeyIndex = (u8)dwKeyIndex; pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } @@ -204,7 +204,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) if ((KeybSetAllGroupKey(pDevice, &(pDevice->sKey), dwKeyIndex, param->u.wpa_key.key_len, &KeyRSC, - (PBYTE)abyKey, + (u8 *)abyKey, byKeyDecMode ) == true) && (KeybSetDefaultKey(pDevice, @@ -212,7 +212,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) dwKeyIndex, param->u.wpa_key.key_len, &KeyRSC, - (PBYTE)abyKey, + (u8 *)abyKey, byKeyDecMode ) == true) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); @@ -234,7 +234,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) } if (KeybSetKey(pDevice, &(pDevice->sKey), ¶m->addr[0], dwKeyIndex, param->u.wpa_key.key_len, - &KeyRSC, (PBYTE)abyKey, byKeyDecMode + &KeyRSC, (u8 *)abyKey, byKeyDecMode ) == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); } else { @@ -250,7 +250,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) } } // BSSID not 0xffffffffffff if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) { - pDevice->byKeyIndex = (BYTE)param->u.wpa_key.key_index; + pDevice->byKeyIndex = (u8)param->u.wpa_key.key_index; pDevice->bTransmitKey = true; } pDevice->bEncryptionEnable = true; |