From 3eaca0d2f5a4137d4a5ecf63cf34cdf13b499bee Mon Sep 17 00:00:00 2001 From: Andres More Date: Mon, 25 Feb 2013 20:32:52 -0500 Subject: [PATCH] staging: vt6656: replaced custom WORD definition with u16 Checkpatch findings were not resolved. sed -i 's/\bWORD\b/u16/g' drivers/staging/vt6656/*.[ch] sed -i 's/\bPWORD\b/u16 */g' drivers/staging/vt6656/*.[ch] Signed-off-by: Andres More Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6656/80211hdr.h | 96 +++--- drivers/staging/vt6656/80211mgr.c | 76 ++--- drivers/staging/vt6656/80211mgr.h | 54 ++-- drivers/staging/vt6656/aes_ccmp.c | 12 +- drivers/staging/vt6656/aes_ccmp.h | 2 +- drivers/staging/vt6656/baseband.c | 14 +- drivers/staging/vt6656/baseband.h | 2 +- drivers/staging/vt6656/bssdb.c | 6 +- drivers/staging/vt6656/bssdb.h | 38 +-- drivers/staging/vt6656/card.c | 20 +- drivers/staging/vt6656/card.h | 6 +- drivers/staging/vt6656/datarate.c | 8 +- drivers/staging/vt6656/datarate.h | 2 +- drivers/staging/vt6656/desc.h | 160 +++++----- drivers/staging/vt6656/device.h | 10 +- drivers/staging/vt6656/dpc.c | 26 +- drivers/staging/vt6656/hostap.c | 2 +- drivers/staging/vt6656/int.h | 8 +- drivers/staging/vt6656/key.h | 4 +- drivers/staging/vt6656/mac.c | 6 +- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/mib.h | 4 +- drivers/staging/vt6656/power.c | 2 +- drivers/staging/vt6656/rndis.h | 6 +- drivers/staging/vt6656/rxtx.c | 224 +++++++------- drivers/staging/vt6656/rxtx.h | 468 +++++++++++++++--------------- drivers/staging/vt6656/srom.h | 32 +- drivers/staging/vt6656/tether.h | 10 +- drivers/staging/vt6656/tkip.c | 2 +- drivers/staging/vt6656/tkip.h | 2 +- drivers/staging/vt6656/tmacro.h | 10 +- drivers/staging/vt6656/ttype.h | 3 - drivers/staging/vt6656/wcmd.c | 2 +- drivers/staging/vt6656/wcmd.h | 2 +- drivers/staging/vt6656/wmgr.c | 32 +- drivers/staging/vt6656/wpa.c | 6 +- drivers/staging/vt6656/wpa2.c | 18 +- 37 files changed, 687 insertions(+), 690 deletions(-) diff --git a/drivers/staging/vt6656/80211hdr.h b/drivers/staging/vt6656/80211hdr.h index 6d181bbc6871..0ce12e9e858f 100644 --- a/drivers/staging/vt6656/80211hdr.h +++ b/drivers/staging/vt6656/80211hdr.h @@ -155,22 +155,22 @@ #ifdef __BIG_ENDIAN /* GET & SET Frame Control bit */ -#define WLAN_GET_FC_PRVER(n) ((((WORD)(n) >> 8) & (BIT0 | BIT1)) -#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n) >> 8) & (BIT2 | BIT3)) >> 2) -#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n) >> 8) \ +#define WLAN_GET_FC_PRVER(n) ((((u16)(n) >> 8) & (BIT0 | BIT1)) +#define WLAN_GET_FC_FTYPE(n) ((((u16)(n) >> 8) & (BIT2 | BIT3)) >> 2) +#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n) >> 8) \ & (BIT4|BIT5|BIT6|BIT7)) >> 4) -#define WLAN_GET_FC_TODS(n) ((((WORD)(n) << 8) & (BIT8)) >> 8) -#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n) << 8) & (BIT9)) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n) << 8) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((WORD)(n) << 8) & (BIT11)) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n) << 8) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n) << 8) & (BIT13)) >> 13) -#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n) << 8) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((WORD)(n) << 8) & (BIT15)) >> 15) +#define WLAN_GET_FC_TODS(n) ((((u16)(n) << 8) & (BIT8)) >> 8) +#define WLAN_GET_FC_FROMDS(n) ((((u16)(n) << 8) & (BIT9)) >> 9) +#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n) << 8) & (BIT10)) >> 10) +#define WLAN_GET_FC_RETRY(n) ((((u16)(n) << 8) & (BIT11)) >> 11) +#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n) << 8) & (BIT12)) >> 12) +#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n) << 8) & (BIT13)) >> 13) +#define WLAN_GET_FC_ISWEP(n) ((((u16)(n) << 8) & (BIT14)) >> 14) +#define WLAN_GET_FC_ORDER(n) ((((u16)(n) << 8) & (BIT15)) >> 15) /* Sequence Field bit */ -#define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) -#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n) >> 8) \ +#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) +#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n) >> 8) \ & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) /* Capability Field bit */ @@ -190,21 +190,21 @@ #else /* GET & SET Frame Control bit */ -#define WLAN_GET_FC_PRVER(n) (((WORD)(n)) & (BIT0 | BIT1)) -#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n)) & (BIT2 | BIT3)) >> 2) -#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) -#define WLAN_GET_FC_TODS(n) ((((WORD)(n)) & (BIT8)) >> 8) -#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n)) & (BIT9)) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n)) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((WORD)(n)) & (BIT11)) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n)) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n)) & (BIT13)) >> 13) -#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n)) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((WORD)(n)) & (BIT15)) >> 15) +#define WLAN_GET_FC_PRVER(n) (((u16)(n)) & (BIT0 | BIT1)) +#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT2 | BIT3)) >> 2) +#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) +#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT8)) >> 8) +#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT9)) >> 9) +#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10) +#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT11)) >> 11) +#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT12)) >> 12) +#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13) +#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT14)) >> 14) +#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT15)) >> 15) /* Sequence Field bit */ -#define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n)) & (BIT0|BIT1|BIT2|BIT3)) -#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) +#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3)) +#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) /* Capability Field bit */ #define WLAN_GET_CAP_INFO_ESS(n) ((n) & BIT0) @@ -235,20 +235,20 @@ #define WLAN_SET_CAP_INFO_DSSSOFDM(n) ((n) << 13) #define WLAN_SET_CAP_INFO_GRPACK(n) ((n) << 14) -#define WLAN_SET_FC_PRVER(n) ((WORD)(n)) -#define WLAN_SET_FC_FTYPE(n) (((WORD)(n)) << 2) -#define WLAN_SET_FC_FSTYPE(n) (((WORD)(n)) << 4) -#define WLAN_SET_FC_TODS(n) (((WORD)(n)) << 8) -#define WLAN_SET_FC_FROMDS(n) (((WORD)(n)) << 9) -#define WLAN_SET_FC_MOREFRAG(n) (((WORD)(n)) << 10) -#define WLAN_SET_FC_RETRY(n) (((WORD)(n)) << 11) -#define WLAN_SET_FC_PWRMGT(n) (((WORD)(n)) << 12) -#define WLAN_SET_FC_MOREDATA(n) (((WORD)(n)) << 13) -#define WLAN_SET_FC_ISWEP(n) (((WORD)(n)) << 14) -#define WLAN_SET_FC_ORDER(n) (((WORD)(n)) << 15) - -#define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n)) -#define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4) +#define WLAN_SET_FC_PRVER(n) ((u16)(n)) +#define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2) +#define WLAN_SET_FC_FSTYPE(n) (((u16)(n)) << 4) +#define WLAN_SET_FC_TODS(n) (((u16)(n)) << 8) +#define WLAN_SET_FC_FROMDS(n) (((u16)(n)) << 9) +#define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10) +#define WLAN_SET_FC_RETRY(n) (((u16)(n)) << 11) +#define WLAN_SET_FC_PWRMGT(n) (((u16)(n)) << 12) +#define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13) +#define WLAN_SET_FC_ISWEP(n) (((u16)(n)) << 14) +#define WLAN_SET_FC_ORDER(n) (((u16)(n)) << 15) + +#define WLAN_SET_SEQ_FRGNUM(n) ((u16)(n)) +#define WLAN_SET_SEQ_SEQNUM(n) (((u16)(n)) << 4) /* ERP Field bit */ @@ -284,8 +284,8 @@ typedef struct { typedef struct tagWLAN_80211HDR_A2 { - WORD wFrameCtl; - WORD wDurationID; + u16 wFrameCtl; + u16 wDurationID; u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN]; @@ -294,24 +294,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; typedef struct tagWLAN_80211HDR_A3 { - WORD wFrameCtl; - WORD wDurationID; + u16 wFrameCtl; + u16 wDurationID; u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN]; u8 abyAddr3[WLAN_ADDR_LEN]; - WORD wSeqCtl; + u16 wSeqCtl; } __attribute__ ((__packed__)) WLAN_80211HDR_A3, *PWLAN_80211HDR_A3; typedef struct tagWLAN_80211HDR_A4 { - WORD wFrameCtl; - WORD wDurationID; + u16 wFrameCtl; + u16 wDurationID; u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN]; u8 abyAddr3[WLAN_ADDR_LEN]; - WORD wSeqCtl; + u16 wSeqCtl; u8 abyAddr4[WLAN_ADDR_LEN]; } __attribute__ ((__packed__)) diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c index b494453c0b0c..6a74c15c95db 100644 --- a/drivers/staging/vt6656/80211mgr.c +++ b/drivers/staging/vt6656/80211mgr.c @@ -100,9 +100,9 @@ vMgrEncodeBeacon( pFrame->pqwTimestamp = (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_TS); - pFrame->pwBeaconInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_BCN_INT); - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_CAPINFO); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_BEACON_OFF_SSID; @@ -135,9 +135,9 @@ vMgrDecodeBeacon( pFrame->pqwTimestamp = (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_TS); - pFrame->pwBeaconInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_BCN_INT); - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_CAPINFO); /* Information elements */ @@ -291,7 +291,7 @@ vMgrEncodeDisassociation( /* Fixed Fields */ - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DISASSOC_OFF_REASON); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DISASSOC_OFF_REASON + sizeof(*(pFrame->pwReason)); } @@ -316,7 +316,7 @@ vMgrDecodeDisassociation( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DISASSOC_OFF_REASON); } @@ -339,9 +339,9 @@ vMgrEncodeAssocRequest( { pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_CAP_INFO); - pFrame->pwListenInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_LISTEN_INT); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCREQ_OFF_LISTEN_INT + sizeof(*(pFrame->pwListenInterval)); } @@ -367,9 +367,9 @@ vMgrDecodeAssocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_CAP_INFO); - pFrame->pwListenInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_LISTEN_INT); /* Information elements */ @@ -430,11 +430,11 @@ vMgrEncodeAssocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_CAP_INFO); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_STATUS); - pFrame->pwAid = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_AID); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCRESP_OFF_AID + sizeof(*(pFrame->pwAid)); @@ -462,11 +462,11 @@ vMgrDecodeAssocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_CAP_INFO); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_STATUS); - pFrame->pwAid = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_AID); /* Information elements */ @@ -503,9 +503,9 @@ vMgrEncodeReassocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_CAP_INFO); - pFrame->pwListenInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_LISTEN_INT); pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_CURR_AP); @@ -534,9 +534,9 @@ vMgrDecodeReassocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_CAP_INFO); - pFrame->pwListenInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_LISTEN_INT); pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCREQ_OFF_CURR_AP); @@ -677,9 +677,9 @@ vMgrEncodeProbeResponse( pFrame->pqwTimestamp = (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_TS); - pFrame->pwBeaconInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_BCN_INT); - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_CAP_INFO); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_PROBERESP_OFF_CAP_INFO + @@ -713,9 +713,9 @@ vMgrDecodeProbeResponse( pFrame->pqwTimestamp = (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_TS); - pFrame->pwBeaconInterval = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_BCN_INT); - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_CAP_INFO); /* Information elements */ @@ -820,11 +820,11 @@ vMgrEncodeAuthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwAuthAlgorithm = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_AUTH_ALG); - pFrame->pwAuthSequence = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_AUTH_SEQ); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_STATUS); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_AUTHEN_OFF_STATUS + sizeof(*(pFrame->pwStatus)); } @@ -851,11 +851,11 @@ vMgrDecodeAuthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwAuthAlgorithm = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_AUTH_ALG); - pFrame->pwAuthSequence = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_AUTH_SEQ); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_STATUS); /* Information elements */ @@ -886,7 +886,7 @@ vMgrEncodeDeauthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DEAUTHEN_OFF_REASON); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DEAUTHEN_OFF_REASON + sizeof(*(pFrame->pwReason)); } @@ -911,7 +911,7 @@ vMgrDecodeDeauthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DEAUTHEN_OFF_REASON); } @@ -935,11 +935,11 @@ vMgrEncodeReassocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_CAP_INFO); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_STATUS); - pFrame->pwAid = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_AID); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCRESP_OFF_AID + sizeof(*(pFrame->pwAid)); @@ -968,11 +968,11 @@ vMgrDecodeReassocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_CAP_INFO); - pFrame->pwStatus = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_STATUS); - pFrame->pwAid = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_AID); /* Information elements */ diff --git a/drivers/staging/vt6656/80211mgr.h b/drivers/staging/vt6656/80211mgr.h index 2a88f0c2c7c7..990d44784aa0 100644 --- a/drivers/staging/vt6656/80211mgr.h +++ b/drivers/staging/vt6656/80211mgr.h @@ -251,7 +251,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES; typedef struct _WLAN_IE_FH_PARMS { u8 byElementID; u8 len; - WORD wDwellTime; + u16 wDwellTime; u8 byHopSet; u8 byHopPattern; u8 byHopIndex; @@ -273,8 +273,8 @@ typedef struct tagWLAN_IE_CF_PARMS { u8 len; u8 byCFPCount; u8 byCFPPeriod; - WORD wCFPMaxDuration; - WORD wCFPDurRemaining; + u16 wCFPMaxDuration; + u16 wCFPDurRemaining; } __attribute__ ((__packed__)) WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS; @@ -295,7 +295,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM; typedef struct tagWLAN_IE_IBSS_PARMS { u8 byElementID; u8 len; - WORD wATIMWindow; + u16 wATIMWindow; } __attribute__ ((__packed__)) WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS; @@ -313,9 +313,9 @@ typedef struct tagWLAN_IE_RSN_EXT { u8 byElementID; u8 len; u8 abyOUI[4]; - WORD wVersion; + u16 wVersion; u8 abyMulticast[4]; - WORD wPKCount; + u16 wPKCount; struct { u8 abyOUI[4]; } PKSList[1]; @@ -324,7 +324,7 @@ typedef struct tagWLAN_IE_RSN_EXT { #pragma pack(1) typedef struct tagWLAN_IE_RSN_AUTH { - WORD wAuthCount; + u16 wAuthCount; struct { u8 abyOUI[4]; } AuthKSList[1]; @@ -335,7 +335,7 @@ typedef struct tagWLAN_IE_RSN_AUTH { typedef struct tagWLAN_IE_RSN { u8 byElementID; u8 len; - WORD wVersion; + u16 wVersion; u8 abyRSN[WLAN_MIN_ARRAY]; } WLAN_IE_RSN, *PWLAN_IE_RSN; @@ -514,8 +514,8 @@ typedef struct tagWLAN_FR_BEACON { PUWLAN_80211HDR pHdr; /* fixed fields */ u64 *pqwTimestamp; - PWORD pwBeaconInterval; - PWORD pwCapInfo; + u16 * pwBeaconInterval; + u16 * pwCapInfo; /* info elements */ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -558,7 +558,7 @@ typedef struct tagWLAN_FR_DISASSOC { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwReason; + u16 * pwReason; /* info elements */ } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC; @@ -571,8 +571,8 @@ typedef struct tagWLAN_FR_ASSOCREQ { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwCapInfo; - PWORD pwListenInterval; + u16 * pwCapInfo; + u16 * pwListenInterval; /* info elements */ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -595,9 +595,9 @@ typedef struct tagWLAN_FR_ASSOCRESP { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwCapInfo; - PWORD pwStatus; - PWORD pwAid; + u16 * pwCapInfo; + u16 * pwStatus; + u16 * pwAid; /* info elements */ PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates; @@ -613,8 +613,8 @@ typedef struct tagWLAN_FR_REASSOCREQ { PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwCapInfo; - PWORD pwListenInterval; + u16 * pwCapInfo; + u16 * pwListenInterval; PIEEE_ADDR pAddrCurrAP; /* info elements */ @@ -637,9 +637,9 @@ typedef struct tagWLAN_FR_REASSOCRESP { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwCapInfo; - PWORD pwStatus; - PWORD pwAid; + u16 * pwCapInfo; + u16 * pwStatus; + u16 * pwAid; /* info elements */ PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates; @@ -670,8 +670,8 @@ typedef struct tagWLAN_FR_PROBERESP { PUWLAN_80211HDR pHdr; /* fixed fields */ u64 *pqwTimestamp; - PWORD pwBeaconInterval; - PWORD pwCapInfo; + u16 * pwBeaconInterval; + u16 * pwCapInfo; /* info elements */ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -698,9 +698,9 @@ typedef struct tagWLAN_FR_AUTHEN { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwAuthAlgorithm; - PWORD pwAuthSequence; - PWORD pwStatus; + u16 * pwAuthAlgorithm; + u16 * pwAuthSequence; + u16 * pwStatus; /* info elements */ PWLAN_IE_CHALLENGE pChallenge; @@ -714,7 +714,7 @@ typedef struct tagWLAN_FR_DEAUTHEN { u8 * pBuf; PUWLAN_80211HDR pHdr; /* fixed fields */ - PWORD pwReason; + u16 * pwReason; /* info elements */ diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c index 688e6138d810..0186cee0d6fb 100644 --- a/drivers/staging/vt6656/aes_ccmp.c +++ b/drivers/staging/vt6656/aes_ccmp.c @@ -231,7 +231,7 @@ void AESv128(u8 *key, u8 *data, u8 *ciphertext) * */ -bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize) +bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize) { u8 abyNonce[13]; u8 MIC_IV[16]; @@ -246,17 +246,17 @@ bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize) PS802_11Header pMACHeader = (PS802_11Header) pbyFrame; u8 * pbyIV; u8 * pbyPayload; - WORD wHLen = 22; + u16 wHLen = 22; /* 8 is IV, 8 is MIC, 4 is CRC */ - WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN; + u16 wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN; bool bA4 = false; u8 byTmp; - WORD wCnt; + u16 wCnt; int ii, jj, kk; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; - if (WLAN_GET_FC_TODS(*(PWORD) pbyFrame) && - WLAN_GET_FC_FROMDS(*(PWORD) pbyFrame)) { + if (WLAN_GET_FC_TODS(*(u16 *) pbyFrame) && + WLAN_GET_FC_FROMDS(*(u16 *) pbyFrame)) { bA4 = true; pbyIV += 6; /* 6 is 802.11 address4 */ wHLen += 6; diff --git a/drivers/staging/vt6656/aes_ccmp.h b/drivers/staging/vt6656/aes_ccmp.h index f5ea0f164774..349fe9effa3e 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(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize); +bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize); #endif /* __AES_CCMP_H__ */ diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index ac33206715b3..93e297841f8d 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -655,7 +655,7 @@ u8 abyVT3184_VT3226D0[] = { 0x00, }; -const WORD awcFrameTime[MAX_RATE] = +const u16 awcFrameTime[MAX_RATE] = {10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216}; /*--------------------- Static Functions --------------------------*/ @@ -694,7 +694,7 @@ BBuGetFrameTime( u8 byPreambleType, u8 byPktType, unsigned int cbFrameLength, - WORD wRate + u16 wRate ) { unsigned int uFrameTime; @@ -900,11 +900,11 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, *pbyPhySrv = 0x00; if (bExtBit) *pbyPhySrv = *pbyPhySrv | 0x80; - *pwPhyLen = (WORD) cbUsCount; + *pwPhyLen = (u16) cbUsCount; } else { *pbyPhySrv = 0x00; - *pwPhyLen = (WORD)cbFrameLength; + *pwPhyLen = (u16)cbFrameLength; } } @@ -940,7 +940,7 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode) CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_SET_ANTMD, - (WORD) byAntennaMode, + (u16) byAntennaMode, 0, 0, NULL); @@ -963,10 +963,10 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode) int BBbVT3184Init(struct vnt_private *pDevice) { int ntStatus; - WORD wLength; + u16 wLength; u8 * pbyAddr; u8 * pbyAgc; - WORD wLengthAgc; + u16 wLengthAgc; u8 abyArray[256]; ntStatus = CONTROLnsRequestIn(pDevice, diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index 935b19f792e8..a6c3448e77ee 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -100,7 +100,7 @@ BBuGetFrameTime( u8 byPreambleType, u8 byFreqType, unsigned int cbFrameLength, - WORD wRate + u16 wRate ); void BBvCalculateParameter(struct vnt_private *, u32 cbFrameLength, diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index e08f719709a8..bbe348e98b9a 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -72,14 +72,14 @@ static int msglevel =MSG_LEVEL_INFO; -const WORD awHWRetry0[5][5] = { +const u16 awHWRetry0[5][5] = { {RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M}, {RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M}, {RATE_36M, RATE_36M, RATE_24M, RATE_18M, RATE_18M}, {RATE_48M, RATE_48M, RATE_36M, RATE_24M, RATE_24M}, {RATE_54M, RATE_54M, RATE_48M, RATE_36M, RATE_36M} }; -const WORD awHWRetry1[5][5] = { +const u16 awHWRetry1[5][5] = { {RATE_18M, RATE_18M, RATE_12M, RATE_6M, RATE_6M}, {RATE_24M, RATE_24M, RATE_18M, RATE_6M, RATE_6M}, {RATE_36M, RATE_36M, RATE_24M, RATE_12M, RATE_12M}, @@ -1205,7 +1205,7 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, byPktNum = (byPktNO & 0x0F) >> 4; byTxRetry = (byTSR & 0xF0) >> 4; - wRate = (WORD) (byPktNO & 0xF0) >> 4; + wRate = (u16) (byPktNO & 0xF0) >> 4; wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl; pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]); diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index d329f4bbe6e7..6f72539e4cca 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -86,7 +86,7 @@ typedef struct tagSERPObject { typedef struct tagSRSNCapObject { bool bRSNCapExist; - WORD wRSNCap; + u16 wRSNCap; } SRSNCapObject, *PSRSNCapObject; // BSS info(AP) @@ -99,12 +99,12 @@ typedef struct tagKnownBSS { u8 abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; unsigned int uRSSI; u8 bySQ; - WORD wBeaconInterval; - WORD wCapInfo; + u16 wBeaconInterval; + u16 wCapInfo; u8 abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; u8 byRxRate; -// WORD wATIMWindow; +// u16 wATIMWindow; u8 byRSSIStatCnt; signed long ldBmMAX; signed long ldBmAverage[RSSI_STAT_COUNT]; @@ -116,9 +116,9 @@ typedef struct tagKnownBSS { bool bWPAValid; u8 byGKType; u8 abyPKType[4]; - WORD wPKCount; + u16 wPKCount; u8 abyAuthType[4]; - WORD wAuthCount; + u16 wAuthCount; u8 byDefaultK_as_PK; u8 byReplayIdx; //-- @@ -126,16 +126,16 @@ typedef struct tagKnownBSS { //++ WPA2 informations bool bWPA2Valid; u8 byCSSGK; - WORD wCSSPKCount; + u16 wCSSPKCount; u8 abyCSSPK[4]; - WORD wAKMSSAuthCount; + u16 wAKMSSAuthCount; u8 abyAKMSSAuthType[4]; //++ wpactl u8 byWPAIE[MAX_WPA_IE_LEN]; u8 byRSNIE[MAX_WPA_IE_LEN]; - WORD wWPALen; - WORD wRSNLen; + u16 wWPALen; + u16 wRSNLen; // Clear count unsigned int uClearCount; @@ -171,22 +171,22 @@ typedef struct tagKnownNodeDB { u8 abyMACAddr[WLAN_ADDR_LEN]; u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; - WORD wTxDataRate; + u16 wTxDataRate; bool bShortPreamble; bool bERPExist; bool bShortSlotTime; unsigned int uInActiveCount; - 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; + u16 wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp. + u16 wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon. + u16 wSuppRate; 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; - WORD wCapInfo; - WORD wListenInterval; - WORD wAID; + u16 wCapInfo; + u16 wListenInterval; + u16 wAID; NODE_STATE eNodeState; bool bPSEnable; bool bRxPSPoll; @@ -194,7 +194,7 @@ typedef struct tagKnownNodeDB { unsigned long ulLastRxJiffer; u8 bySuppRate; DWORD dwFlags; - WORD wEnQueueCnt; + u16 wEnQueueCnt; bool bOnFly; unsigned long long KeyRSC; @@ -202,7 +202,7 @@ typedef struct tagKnownNodeDB { DWORD dwKeyIndex; u8 byCipherSuite; DWORD dwTSC47_16; - WORD wTSC15_0; + u16 wTSC15_0; unsigned int uWepKeyLength; u8 abyWepKey[WLAN_WEPMAX_KEYLEN]; // diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 2cd120ba4576..40f58d085e1e 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -71,10 +71,10 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Variables --------------------------*/ -//const WORD cwRXBCNTSFOff[MAX_RATE] = +//const u16 cwRXBCNTSFOff[MAX_RATE] = //{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; -const WORD cwRXBCNTSFOff[MAX_RATE] = +const u16 cwRXBCNTSFOff[MAX_RATE] = {192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; /*--------------------- Static Functions --------------------------*/ @@ -114,7 +114,7 @@ void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel) CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_SELECT_CHANNLE, - (WORD) uConnectionChannel, + (u16) uConnectionChannel, 0, 0, NULL @@ -220,7 +220,7 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx) */ void CARDvCalculateOFDMRParameter ( - WORD wRate, + u16 wRate, u8 byBBType, u8 * pbyTxRate, u8 * pbyRsvTime @@ -571,7 +571,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice) //Determines the highest basic rate. for (ii = RATE_54M; ii >= RATE_6M; ii --) { - if ( (pDevice->wBasicRate) & ((WORD)(1<wBasicRate) & ((u16)(1<byTopOFDMBasicRate = byTopOFDM; for (ii = RATE_11M;; ii --) { - if ( (pDevice->wBasicRate) & ((WORD)(1<wBasicRate) & ((u16)(1<= RATE_6M; ii --) { - if ((pDevice->wBasicRate) & ((WORD)(1<wBasicRate) & ((u16)(1<wSuppRate & (0x0001< dwThroughput) && (bAutoRate[ii]==true) ) { dwThroughput = dwThroughputTbl[ii]; - wIdxDownRate = (WORD) ii; + wIdxDownRate = (u16) ii; } } psNodeDBTable->wTxDataRate = wIdxDownRate; diff --git a/drivers/staging/vt6656/datarate.h b/drivers/staging/vt6656/datarate.h index 355e51f3ff16..d86e537176d0 100644 --- a/drivers/staging/vt6656/datarate.h +++ b/drivers/staging/vt6656/datarate.h @@ -84,7 +84,7 @@ RATEuSetIE( unsigned int uRateLen ); -WORD +u16 RATEwGetRateIdx( u8 byRate ); diff --git a/drivers/staging/vt6656/desc.h b/drivers/staging/vt6656/desc.h index bfbaccd63012..a93eb5fa92c9 100644 --- a/drivers/staging/vt6656/desc.h +++ b/drivers/staging/vt6656/desc.h @@ -147,38 +147,38 @@ * RsvTime buffer header */ typedef struct tagSRrvTime_gRTS { - WORD wRTSTxRrvTime_ba; - WORD wRTSTxRrvTime_aa; - WORD wRTSTxRrvTime_bb; - WORD wReserved; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_ba; + u16 wRTSTxRrvTime_aa; + u16 wRTSTxRrvTime_bb; + u16 wReserved; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; } __attribute__ ((__packed__)) SRrvTime_gRTS, *PSRrvTime_gRTS; typedef const SRrvTime_gRTS *PCSRrvTime_gRTS; typedef struct tagSRrvTime_gCTS { - WORD wCTSTxRrvTime_ba; - WORD wReserved; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wReserved; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; } __attribute__ ((__packed__)) SRrvTime_gCTS, *PSRrvTime_gCTS; typedef const SRrvTime_gCTS *PCSRrvTime_gCTS; typedef struct tagSRrvTime_ab { - WORD wRTSTxRrvTime; - WORD wTxRrvTime; + u16 wRTSTxRrvTime; + u16 wTxRrvTime; } __attribute__ ((__packed__)) SRrvTime_ab, *PSRrvTime_ab; typedef const SRrvTime_ab *PCSRrvTime_ab; typedef struct tagSRrvTime_atim { - WORD wCTSTxRrvTime_ba; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wTxRrvTime_a; } __attribute__ ((__packed__)) SRrvTime_atim, *PSRrvTime_atim; @@ -188,8 +188,8 @@ typedef const SRrvTime_atim *PCSRrvTime_atim; * RTS buffer header */ typedef struct tagSRTSData { - WORD wFrameControl; - WORD wDurationID; + u16 wFrameControl; + u16 wDurationID; u8 abyRA[ETH_ALEN]; u8 abyTA[ETH_ALEN]; } __attribute__ ((__packed__)) @@ -200,14 +200,14 @@ typedef const SRTSData *PCSRTSData; typedef struct tagSRTS_g { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_ba; - WORD wDuration_aa; - WORD wDuration_bb; - WORD wReserved; + u16 wTransmitLength_a; + u16 wDuration_ba; + u16 wDuration_aa; + u16 wDuration_bb; + u16 wReserved; SRTSData Data; } __attribute__ ((__packed__)) SRTS_g, *PSRTS_g; @@ -216,18 +216,18 @@ typedef const SRTS_g *PCSRTS_g; typedef struct tagSRTS_g_FB { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_ba; - WORD wDuration_aa; - WORD wDuration_bb; - WORD wReserved; - WORD wRTSDuration_ba_f0; - WORD wRTSDuration_aa_f0; - WORD wRTSDuration_ba_f1; - WORD wRTSDuration_aa_f1; + u16 wTransmitLength_a; + u16 wDuration_ba; + u16 wDuration_aa; + u16 wDuration_bb; + u16 wReserved; + u16 wRTSDuration_ba_f0; + u16 wRTSDuration_aa_f0; + u16 wRTSDuration_ba_f1; + u16 wRTSDuration_aa_f1; SRTSData Data; } __attribute__ ((__packed__)) SRTS_g_FB, *PSRTS_g_FB; @@ -237,9 +237,9 @@ typedef const SRTS_g_FB *PCSRTS_g_FB; typedef struct tagSRTS_ab { u8 bySignalField; u8 byServiceField; - WORD wTransmitLength; - WORD wDuration; - WORD wReserved; + u16 wTransmitLength; + u16 wDuration; + u16 wReserved; SRTSData Data; } __attribute__ ((__packed__)) SRTS_ab, *PSRTS_ab; @@ -249,11 +249,11 @@ typedef const SRTS_ab *PCSRTS_ab; typedef struct tagSRTS_a_FB { u8 bySignalField; u8 byServiceField; - WORD wTransmitLength; - WORD wDuration; - WORD wReserved; - WORD wRTSDuration_f0; - WORD wRTSDuration_f1; + u16 wTransmitLength; + u16 wDuration; + u16 wReserved; + u16 wRTSDuration_f0; + u16 wRTSDuration_f1; SRTSData Data; } __attribute__ ((__packed__)) SRTS_a_FB, *PSRTS_a_FB; @@ -264,19 +264,19 @@ typedef const SRTS_a_FB *PCSRTS_a_FB; * CTS buffer header */ typedef struct tagSCTSData { - WORD wFrameControl; - WORD wDurationID; + u16 wFrameControl; + u16 wDurationID; u8 abyRA[ETH_ALEN]; - WORD wReserved; + u16 wReserved; } __attribute__ ((__packed__)) SCTSData, *PSCTSData; typedef struct tagSCTS { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; - WORD wDuration_ba; - WORD wReserved; + u16 wTransmitLength_b; + u16 wDuration_ba; + u16 wReserved; SCTSData Data; } __attribute__ ((__packed__)) SCTS, *PSCTS; @@ -286,11 +286,11 @@ typedef const SCTS *PCSCTS; typedef struct tagSCTS_FB { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; - WORD wDuration_ba; - WORD wReserved; - WORD wCTSDuration_ba_f0; - WORD wCTSDuration_ba_f1; + u16 wTransmitLength_b; + u16 wDuration_ba; + u16 wReserved; + u16 wCTSDuration_ba_f0; + u16 wCTSDuration_ba_f1; SCTSData Data; } __attribute__ ((__packed__)) SCTS_FB, *PSCTS_FB; @@ -302,17 +302,17 @@ typedef const SCTS_FB *PCSCTS_FB; */ typedef struct tagSTxBufHead { u32 adwTxKey[4]; - WORD wFIFOCtl; - WORD wTimeStamp; - WORD wFragCtl; - WORD wReserved; + u16 wFIFOCtl; + u16 wTimeStamp; + u16 wFragCtl; + u16 wReserved; } __attribute__ ((__packed__)) STxBufHead, *PSTxBufHead; typedef const STxBufHead *PCSTxBufHead; typedef struct tagSTxShortBufHead { - WORD wFIFOCtl; - WORD wTimeStamp; + u16 wFIFOCtl; + u16 wTimeStamp; } __attribute__ ((__packed__)) STxShortBufHead, *PSTxShortBufHead; typedef const STxShortBufHead *PCSTxShortBufHead; @@ -323,14 +323,14 @@ typedef const STxShortBufHead *PCSTxShortBufHead; typedef struct tagSTxDataHead_g { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } __attribute__ ((__packed__)) STxDataHead_g, *PSTxDataHead_g; @@ -339,16 +339,16 @@ typedef const STxDataHead_g *PCSTxDataHead_g; typedef struct tagSTxDataHead_g_FB { u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } __attribute__ ((__packed__)) STxDataHead_g_FB, *PSTxDataHead_g_FB; typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB; @@ -356,9 +356,9 @@ typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB; typedef struct tagSTxDataHead_ab { u8 bySignalField; u8 byServiceField; - WORD wTransmitLength; - WORD wDuration; - WORD wTimeStampOff; + u16 wTransmitLength; + u16 wDuration; + u16 wTimeStampOff; } __attribute__ ((__packed__)) STxDataHead_ab, *PSTxDataHead_ab; typedef const STxDataHead_ab *PCSTxDataHead_ab; @@ -366,11 +366,11 @@ typedef const STxDataHead_ab *PCSTxDataHead_ab; typedef struct tagSTxDataHead_a_FB { u8 bySignalField; u8 byServiceField; - WORD wTransmitLength; - WORD wDuration; - WORD wTimeStampOff; - WORD wDuration_f0; - WORD wDuration_f1; + u16 wTransmitLength; + u16 wDuration; + u16 wTimeStampOff; + u16 wDuration_f0; + u16 wDuration_f1; } __attribute__ ((__packed__)) STxDataHead_a_FB, *PSTxDataHead_a_FB; typedef const STxDataHead_a_FB *PCSTxDataHead_a_FB; @@ -403,7 +403,7 @@ SSecretKey; typedef struct tagSKeyEntry { u8 abyAddrHi[2]; - WORD wKCTL; + u16 wKCTL; u8 abyAddrLo[4]; u32 dwKey0[4]; u32 dwKey1[4]; diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 486de1e25a58..f16428df359a 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -311,14 +311,14 @@ typedef struct tagSQuietControl { bool bEnable; DWORD dwStartTime; u8 byPeriod; - WORD wDuration; + u16 wDuration; } SQuietControl, *PSQuietControl; /* The receive duplicate detection cache entry */ typedef struct tagSCacheEntry{ - WORD wFmSequence; + u16 wFmSequence; u8 abyAddr2[ETH_ALEN]; - WORD wFrameCtl; + u16 wFrameCtl; } SCacheEntry, *PSCacheEntry; typedef struct tagSCache{ @@ -335,8 +335,8 @@ typedef struct tagSCache{ */ typedef struct tagSDeFragControlBlock { - WORD wSequence; - WORD wFragNum; + u16 wSequence; + u16 wFragNum; u8 abyAddr2[ETH_ALEN]; unsigned int uLifetime; struct sk_buff* skb; diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index e53b77b393a9..d63a946b2ac9 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -155,11 +155,11 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, cbHeaderSize += 6; } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { cbHeaderSize += 6; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize); if ((*pwType == cpu_to_be16(ETH_P_IPX)) || (*pwType == cpu_to_le16(0xF380))) { cbHeaderSize -= 8; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize); if (bIsWEP) { if (bExtIV) { *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV @@ -174,7 +174,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, } else { cbHeaderSize -= 2; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize); if (bIsWEP) { if (bExtIV) { *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV @@ -328,7 +328,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, //real Frame Size = USBFrameSize -4WbkStatus - 4RxStatus - 8TSF - 4RSR - 4SQ3 - ?Padding //if SQ3 the range is 24~27, if no SQ3 the range is 20~23 //real Frame size in PLCPLength field. - pwPLCP_Length = (PWORD) (pbyDAddress + 6); + pwPLCP_Length = (u16 *) (pbyDAddress + 6); //Fix hardware bug => PLCP_Length error if ( ((BytesToIndicate - (*pwPLCP_Length)) > 27) || ((BytesToIndicate - (*pwPLCP_Length)) < 24) || @@ -625,7 +625,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, u8 Protocol_Version; //802.1x Authentication u8 Packet_Type; //802.1x Authentication u8 Descriptor_type; - WORD Key_info; + u16 Key_info; if (bIsWEP) cbIVOffset = 8; else @@ -837,12 +837,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) || (pKey->byCipherSuite == KEY_CTL_CCMP))) { if (bIsWEP) { - WORD wLocalTSC15_0 = 0; + u16 wLocalTSC15_0 = 0; DWORD dwLocalTSC47_16 = 0; unsigned long long RSC = 0; // endian issues RSC = *((unsigned long long *) &(pKey->KeyRSC)); - wLocalTSC15_0 = (WORD) RSC; + wLocalTSC15_0 = (u16) RSC; dwLocalTSC47_16 = (DWORD) (RSC>>16); RSC = dwRxTSC47_16; @@ -1047,8 +1047,8 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, *pdwRxTSC47_16 = 0; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; - if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) && - WLAN_GET_FC_FROMDS(*(PWORD)pbyFrame) ) { + if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) && + WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) { pbyIV += 6; // 6 is 802.11 address4 PayloadLen -= 6; } @@ -1141,7 +1141,7 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, if (byDecMode == KEY_CTL_TKIP) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); } else { - *pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); + *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); @@ -1183,8 +1183,8 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, *pdwRxTSC47_16 = 0; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; - if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) && - WLAN_GET_FC_FROMDS(*(PWORD)pbyFrame) ) { + if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) && + WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) { pbyIV += 6; // 6 is 802.11 address4 PayloadLen -= 6; } @@ -1241,7 +1241,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, if (byDecMode == KEY_CTL_TKIP) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); } else { - *pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); + *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index ab828b58dde7..0319f928c1fd 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -242,7 +242,7 @@ static int hostap_add_sta(struct vnt_private *pDevice, pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo); - pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid; + pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)param->u.add_sta.aid; pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; diff --git a/drivers/staging/vt6656/int.h b/drivers/staging/vt6656/int.h index b8a79433d4d2..180ea57f9888 100644 --- a/drivers/staging/vt6656/int.h +++ b/drivers/staging/vt6656/int.h @@ -37,16 +37,16 @@ typedef struct tagSINTData { u8 byTSR0; u8 byPkt0; - WORD wTime0; + u16 wTime0; u8 byTSR1; u8 byPkt1; - WORD wTime1; + u16 wTime1; u8 byTSR2; u8 byPkt2; - WORD wTime2; + u16 wTime2; u8 byTSR3; u8 byPkt3; - WORD wTime3; + u16 wTime3; u64 qwTSF; u8 byISR0; u8 byISR1; diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index d5ff9c755212..217decd33fce 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -62,7 +62,7 @@ typedef struct tagSKeyItem u8 abyKey[MAX_KEY_LEN]; u64 KeyRSC; DWORD dwTSC47_16; - WORD wTSC15_0; + u16 wTSC15_0; u8 byCipherSuite; u8 byReserved0; DWORD dwKeyIndex; @@ -77,7 +77,7 @@ typedef struct tagSKeyTable SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 DWORD dwGTKeyIndex; // GroupTransmitKey Index bool bInUse; - WORD wKeyCtl; + u16 wKeyCtl; bool bSoftWEP; u8 byReserved1[6]; } SKeyTable, *PSKeyTable; //352 diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index eccba6a6dbf0..30dcdcc68d2e 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -88,7 +88,7 @@ void MACvSetMultiAddrByHash(struct vnt_private *pDevice, u8 byHashIdx) CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE_MASK, - (WORD) (MAC_REG_MAR0 + uByteIdx), + (u16) (MAC_REG_MAR0 + uByteIdx), MESSAGE_REQUEST_MACREG, 2, pbyData); @@ -117,7 +117,7 @@ void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData) byData1 = byData; CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, - (WORD) (MAC_REG_MAR0 + uByteIdx), + (u16) (MAC_REG_MAR0 + uByteIdx), MESSAGE_REQUEST_MACREG, 1, &byData1); @@ -310,7 +310,7 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx, CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_SETKEY, wOffset, - (WORD)uKeyIdx, + (u16)uKeyIdx, 24, pbyData ); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index a38d2cb9d979..ba8948a14027 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -418,7 +418,7 @@ static int device_init_registers(struct vnt_private *pDevice, pDevice->bNonERPPresent = false; pDevice->bBarkerPreambleMd = false; if ( pDevice->bFixRate ) { - pDevice->wCurrentRate = (WORD) pDevice->uConnectionRate; + pDevice->wCurrentRate = (u16) pDevice->uConnectionRate; } else { if ( pDevice->byBBType == BB_TYPE_11B ) pDevice->wCurrentRate = RATE_11M; diff --git a/drivers/staging/vt6656/mib.h b/drivers/staging/vt6656/mib.h index 967486554312..7ec4f02d17ec 100644 --- a/drivers/staging/vt6656/mib.h +++ b/drivers/staging/vt6656/mib.h @@ -229,8 +229,8 @@ typedef struct tagSISRCounters { // typedef struct tagSTxPktInfo { u8 byBroadMultiUni; - WORD wLength; - WORD wFIFOCtl; + u16 wLength; + u16 wFIFOCtl; u8 abyDestAddr[ETH_ALEN]; } STxPktInfo, *PSTxPktInfo; diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 527c259f6758..f3445109eeaf 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -290,7 +290,7 @@ int PSbSendNullPacket(struct vnt_private *pDevice) pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags); if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) - pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1)); + pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_TODS(1)); memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN); memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index e14b4f71aec8..8dd611c18036 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h @@ -103,7 +103,7 @@ typedef struct _RSP_CARD_INIT typedef struct _CMD_SET_KEY { - WORD wKCTL; + u16 wKCTL; u8 abyMacAddr[6]; u8 abyKey[16]; } CMD_SET_KEY, *PCMD_SET_KEY; @@ -147,12 +147,12 @@ typedef struct _CMD_CHANGE_BBTYPE DWORD dwRSPINF_b_2; DWORD dwRSPINF_b_55; DWORD dwRSPINF_b_11; - WORD wRSPINF_a[9]; + u16 wRSPINF_a[9]; } CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE; /*--------------------- Export Macros -------------------------*/ -#define EXCH_WORD(w) ((WORD)((WORD)(w)<<8) | (WORD)((WORD)(w)>>8)) +#define EXCH_WORD(w) ((u16)((u16)(w)<<8) | (u16)((u16)(w)>>8)) /*--------------------- Export Variables --------------------------*/ diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index d019b44bdc50..b542ec3fdc96 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -74,16 +74,16 @@ static int msglevel = MSG_LEVEL_INFO; /*--------------------- Static Definitions -------------------------*/ -const WORD wTimeStampOff[2][MAX_RATE] = { +const u16 wTimeStampOff[2][MAX_RATE] = { {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, // Long Preamble {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, // Short Preamble }; -const WORD wFB_Opt0[2][5] = { +const u16 wFB_Opt0[2][5] = { {RATE_12M, RATE_18M, RATE_24M, RATE_36M, RATE_48M}, // fallback_rate0 {RATE_12M, RATE_12M, RATE_18M, RATE_24M, RATE_36M}, // fallback_rate1 }; -const WORD wFB_Opt1[2][5] = { +const u16 wFB_Opt1[2][5] = { {RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, // fallback_rate0 {RATE_6M , RATE_6M, RATE_12M, RATE_12M, RATE_18M}, // fallback_rate1 }; @@ -268,7 +268,7 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, // Make IV *pdwIV = 0; *(pbyIVHead+3) = (u8)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV - *pdwIV |= cpu_to_le16((WORD)(pTransmitKey->wTSC15_0)); + *pdwIV |= cpu_to_le16((u16)(pTransmitKey->wTSC15_0)); //Append IV&ExtIV after Mac Header *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16); @@ -360,9 +360,9 @@ static u32 s_uGetTxRsvTime(struct vnt_private *pDevice, u8 byPktType, uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate); if (byPktType == PK_TYPE_11B) {//llb,CCK mode - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (WORD)pDevice->byTopCCKBasicRate); + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (u16)pDevice->byTopCCKBasicRate); } else {//11g 2.4G OFDM mode & 11a 5G OFDM mode - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (WORD)pDevice->byTopOFDMBasicRate); + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (u16)pDevice->byTopOFDMBasicRate); } if (bNeedAck) { @@ -671,10 +671,10 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff - pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, + pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz @@ -688,17 +688,17 @@ 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), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) + (u16 *)&(pBuf->wTransmitLength_a), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); BBvCalculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(pBuf->wTransmitLength_b), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(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, + pBuf->wDuration_a = (u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz - pBuf->wDuration_b = (WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, + pBuf->wDuration_b = (u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz @@ -711,19 +711,19 @@ 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), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) + (u16 *)&(pBuf->wTransmitLength_a), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); BBvCalculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(pBuf->wTransmitLength_b), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(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, + pBuf->wDuration_a = (u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz - pBuf->wDuration_b = (WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, + pBuf->wDuration_b = (u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz - pBuf->wDuration_a_f0 = (WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, + pBuf->wDuration_a_f0 = (u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz - pBuf->wDuration_a_f1 = (WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, + pBuf->wDuration_a_f1 = (u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //1: 2.4GHz pBuf->wTimeStampOff_a = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; pBuf->wTimeStampOff_b = wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]; @@ -737,14 +737,14 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff - pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, + pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //0: 5GHz - pBuf->wDuration_f0 = (WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, + pBuf->wDuration_f0 = (u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //0: 5GHz - pBuf->wDuration_f1 = (WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, + pBuf->wDuration_f1 = (u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); //0: 5GHz if(uDMAIdx!=TYPE_ATIMDMA) { pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; @@ -754,10 +754,10 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff - pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, + pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); @@ -772,10 +772,10 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(pBuf->wTransmitLength), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); //Get Duration and TimeStampOff - pBuf->wDuration = (WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, + pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption); @@ -810,17 +810,17 @@ 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), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration_bb = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData - pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wDuration_bb = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData + pBuf->wDuration_aa = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData + pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->Data.wDurationID = pBuf->wDuration_aa; //Get RTS Frame body @@ -852,21 +852,21 @@ 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), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCalculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration_bb = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData - pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3:2.4G OFDMData - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDMData - pBuf->wRTSDuration_ba_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //4:wRTSDuration_ba_f0, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_aa_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_ba_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_aa_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData + pBuf->wDuration_bb = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData + pBuf->wDuration_aa = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3:2.4G OFDMData + pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDMData + pBuf->wRTSDuration_ba_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //4:wRTSDuration_ba_f0, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_aa_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_ba_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_aa_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData pBuf->Data.wDurationID = pBuf->wDuration_aa; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -901,11 +901,11 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData + pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -936,13 +936,13 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData - pBuf->wRTSDuration_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData - pBuf->wRTSDuration_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0: + pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData + pBuf->wRTSDuration_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData + pBuf->wRTSDuration_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0: pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -972,11 +972,11 @@ 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), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField), (u8 *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData + pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -1028,18 +1028,18 @@ 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), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(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 + pBuf->wDuration_ba = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba += pDevice->wCTSDuration; pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba); //Get CTSDuration_ba_f0 - pBuf->wCTSDuration_ba_f0 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //8:CTSDuration_ba_f0, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wCTSDuration_ba_f0 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //8:CTSDuration_ba_f0, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wCTSDuration_ba_f0 += pDevice->wCTSDuration; pBuf->wCTSDuration_ba_f0 = cpu_to_le16(pBuf->wCTSDuration_ba_f0); //Get CTSDuration_ba_f1 - pBuf->wCTSDuration_ba_f1 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wCTSDuration_ba_f1 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wCTSDuration_ba_f1 += pDevice->wCTSDuration; pBuf->wCTSDuration_ba_f1 = cpu_to_le16(pBuf->wCTSDuration_ba_f1); //Get CTS Frame body @@ -1053,11 +1053,11 @@ 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), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) + (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get CTSDuration_ba - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba += pDevice->wCTSDuration; pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba); @@ -1130,11 +1130,11 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_gRTS pBuf = (PSRrvTime_gRTS)pvRrvTime; - pBuf->wRTSTxRrvTime_aa = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz - pBuf->wRTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 1, byPktType, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz - pBuf->wRTSTxRrvTime_bb = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz - pBuf->wTxRrvTime_a = cpu_to_le16((WORD) s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM - pBuf->wTxRrvTime_b = cpu_to_le16((WORD) s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK + pBuf->wRTSTxRrvTime_aa = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz + pBuf->wRTSTxRrvTime_ba = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 1, byPktType, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz + pBuf->wRTSTxRrvTime_bb = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz + pBuf->wTxRrvTime_a = cpu_to_le16((u16) s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM + pBuf->wTxRrvTime_b = cpu_to_le16((u16) s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK } //Fill RTS s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); @@ -1144,9 +1144,9 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_gCTS pBuf = (PSRrvTime_gCTS)pvRrvTime; - pBuf->wTxRrvTime_a = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM - pBuf->wTxRrvTime_b = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK - pBuf->wCTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz + pBuf->wTxRrvTime_a = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM + pBuf->wTxRrvTime_b = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK + pBuf->wCTSTxRrvTime_ba = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz } //Fill CTS s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); @@ -1158,8 +1158,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz - pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM + pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz + pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM } //Fill RTS s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); @@ -1168,7 +1168,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK)); //0:OFDM + pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK)); //0:OFDM } } } @@ -1178,8 +1178,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz - pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK + pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz + pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK } //Fill RTS s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); @@ -1188,7 +1188,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK)); //1:CCK + pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK)); //1:CCK } } } @@ -1196,7 +1196,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, } /* u8 * pbyBuffer,//point to pTxBufHead - WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last + u16 wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last unsigned int cbFragmentSize,//Hdr+payoad+FCS */ @@ -1253,7 +1253,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, cbFrameBodySize = uSkbPacketLen - ETH_HLEN + cb802_1_H_len; //Set packet type - pTxBufHead->wFIFOCtl |= (WORD)(byPktType<<8); + pTxBufHead->wFIFOCtl |= (u16)(byPktType<<8); if (pDevice->dwDiagRefCount != 0) { bNeedACK = false; @@ -1293,7 +1293,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } else { cbMACHdLen = WLAN_HDR_ADDR3_LEN; } - pTxBufHead->wFragCtl |= (WORD)(cbMACHdLen << 10); + pTxBufHead->wFragCtl |= (u16)(cbMACHdLen << 10); //Set FIFOCTL_GrpAckPolicy if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000 @@ -1459,13 +1459,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, uDuration = s_uFillDataHead(pDevice, byPktType, wCurrentRate, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, 0, 0, 1/*uMACfragNum*/, byFBOption); // Generate TX MAC Header - s_vGenerateMACHeader(pDevice, pbyMacHdr, (WORD)uDuration, psEthHeader, bNeedEncryption, + s_vGenerateMACHeader(pDevice, pbyMacHdr, (u16)uDuration, psEthHeader, bNeedEncryption, byFragType, uDMAIdx, 0); if (bNeedEncryption == true) { //Fill TXKEY s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - pbyMacHdr, (WORD)cbFrameBodySize, (u8 *)pMICHDR); + pbyMacHdr, (u16)cbFrameBodySize, (u8 *)pMICHDR); if (pDevice->bEnableHostWEP) { pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16; @@ -1484,9 +1484,9 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, memcpy((u8 *) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); } pbyType = (u8 *) (pbyPayloadHead + 6); - memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD)); + memcpy(pbyType, &(psEthHeader->wType), sizeof(u16)); } else { - memcpy((u8 *) (pbyPayloadHead), &(psEthHeader->wType), sizeof(WORD)); + memcpy((u8 *) (pbyPayloadHead), &(psEthHeader->wType), sizeof(u16)); } @@ -1560,7 +1560,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, if (bSoftWEP == true) { - s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (WORD)(cbFrameBodySize + cbMIClen)); + s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (u16)(cbFrameBodySize + cbMIClen)); } else if ( ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) && (bNeedEncryption == true)) || ((pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) && (bNeedEncryption == true)) || @@ -1590,7 +1590,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, //Set FragCtl in TxBufferHead - pTxBufHead->wFragCtl |= (WORD)byFragType; + pTxBufHead->wFragCtl |= (u16)byFragType; return true; @@ -1666,7 +1666,7 @@ static void s_vGenerateMACHeader(struct vnt_private *pDevice, } if (bNeedEncrypt) - pMACHeader->wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_ISWEP(1)); + pMACHeader->wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_ISWEP(1)); pMACHeader->wDurationID = cpu_to_le16(wDuration); @@ -1678,7 +1678,7 @@ static void s_vGenerateMACHeader(struct vnt_private *pDevice, pMACHeader->wSeqCtl = cpu_to_le16(pDevice->wSeqCounter << 4); //Set FragNumber in Sequence Control - pMACHeader->wSeqCtl |= cpu_to_le16((WORD)uFragIdx); + pMACHeader->wSeqCtl |= cpu_to_le16((u16)uFragIdx); if ((wFragType == FRAGCTL_ENDFRAG) || (wFragType == FRAGCTL_NONFRAG)) { pDevice->wSeqCounter++; @@ -1814,7 +1814,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } //Set FRAGCTL_MACHDCNT - pTxBufHead->wFragCtl |= cpu_to_le16((WORD)(cbMacHdLen << 10)); + pTxBufHead->wFragCtl |= cpu_to_le16((u16)(cbMacHdLen << 10)); // Notes: // Although spec says MMPDU can be fragmented; In most case, @@ -1886,7 +1886,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, //========================= // No Fragmentation //========================= - pTxBufHead->wFragCtl |= (WORD)FRAGCTL_NONFRAG; + pTxBufHead->wFragCtl |= (u16)FRAGCTL_NONFRAG; //Fill FIFO,RrvTime,RTS,and CTS @@ -1936,7 +1936,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } while(false); //Fill TXKEY s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - (u8 *)pMACHeader, (WORD)cbFrameBodySize, NULL); + (u8 *)pMACHeader, (u16)cbFrameBodySize, NULL); memcpy(pMACHeader, pPacket->p80211Header, cbMacHdLen); memcpy(pbyPayloadHead, ((u8 *)(pPacket->p80211Header) + cbMacHdLen), @@ -1967,19 +1967,19 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } - pTX_Buffer->wTxByteCount = cpu_to_le16((WORD)(cbReqCount)); + pTX_Buffer->wTxByteCount = cpu_to_le16((u16)(cbReqCount)); pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x00; pContext->pPacket = NULL; pContext->Type = CONTEXT_MGMT_PACKET; - pContext->uBufLen = (WORD)cbReqCount + 4; //USB header + pContext->uBufLen = (u16)cbReqCount + 4; //USB header if (WLAN_GET_FC_TODS(pMACHeader->wFrameCtl) == 0) { - s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(u16)cbFrameSize,pTX_Buffer->wFIFOCtl); } else { - s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(u16)cbFrameSize,pTX_Buffer->wFIFOCtl); } PIPEnsSendBulkOut(pDevice,pContext); @@ -2025,10 +2025,10 @@ 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), (u8 *)&(pTxDataHead->byServiceField), (u8 *)&(pTxDataHead->bySignalField) + (u16 *)&(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, + pTxDataHead->wDuration = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, PK_TYPE_11A, wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE)); pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; cbHeaderSize = wTxBufSize + sizeof(STxDataHead_ab); @@ -2038,10 +2038,10 @@ 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), (u8 *)&(pTxDataHead->byServiceField), (u8 *)&(pTxDataHead->bySignalField) + (u16 *)&(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, + pTxDataHead->wDuration = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, PK_TYPE_11B, wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE)); pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; cbHeaderSize = wTxBufSize + sizeof(STxDataHead_ab); @@ -2059,13 +2059,13 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, cbReqCount = cbHeaderSize + WLAN_HDR_ADDR3_LEN + cbFrameBodySize; - pTX_Buffer->wTxByteCount = (WORD)cbReqCount; + pTX_Buffer->wTxByteCount = (u16)cbReqCount; pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x01; pContext->pPacket = NULL; pContext->Type = CONTEXT_MGMT_PACKET; - pContext->uBufLen = (WORD)cbReqCount + 4; //USB header + pContext->uBufLen = (u16)cbReqCount + 4; //USB header PIPEnsSendBulkOut(pDevice,pContext); return CMD_STATUS_PENDING; @@ -2225,7 +2225,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) //Set FRAGCTL_MACHDCNT - pTxBufHead->wFragCtl |= cpu_to_le16((WORD)cbMacHdLen << 10); + pTxBufHead->wFragCtl |= cpu_to_le16((u16)cbMacHdLen << 10); // Notes: // Although spec says MMPDU can be fragmented; In most case, @@ -2299,7 +2299,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) //========================= // No Fragmentation //========================= - pTxBufHead->wFragCtl |= (WORD)FRAGCTL_NONFRAG; + pTxBufHead->wFragCtl |= (u16)FRAGCTL_NONFRAG; //Fill FIFO,RrvTime,RTS,and CTS @@ -2394,7 +2394,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } s_vFillTxKey(pDevice, (u8 *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, - pbyMacHdr, (WORD)cbFrameBodySize, (u8 *)pMICHDR); + pbyMacHdr, (u16)cbFrameBodySize, (u8 *)pMICHDR); if (pDevice->bEnableHostWEP) { pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16; @@ -2402,7 +2402,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } if ((pDevice->byLocalID <= REV_ID_VT3253_A1)) { - s_vSWencryption(pDevice, pTransmitKey, pbyPayloadHead, (WORD)(cbFrameBodySize + cbMIClen)); + s_vSWencryption(pDevice, pTransmitKey, pbyPayloadHead, (u16)(cbFrameBodySize + cbMIClen)); } } @@ -2426,19 +2426,19 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } } - pTX_Buffer->wTxByteCount = cpu_to_le16((WORD)(cbReqCount)); + pTX_Buffer->wTxByteCount = cpu_to_le16((u16)(cbReqCount)); pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x00; pContext->pPacket = skb; pContext->Type = CONTEXT_MGMT_PACKET; - pContext->uBufLen = (WORD)cbReqCount + 4; //USB header + pContext->uBufLen = (u16)cbReqCount + 4; //USB header if (WLAN_GET_FC_TODS(pMACHeader->wFrameCtl) == 0) { - s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr1[0]),(u16)cbFrameSize,pTX_Buffer->wFIFOCtl); } else { - s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(WORD)cbFrameSize,pTX_Buffer->wFIFOCtl); + s_vSaveTxPktInfo(pDevice, (u8) (pTX_Buffer->byPKTNO & 0x0F), &(pMACHeader->abyAddr3[0]),(u16)cbFrameSize,pTX_Buffer->wFIFOCtl); } PIPEnsSendBulkOut(pDevice,pContext); return ; @@ -2569,7 +2569,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, u8 Protocol_Version; //802.1x Authentication u8 Packet_Type; //802.1x Authentication u8 Descriptor_type; - WORD Key_info; + u16 Key_info; Protocol_Version = skb->data[ETH_HLEN]; Packet_Type = skb->data[ETH_HLEN+1]; @@ -2672,7 +2672,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, if (pDevice->uConnectionRate >= RATE_11M) { pDevice->wCurrentRate = RATE_11M; } else { - pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; + pDevice->wCurrentRate = (u16)pDevice->uConnectionRate; } } else { if ((pDevice->byBBType == BB_TYPE_11A) && @@ -2682,7 +2682,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, if (pDevice->uConnectionRate >= RATE_54M) pDevice->wCurrentRate = RATE_54M; else - pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; + pDevice->wCurrentRate = (u16)pDevice->uConnectionRate; } } } @@ -2817,18 +2817,18 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, pTX_Buffer = (PTX_BUFFER)&(pContext->Data[0]); pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); - pTX_Buffer->wTxByteCount = (WORD)BytesToWrite; + pTX_Buffer->wTxByteCount = (u16)BytesToWrite; pContext->pPacket = skb; pContext->Type = CONTEXT_DATA_PACKET; - pContext->uBufLen = (WORD)BytesToWrite + 4 ; //USB header + pContext->uBufLen = (u16)BytesToWrite + 4 ; //USB header - s_vSaveTxPktInfo(pDevice, (u8) (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]),(u16) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); status = PIPEnsSendBulkOut(pDevice,pContext); if (bNeedDeAuth == true) { - WORD wReason = WLAN_MGMT_REASON_MIC_FAILURE; + u16 wReason = WLAN_MGMT_REASON_MIC_FAILURE; bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (u8 *) &wReason); } @@ -2926,7 +2926,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, if (pDevice->uConnectionRate >= RATE_11M) { pDevice->wCurrentRate = RATE_11M; } else { - pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; + pDevice->wCurrentRate = (u16)pDevice->uConnectionRate; } } else { if ((pDevice->byBBType == BB_TYPE_11A) && @@ -2936,7 +2936,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, if (pDevice->uConnectionRate >= RATE_54M) pDevice->wCurrentRate = RATE_54M; else - pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; + pDevice->wCurrentRate = (u16)pDevice->uConnectionRate; } } } @@ -2971,13 +2971,13 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, pTX_Buffer = (PTX_BUFFER)&(pContext->Data[0]); pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); - pTX_Buffer->wTxByteCount = (WORD)BytesToWrite; + pTX_Buffer->wTxByteCount = (u16)BytesToWrite; pContext->pPacket = NULL; pContext->Type = CONTEXT_DATA_PACKET; - pContext->uBufLen = (WORD)BytesToWrite + 4 ; //USB header + pContext->uBufLen = (u16)BytesToWrite + 4 ; //USB header - s_vSaveTxPktInfo(pDevice, (u8) (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]),(u16) (BytesToWrite-uHeaderLen),pTX_Buffer->wFIFOCtl); status = PIPEnsSendBulkOut(pDevice,pContext); diff --git a/drivers/staging/vt6656/rxtx.h b/drivers/staging/vt6656/rxtx.h index 7ca185e4437e..57706acf3acc 100644 --- a/drivers/staging/vt6656/rxtx.h +++ b/drivers/staging/vt6656/rxtx.h @@ -41,8 +41,8 @@ // RTS buffer header // typedef struct tagSRTSDataF { - WORD wFrameControl; - WORD wDurationID; + u16 wFrameControl; + u16 wDurationID; u8 abyRA[ETH_ALEN]; u8 abyTA[ETH_ALEN]; } SRTSDataF, *PSRTSDataF; @@ -51,10 +51,10 @@ typedef struct tagSRTSDataF { // CTS buffer header // typedef struct tagSCTSDataF { - WORD wFrameControl; - WORD wDurationID; + u16 wFrameControl; + u16 wDurationID; u8 abyRA[ETH_ALEN]; - WORD wReserved; + u16 wReserved; } SCTSDataF, *PSCTSDataF; // @@ -70,106 +70,106 @@ typedef struct tagSMICHDR { typedef struct tagSTX_NAF_G_RTS { //RsvTime - WORD wRTSTxRrvTime_ba; - WORD wRTSTxRrvTime_aa; - WORD wRTSTxRrvTime_bb; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_ba; + u16 wRTSTxRrvTime_aa; + u16 wRTSTxRrvTime_bb; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; //RTS u8 byRTSSignalField_b; u8 byRTSServiceField_b; - WORD wRTSTransmitLength_b; + u16 wRTSTransmitLength_b; u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_ba; - WORD wRTSDuration_aa; - WORD wRTSDuration_bb; - WORD wReserved3; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_ba; + u16 wRTSDuration_aa; + u16 wRTSDuration_bb; + u16 wReserved3; SRTSDataF sRTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_NAF_G_RTS, *PTX_NAF_G_RTS; typedef struct tagSTX_NAF_G_RTS_MIC { //RsvTime - WORD wRTSTxRrvTime_ba; - WORD wRTSTxRrvTime_aa; - WORD wRTSTxRrvTime_bb; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_ba; + u16 wRTSTxRrvTime_aa; + u16 wRTSTxRrvTime_bb; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; SMICHDR sMICHDR; //RTS u8 byRTSSignalField_b; u8 byRTSServiceField_b; - WORD wRTSTransmitLength_b; + u16 wRTSTransmitLength_b; u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_ba; - WORD wRTSDuration_aa; - WORD wRTSDuration_bb; - WORD wReserved3; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_ba; + u16 wRTSDuration_aa; + u16 wRTSDuration_bb; + u16 wReserved3; SRTSDataF sRTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_NAF_G_RTS_MIC, *PTX_NAF_G_RTS_MIC; typedef struct tagSTX_NAF_G_CTS { //RsvTime - WORD wCTSTxRrvTime_ba; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; //CTS u8 byCTSSignalField_b; u8 byCTSServiceField_b; - WORD wCTSTransmitLength_b; - WORD wCTSDuration_ba; - WORD wReserved3; + u16 wCTSTransmitLength_b; + u16 wCTSDuration_ba; + u16 wReserved3; SCTSDataF sCTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_NAF_G_CTS, *PTX_NAF_G_CTS; @@ -177,10 +177,10 @@ typedef struct tagSTX_NAF_G_CTS typedef struct tagSTX_NAF_G_CTS_MIC { //RsvTime - WORD wCTSTxRrvTime_ba; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; SMICHDR sMICHDR; @@ -188,45 +188,45 @@ typedef struct tagSTX_NAF_G_CTS_MIC //CTS u8 byCTSSignalField_b; u8 byCTSServiceField_b; - WORD wCTSTransmitLength_b; - WORD wCTSDuration_ba; - WORD wReserved3; + u16 wCTSTransmitLength_b; + u16 wCTSDuration_ba; + u16 wReserved3; SCTSDataF sCTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_NAF_G_CTS_MIC, *PTX_NAF_G_CTS_MIC; typedef struct tagSTX_NAF_G_BEACON { - WORD wFIFOCtl; - WORD wTimeStamp; + u16 wFIFOCtl; + u16 wTimeStamp; //CTS u8 byCTSSignalField_b; u8 byCTSServiceField_b; - WORD wCTSTransmitLength_b; - WORD wCTSDuration_ba; - WORD wReserved1; + u16 wCTSTransmitLength_b; + u16 wCTSDuration_ba; + u16 wReserved1; SCTSDataF sCTS; //Data u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_a; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_a; + u16 wTimeStampOff_a; } TX_NAF_G_BEACON, *PTX_NAF_G_BEACON; @@ -235,23 +235,23 @@ typedef struct tagSTX_NAF_G_BEACON typedef struct tagSTX_NAF_AB_RTS { //RsvTime - WORD wRTSTxRrvTime_ab; - WORD wTxRrvTime_ab; + u16 wRTSTxRrvTime_ab; + u16 wTxRrvTime_ab; //RTS u8 byRTSSignalField_ab; u8 byRTSServiceField_ab; - WORD wRTSTransmitLength_ab; - WORD wRTSDuration_ab; - WORD wReserved2; + u16 wRTSTransmitLength_ab; + u16 wRTSDuration_ab; + u16 wReserved2; SRTSDataF sRTS; //Data u8 bySignalField_ab; u8 byServiceField_ab; - WORD wTransmitLength_ab; - WORD wDuration_ab; - WORD wTimeStampOff_ab; + u16 wTransmitLength_ab; + u16 wDuration_ab; + u16 wTimeStampOff_ab; } TX_NAF_AB_RTS, *PTX_NAF_AB_RTS; @@ -260,25 +260,25 @@ typedef struct tagSTX_NAF_AB_RTS typedef struct tagSTX_NAF_AB_RTS_MIC { //RsvTime - WORD wRTSTxRrvTime_ab; - WORD wTxRrvTime_ab; + u16 wRTSTxRrvTime_ab; + u16 wTxRrvTime_ab; SMICHDR sMICHDR; //RTS u8 byRTSSignalField_ab; u8 byRTSServiceField_ab; - WORD wRTSTransmitLength_ab; - WORD wRTSDuration_ab; - WORD wReserved2; + u16 wRTSTransmitLength_ab; + u16 wRTSDuration_ab; + u16 wReserved2; SRTSDataF sRTS; //Data u8 bySignalField_ab; u8 byServiceField_ab; - WORD wTransmitLength_ab; - WORD wDuration_ab; - WORD wTimeStampOff_ab; + u16 wTransmitLength_ab; + u16 wDuration_ab; + u16 wTimeStampOff_ab; } TX_NAF_AB_RTS_MIC, *PTX_NAF_AB_RTS_MIC; @@ -288,90 +288,90 @@ typedef struct tagSTX_NAF_AB_RTS_MIC typedef struct tagSTX_NAF_AB_CTS { //RsvTime - WORD wReserved2; - WORD wTxRrvTime_ab; + u16 wReserved2; + u16 wTxRrvTime_ab; //Data u8 bySignalField_ab; u8 byServiceField_ab; - WORD wTransmitLength_ab; - WORD wDuration_ab; - WORD wTimeStampOff_ab; + u16 wTransmitLength_ab; + u16 wDuration_ab; + u16 wTimeStampOff_ab; } TX_NAF_AB_CTS, *PTX_NAF_AB_CTS; typedef struct tagSTX_NAF_AB_CTS_MIC { //RsvTime - WORD wReserved2; - WORD wTxRrvTime_ab; + u16 wReserved2; + u16 wTxRrvTime_ab; SMICHDR sMICHDR; //Data u8 bySignalField_ab; u8 byServiceField_ab; - WORD wTransmitLength_ab; - WORD wDuration_ab; - WORD wTimeStampOff_ab; + u16 wTransmitLength_ab; + u16 wDuration_ab; + u16 wTimeStampOff_ab; } TX_NAF_AB_CTS_MIC, *PTX_NAF_AB_CTS_MIC; typedef struct tagSTX_NAF_AB_BEACON { - WORD wFIFOCtl; - WORD wTimeStamp; + u16 wFIFOCtl; + u16 wTimeStamp; //Data u8 bySignalField_ab; u8 byServiceField_ab; - WORD wTransmitLength_ab; - WORD wDuration_ab; - WORD wTimeStampOff_ab; + u16 wTransmitLength_ab; + u16 wDuration_ab; + u16 wTimeStampOff_ab; } TX_NAF_AB_BEACON, *PTX_NAF_AB_BEACON; typedef struct tagSTX_AF_G_RTS { //RsvTime - WORD wRTSTxRrvTime_ba; - WORD wRTSTxRrvTime_aa; - WORD wRTSTxRrvTime_bb; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_ba; + u16 wRTSTxRrvTime_aa; + u16 wRTSTxRrvTime_bb; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; //RTS u8 byRTSSignalField_b; u8 byRTSServiceField_b; - WORD wRTSTransmitLength_b; + u16 wRTSTransmitLength_b; u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_ba; - WORD wRTSDuration_aa; - WORD wRTSDuration_bb; - WORD wReserved3; - WORD wRTSDuration_ba_f0; - WORD wRTSDuration_aa_f0; - WORD wRTSDuration_ba_f1; - WORD wRTSDuration_aa_f1; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_ba; + u16 wRTSDuration_aa; + u16 wRTSDuration_bb; + u16 wReserved3; + u16 wRTSDuration_ba_f0; + u16 wRTSDuration_aa_f0; + u16 wRTSDuration_ba_f1; + u16 wRTSDuration_aa_f1; SRTSDataF sRTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_AF_G_RTS, *PTX_AF_G_RTS; @@ -379,45 +379,45 @@ typedef struct tagSTX_AF_G_RTS typedef struct tagSTX_AF_G_RTS_MIC { //RsvTime - WORD wRTSTxRrvTime_ba; - WORD wRTSTxRrvTime_aa; - WORD wRTSTxRrvTime_bb; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_ba; + u16 wRTSTxRrvTime_aa; + u16 wRTSTxRrvTime_bb; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; SMICHDR sMICHDR; //RTS u8 byRTSSignalField_b; u8 byRTSServiceField_b; - WORD wRTSTransmitLength_b; + u16 wRTSTransmitLength_b; u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_ba; - WORD wRTSDuration_aa; - WORD wRTSDuration_bb; - WORD wReserved3; - WORD wRTSDuration_ba_f0; - WORD wRTSDuration_aa_f0; - WORD wRTSDuration_ba_f1; - WORD wRTSDuration_aa_f1; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_ba; + u16 wRTSDuration_aa; + u16 wRTSDuration_bb; + u16 wReserved3; + u16 wRTSDuration_ba_f0; + u16 wRTSDuration_aa_f0; + u16 wRTSDuration_ba_f1; + u16 wRTSDuration_aa_f1; SRTSDataF sRTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_AF_G_RTS_MIC, *PTX_AF_G_RTS_MIC; @@ -426,34 +426,34 @@ typedef struct tagSTX_AF_G_RTS_MIC typedef struct tagSTX_AF_G_CTS { //RsvTime - WORD wCTSTxRrvTime_ba; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; //CTS u8 byCTSSignalField_b; u8 byCTSServiceField_b; - WORD wCTSTransmitLength_b; - WORD wCTSDuration_ba; - WORD wReserved3; - WORD wCTSDuration_ba_f0; - WORD wCTSDuration_ba_f1; + u16 wCTSTransmitLength_b; + u16 wCTSDuration_ba; + u16 wReserved3; + u16 wCTSDuration_ba_f0; + u16 wCTSDuration_ba_f1; SCTSDataF sCTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_AF_G_CTS, *PTX_AF_G_CTS; @@ -461,10 +461,10 @@ typedef struct tagSTX_AF_G_CTS typedef struct tagSTX_AF_G_CTS_MIC { //RsvTime - WORD wCTSTxRrvTime_ba; - WORD wReserved2; - WORD wTxRrvTime_b; - WORD wTxRrvTime_a; + u16 wCTSTxRrvTime_ba; + u16 wReserved2; + u16 wTxRrvTime_b; + u16 wTxRrvTime_a; SMICHDR sMICHDR; @@ -472,26 +472,26 @@ typedef struct tagSTX_AF_G_CTS_MIC //CTS u8 byCTSSignalField_b; u8 byCTSServiceField_b; - WORD wCTSTransmitLength_b; - WORD wCTSDuration_ba; - WORD wReserved3; - WORD wCTSDuration_ba_f0; - WORD wCTSDuration_ba_f1; + u16 wCTSTransmitLength_b; + u16 wCTSDuration_ba; + u16 wReserved3; + u16 wCTSDuration_ba_f0; + u16 wCTSDuration_ba_f1; SCTSDataF sCTS; //Data u8 bySignalField_b; u8 byServiceField_b; - WORD wTransmitLength_b; + u16 wTransmitLength_b; u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_b; - WORD wDuration_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; - WORD wTimeStampOff_b; - WORD wTimeStampOff_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; } TX_AF_G_CTS_MIC, *PTX_AF_G_CTS_MIC; @@ -500,27 +500,27 @@ typedef struct tagSTX_AF_G_CTS_MIC typedef struct tagSTX_AF_A_RTS { //RsvTime - WORD wRTSTxRrvTime_a; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_a; + u16 wTxRrvTime_a; //RTS u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_a; - WORD wReserved2; - WORD wRTSDuration_a_f0; - WORD wRTSDuration_a_f1; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_a; + u16 wReserved2; + u16 wRTSDuration_a_f0; + u16 wRTSDuration_a_f1; SRTSDataF sRTS; //Data u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_a; - WORD wTimeStampOff_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; + u16 wTransmitLength_a; + u16 wDuration_a; + u16 wTimeStampOff_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; } TX_AF_A_RTS, *PTX_AF_A_RTS; @@ -528,29 +528,29 @@ typedef struct tagSTX_AF_A_RTS typedef struct tagSTX_AF_A_RTS_MIC { //RsvTime - WORD wRTSTxRrvTime_a; - WORD wTxRrvTime_a; + u16 wRTSTxRrvTime_a; + u16 wTxRrvTime_a; SMICHDR sMICHDR; //RTS u8 byRTSSignalField_a; u8 byRTSServiceField_a; - WORD wRTSTransmitLength_a; - WORD wRTSDuration_a; - WORD wReserved2; - WORD wRTSDuration_a_f0; - WORD wRTSDuration_a_f1; + u16 wRTSTransmitLength_a; + u16 wRTSDuration_a; + u16 wReserved2; + u16 wRTSDuration_a_f0; + u16 wRTSDuration_a_f1; SRTSDataF sRTS; //Data u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_a; - WORD wTimeStampOff_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; + u16 wTransmitLength_a; + u16 wDuration_a; + u16 wTimeStampOff_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; } TX_AF_A_RTS_MIC, *PTX_AF_A_RTS_MIC; @@ -559,17 +559,17 @@ typedef struct tagSTX_AF_A_RTS_MIC typedef struct tagSTX_AF_A_CTS { //RsvTime - WORD wReserved2; - WORD wTxRrvTime_a; + u16 wReserved2; + u16 wTxRrvTime_a; //Data u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_a; - WORD wTimeStampOff_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; + u16 wTransmitLength_a; + u16 wDuration_a; + u16 wTimeStampOff_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; } TX_AF_A_CTS, *PTX_AF_A_CTS; @@ -577,19 +577,19 @@ typedef struct tagSTX_AF_A_CTS typedef struct tagSTX_AF_A_CTS_MIC { //RsvTime - WORD wReserved2; - WORD wTxRrvTime_a; + u16 wReserved2; + u16 wTxRrvTime_a; SMICHDR sMICHDR; //Data u8 bySignalField_a; u8 byServiceField_a; - WORD wTransmitLength_a; - WORD wDuration_a; - WORD wTimeStampOff_a; - WORD wDuration_a_f0; - WORD wDuration_a_f1; + u16 wTransmitLength_a; + u16 wDuration_a; + u16 wTimeStampOff_a; + u16 wDuration_a_f0; + u16 wDuration_a_f1; } TX_AF_A_CTS_MIC, *PTX_AF_A_CTS_MIC; @@ -628,13 +628,13 @@ typedef struct tagSTX_BUFFER { u8 byType; u8 byPKTNO; - WORD wTxByteCount; + u16 wTxByteCount; u32 adwTxKey[4]; - WORD wFIFOCtl; - WORD wTimeStamp; - WORD wFragCtl; - WORD wReserved; + u16 wFIFOCtl; + u16 wTimeStamp; + u16 wFragCtl; + u16 wReserved; // Actual message @@ -650,10 +650,10 @@ typedef struct tagSBEACON_BUFFER { u8 byType; u8 byPKTNO; - WORD wTxByteCount; + u16 wTxByteCount; - WORD wFIFOCtl; - WORD wTimeStamp; + u16 wFIFOCtl; + u16 wTimeStamp; // Actual message TX_BUFFER_CONTAINER BufferHeader; diff --git a/drivers/staging/vt6656/srom.h b/drivers/staging/vt6656/srom.h index c681789136c1..9f1af6746ccb 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 { - u8 abyPAR[6]; // 0x00 (WORD) + u8 abyPAR[6]; // 0x00 (u16) - WORD wSUB_VID; // 0x03 (WORD) - WORD wSUB_SID; + u16 wSUB_VID; // 0x03 (u16) + u16 wSUB_SID; - u8 byBCFG0; // 0x05 (WORD) + u8 byBCFG0; // 0x05 (u16) u8 byBCFG1; - u8 byFCR0; // 0x06 (WORD) + u8 byFCR0; // 0x06 (u16) u8 byFCR1; - u8 byPMC0; // 0x07 (WORD) + u8 byPMC0; // 0x07 (u16) u8 byPMC1; - u8 byMAXLAT; // 0x08 (WORD) + u8 byMAXLAT; // 0x08 (u16) u8 byMINGNT; - u8 byCFG0; // 0x09 (WORD) + u8 byCFG0; // 0x09 (u16) u8 byCFG1; - WORD wCISPTR; // 0x0A (WORD) - WORD wRsv0; // 0x0B (WORD) - WORD wRsv1; // 0x0C (WORD) - u8 byBBPAIR; // 0x0D (WORD) + u16 wCISPTR; // 0x0A (u16) + u16 wRsv0; // 0x0B (u16) + u16 wRsv1; // 0x0C (u16) + u8 byBBPAIR; // 0x0D (u16) u8 byRFTYPE; - u8 byMinChannel; // 0x0E (WORD) + u8 byMinChannel; // 0x0E (u16) u8 byMaxChannel; - u8 bySignature; // 0x0F (WORD) + u8 bySignature; // 0x0F (u16) u8 byCheckSum; - u8 abyReserved0[96]; // 0x10 (WORD) - u8 abyCIS[128]; // 0x80 (WORD) + u8 abyReserved0[96]; // 0x10 (u16) + u8 abyCIS[128]; // 0x80 (u16) } SSromReg, *PSSromReg; /*--------------------- Export Macros ------------------------------*/ diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h index 0b8a40f05b96..d3ef6b59d503 100644 --- a/drivers/staging/vt6656/tether.h +++ b/drivers/staging/vt6656/tether.h @@ -122,7 +122,7 @@ typedef struct tagSEthernetHeader { u8 abyDstAddr[ETH_ALEN]; u8 abySrcAddr[ETH_ALEN]; - WORD wType; + u16 wType; } __attribute__ ((__packed__)) SEthernetHeader, *PSEthernetHeader; @@ -133,7 +133,7 @@ SEthernetHeader, *PSEthernetHeader; typedef struct tagS802_3Header { u8 abyDstAddr[ETH_ALEN]; u8 abySrcAddr[ETH_ALEN]; - WORD wLen; + u16 wLen; } __attribute__ ((__packed__)) S802_3Header, *PS802_3Header; @@ -141,12 +141,12 @@ S802_3Header, *PS802_3Header; // 802_11 packet // typedef struct tagS802_11Header { - WORD wFrameCtl; - WORD wDurationID; + u16 wFrameCtl; + u16 wDurationID; u8 abyAddr1[ETH_ALEN]; u8 abyAddr2[ETH_ALEN]; u8 abyAddr3[ETH_ALEN]; - WORD wSeqCtl; + u16 wSeqCtl; u8 abyAddr4[ETH_ALEN]; } __attribute__ ((__packed__)) S802_11Header, *PS802_11Header; diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c index c6d3a83bd890..f5aeb5e53396 100644 --- a/drivers/staging/vt6656/tkip.c +++ b/drivers/staging/vt6656/tkip.c @@ -184,7 +184,7 @@ static unsigned int rotr1(unsigned int a) void TKIPvMixKey( u8 * pbyTKey, u8 * pbyTA, - WORD wTSC15_0, + u16 wTSC15_0, DWORD dwTSC47_16, u8 * pbyRC4Key ) diff --git a/drivers/staging/vt6656/tkip.h b/drivers/staging/vt6656/tkip.h index b8e5d442ac0f..7662423e2479 100644 --- a/drivers/staging/vt6656/tkip.h +++ b/drivers/staging/vt6656/tkip.h @@ -49,7 +49,7 @@ void TKIPvMixKey( u8 * pbyTKey, u8 * pbyTA, - WORD wTSC15_0, + u16 wTSC15_0, DWORD dwTSC47_16, u8 * pbyRC4Key ); diff --git a/drivers/staging/vt6656/tmacro.h b/drivers/staging/vt6656/tmacro.h index 4ad4f051266e..b4e6cb2e4c9f 100644 --- a/drivers/staging/vt6656/tmacro.h +++ b/drivers/staging/vt6656/tmacro.h @@ -37,24 +37,24 @@ #define LOBYTE(w) ((u8)(w)) #endif #if !defined(HIBYTE) -#define HIBYTE(w) ((u8)(((WORD)(w) >> 8) & 0xFF)) +#define HIBYTE(w) ((u8)(((u16)(w) >> 8) & 0xFF)) #endif #if !defined(LOWORD) -#define LOWORD(d) ((WORD)(d)) +#define LOWORD(d) ((u16)(d)) #endif #if !defined(HIWORD) -#define HIWORD(d) ((WORD)((((DWORD)(d)) >> 16) & 0xFFFF)) +#define HIWORD(d) ((u16)((((DWORD)(d)) >> 16) & 0xFFFF)) #endif #define LODWORD(q) ((q).u.dwLowDword) #define HIDWORD(q) ((q).u.dwHighDword) #if !defined(MAKEWORD) -#define MAKEWORD(lb, hb) ((WORD)(((u8)(lb)) | (((WORD)((u8)(hb))) << 8))) +#define MAKEWORD(lb, hb) ((u16)(((u8)(lb)) | (((u16)((u8)(hb))) << 8))) #endif #if !defined(MAKEDWORD) -#define MAKEDWORD(lw, hw) ((DWORD)(((WORD)(lw)) | (((DWORD)((WORD)(hw))) << 16))) +#define MAKEDWORD(lw, hw) ((DWORD)(((u16)(lw)) | (((DWORD)((u16)(hw))) << 16))) #endif #endif /* __TMACRO_H__ */ diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index a4cafc643c35..ee1201d4a8e8 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -35,7 +35,6 @@ /****** Simple typedefs ***************************************************/ -typedef u16 WORD; typedef u32 DWORD; /****** Common pointer types ***********************************************/ @@ -45,8 +44,6 @@ typedef u32 DWORD_PTR; // boolean pointer -typedef WORD * PWORD; - typedef DWORD * PDWORD; #endif /* __TTYPE_H__ */ diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 904b5dae5d2a..4d9e1456a35d 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -1147,7 +1147,7 @@ int bScheduleCommand(struct vnt_private *pDevice, break; /* case WLAN_CMD_DEAUTH: - pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((PWORD)pbyItem0); + pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((u16 *)pbyItem0); break; */ diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h index 5763509b0af0..398414b2b431 100644 --- a/drivers/staging/vt6656/wcmd.h +++ b/drivers/staging/vt6656/wcmd.h @@ -77,7 +77,7 @@ typedef struct tagCMD_ITEM { bool bNeedRadioOFF; bool bRadioCmd; bool bForceSCAN; - WORD wDeAuthenReason; + u16 wDeAuthenReason; } CMD_ITEM, *PCMD_ITEM; // Command state diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index c9ad7cacc6e3..f36cb112682a 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -543,9 +543,9 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo); pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); - pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)uNodeIndex; + pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex; wAssocStatus = WLAN_MGMT_STATUS_SUCCESS; - wAssocAID = (WORD)uNodeIndex; + wAssocAID = (u16)uNodeIndex; // check if ERP support if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true; @@ -691,9 +691,9 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo); pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); - pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)uNodeIndex; + pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex; wAssocStatus = WLAN_MGMT_STATUS_SUCCESS; - wAssocAID = (WORD)uNodeIndex; + wAssocAID = (u16)uNodeIndex; // if suppurt ERP if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) @@ -2843,9 +2843,9 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) if (byMap) { if (!bStartFound) { bStartFound = true; - wStartIndex = (WORD)ii; + wStartIndex = (u16)ii; } - wEndIndex = (WORD)ii; + wEndIndex = (u16)ii; } } @@ -2917,7 +2917,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, )); if (pDevice->bEnablePSMode) { - sFrame.pHdr->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_PWRMGT(1)); + sFrame.pHdr->sA3.wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_PWRMGT(1)); } memcpy( sFrame.pHdr->sA3.abyAddr1, abyBroadcastAddr, WLAN_ADDR_LEN); @@ -2988,11 +2988,11 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, // Pairwise Key Cipher Suite sFrame.pRSNWPA->wPKCount = 0; // Auth Key Management Suite - *((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; + *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; sFrame.pRSNWPA->len +=2; // RSN Capabilites - *((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; + *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; sFrame.pRSNWPA->len +=2; sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; } @@ -3089,7 +3089,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); if (byPHYType == BB_TYPE_11B) { - *sFrame.pwCapInfo &= cpu_to_le16((WORD)~(WLAN_SET_CAP_INFO_SHORTSLOTTIME(1))); + *sFrame.pwCapInfo &= cpu_to_le16((u16)~(WLAN_SET_CAP_INFO_SHORTSLOTTIME(1))); } // Copy SSID @@ -3322,7 +3322,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { unsigned int ii; - PWORD pwPMKID; + u16 * pwPMKID; // WPA IE sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -3387,7 +3387,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID pbyRSN = &sFrame.pRSN->abyRSN[18]; - pwPMKID = (PWORD)pbyRSN; // Point to PMKID count + pwPMKID = (u16 *)pbyRSN; // Point to PMKID count *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { @@ -3578,7 +3578,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { unsigned int ii; - PWORD pwPMKID; + u16 * pwPMKID; /* WPA IE */ sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -3643,7 +3643,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID pbyRSN = &sFrame.pRSN->abyRSN[18]; - pwPMKID = (PWORD)pbyRSN; // Point to PMKID count + pwPMKID = (u16 *)pbyRSN; // Point to PMKID count *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { @@ -3719,7 +3719,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); *sFrame.pwStatus = cpu_to_le16(wAssocStatus); - *sFrame.pwAid = cpu_to_le16((WORD)(wAssocAID | BIT14 | BIT15)); + *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15)); // Copy the rate set sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); @@ -3788,7 +3788,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); *sFrame.pwStatus = cpu_to_le16(wAssocStatus); - *sFrame.pwAid = cpu_to_le16((WORD)(wAssocAID | BIT14 | BIT15)); + *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15)); // Copy the rate set sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); diff --git a/drivers/staging/vt6656/wpa.c b/drivers/staging/vt6656/wpa.c index 619ce3c69641..e370b39821c6 100644 --- a/drivers/staging/vt6656/wpa.c +++ b/drivers/staging/vt6656/wpa.c @@ -167,7 +167,7 @@ WPA_ParseRSN( break; //DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1])); } //for - pBSSList->wPKCount = (WORD)j; + pBSSList->wPKCount = (u16)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount); } @@ -197,7 +197,7 @@ WPA_ParseRSN( //DBG_PRN_GRP14(("abyAuthType[%d]: %X\n", j-1, pBSSList->abyAuthType[j-1])); } if(j > 0) - pBSSList->wAuthCount = (WORD)j; + pBSSList->wAuthCount = (u16)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount); } @@ -213,7 +213,7 @@ WPA_ParseRSN( pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); pBSSList->sRSNCapObj.bRSNCapExist = true; - pBSSList->sRSNCapObj.wRSNCap = *(PWORD)pbyCaps; + pBSSList->sRSNCapObj.wRSNCap = *(u16 *)pbyCaps; //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps)); //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK)); //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx)); diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c index 71a6fa5a4b54..004869ab221e 100644 --- a/drivers/staging/vt6656/wpa2.c +++ b/drivers/staging/vt6656/wpa2.c @@ -113,7 +113,7 @@ WPA2vParseRSN ( ) { int i, j; - WORD m = 0, n = 0; + u16 m = 0, n = 0; u8 * pbyOUI; bool bUseGK = false; @@ -163,7 +163,7 @@ WPA2vParseRSN ( } if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2) - pBSSNode->wCSSPKCount = *((PWORD) &(pRSN->abyRSN[4])); + pBSSNode->wCSSPKCount = *((u16 *) &(pRSN->abyRSN[4])); j = 0; pbyOUI = &(pRSN->abyRSN[6]); @@ -208,14 +208,14 @@ WPA2vParseRSN ( // invalid CSS, No valid PK. return; } - pBSSNode->wCSSPKCount = (WORD)j; + pBSSNode->wCSSPKCount = (u16)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount); } - m = *((PWORD) &(pRSN->abyRSN[4])); + m = *((u16 *) &(pRSN->abyRSN[4])); if (pRSN->len >= 10+m*4) { // ver(2) + GK(4) + PK count(2) + PKS(4*m) + AKMSS count(2) - pBSSNode->wAKMSSAuthCount = *((PWORD) &(pRSN->abyRSN[6+4*m])); + pBSSNode->wAKMSSAuthCount = *((u16 *) &(pRSN->abyRSN[6+4*m])); j = 0; pbyOUI = &(pRSN->abyRSN[8+4*m]); for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) { @@ -231,13 +231,13 @@ WPA2vParseRSN ( } else break; } - pBSSNode->wAKMSSAuthCount = (WORD)j; + pBSSNode->wAKMSSAuthCount = (u16)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount); - n = *((PWORD) &(pRSN->abyRSN[6+4*m])); + n = *((u16 *) &(pRSN->abyRSN[6+4*m])); if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2) pBSSNode->sRSNCapObj.bRSNCapExist = true; - pBSSNode->sRSNCapObj.wRSNCap = *((PWORD) &(pRSN->abyRSN[8+4*m+4*n])); + pBSSNode->sRSNCapObj.wRSNCap = *((u16 *) &(pRSN->abyRSN[8+4*m+4*n])); } } //ignore PMKID lists bcs only (Re)Assocrequest has this field @@ -337,7 +337,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs) (pMgmt->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { /* RSN PMKID, pointer to PMKID count */ - pwPMKID = (PWORD)(&pRSNIEs->abyRSN[18]); + pwPMKID = (u16 *)(&pRSNIEs->abyRSN[18]); *pwPMKID = 0; /* Initialize PMKID count */ pbyBuffer = &pRSNIEs->abyRSN[20]; /* Point to PMKID list */ for (ii = 0; ii < pMgmt->gsPMKIDCache.BSSIDInfoCount; ii++) { -- 2.30.2