Use unsigned short * instead. Signed-off-by: Charles Clément <caratorn@xxxxxxxxx> --- drivers/staging/vt6655/80211mgr.c | 76 +++++++++++++++++----------------- drivers/staging/vt6655/80211mgr.h | 38 ++++++++-------- drivers/staging/vt6655/aes_ccmp.c | 4 +- drivers/staging/vt6655/baseband.c | 2 +- drivers/staging/vt6655/baseband.h | 2 +- drivers/staging/vt6655/bssdb.c | 18 ++++---- drivers/staging/vt6655/bssdb.h | 2 +- drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6655/datarate.c | 6 +- drivers/staging/vt6655/datarate.h | 6 +- drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/dpc.c | 32 +++++++------- drivers/staging/vt6655/rxtx.c | 34 ++++++++-------- drivers/staging/vt6655/ttype.h | 2 - drivers/staging/vt6655/upc.h | 4 +- drivers/staging/vt6655/vntwifi.c | 2 +- drivers/staging/vt6655/vntwifi.h | 2 +- drivers/staging/vt6655/wcmd.c | 2 +- drivers/staging/vt6655/wmgr.c | 12 +++--- drivers/staging/vt6655/wpa.c | 2 +- drivers/staging/vt6655/wpa2.c | 14 +++--- 21 files changed, 131 insertions(+), 133 deletions(-) diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 9fbced8..9156a0b 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -99,9 +99,9 @@ vMgrEncodeBeacon( // Fixed Fields pFrame->pqwTimestamp = (PQWORD)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_CAPINFO); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_BEACON_OFF_SSID; @@ -133,9 +133,9 @@ vMgrDecodeBeacon( // Fixed Fields pFrame->pqwTimestamp = (PQWORD)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_BEACON_OFF_CAPINFO); // Information elements @@ -296,7 +296,7 @@ vMgrEncodeDisassociation( // Fixed Fields - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (unsigned short *)(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)); @@ -323,7 +323,7 @@ vMgrDecodeDisassociation( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DISASSOC_OFF_REASON); return; @@ -348,9 +348,9 @@ vMgrEncodeAssocRequest( { pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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)); return; @@ -377,9 +377,9 @@ vMgrDecodeAssocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCREQ_OFF_LISTEN_INT); // Information elements @@ -442,11 +442,11 @@ vMgrEncodeAssocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(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)); @@ -476,11 +476,11 @@ vMgrDecodeAssocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_ASSOCRESP_OFF_AID); // Information elements @@ -521,9 +521,9 @@ vMgrEncodeReassocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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); @@ -554,9 +554,9 @@ vMgrDecodeReassocRequest( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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); @@ -701,9 +701,9 @@ vMgrEncodeProbeResponse( // Fixed Fields pFrame->pqwTimestamp = (PQWORD)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_CAP_INFO); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_PROBERESP_OFF_CAP_INFO + @@ -738,9 +738,9 @@ vMgrDecodeProbeResponse( // Fixed Fields pFrame->pqwTimestamp = (PQWORD)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_PROBERESP_OFF_CAP_INFO); // Information elements @@ -847,11 +847,11 @@ vMgrEncodeAuthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwAuthAlgorithm = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthAlgorithm = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(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)); @@ -880,11 +880,11 @@ vMgrDecodeAuthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwAuthAlgorithm = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwAuthAlgorithm = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_AUTHEN_OFF_STATUS); // Information elements @@ -918,7 +918,7 @@ vMgrEncodeDeauthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (unsigned short *)(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)); @@ -945,7 +945,7 @@ vMgrDecodeDeauthen( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwReason = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DEAUTHEN_OFF_REASON); return; @@ -971,11 +971,11 @@ vMgrEncodeReassocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(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)); @@ -1006,11 +1006,11 @@ vMgrDecodeReassocResponse( pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; // Fixed Fields - pFrame->pwCapInfo = (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + pFrame->pwCapInfo = (unsigned short *)(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 = (unsigned short *)(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 = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_REASSOCRESP_OFF_AID); //Information elements diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h index bb58ed0..a11e663 100644 --- a/drivers/staging/vt6655/80211mgr.h +++ b/drivers/staging/vt6655/80211mgr.h @@ -511,8 +511,8 @@ typedef struct tagWLAN_FR_BEACON { PUWLAN_80211HDR pHdr; // fixed fields PQWORD pqwTimestamp; - PWORD pwBeaconInterval; - PWORD pwCapInfo; + unsigned short *pwBeaconInterval; + unsigned short *pwCapInfo; /*-- info elements ----------*/ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -556,7 +556,7 @@ typedef struct tagWLAN_FR_DISASSOC { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwReason; + unsigned short *pwReason; /*-- info elements ----------*/ } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC; @@ -569,8 +569,8 @@ typedef struct tagWLAN_FR_ASSOCREQ { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwCapInfo; - PWORD pwListenInterval; + unsigned short *pwCapInfo; + unsigned short *pwListenInterval; /*-- info elements ----------*/ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -590,9 +590,9 @@ typedef struct tagWLAN_FR_ASSOCRESP { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwCapInfo; - PWORD pwStatus; - PWORD pwAid; + unsigned short *pwCapInfo; + unsigned short *pwStatus; + unsigned short *pwAid; /*-- info elements ----------*/ PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates; @@ -608,8 +608,8 @@ typedef struct tagWLAN_FR_REASSOCREQ { PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwCapInfo; - PWORD pwListenInterval; + unsigned short *pwCapInfo; + unsigned short *pwListenInterval; PIEEE_ADDR pAddrCurrAP; /*-- info elements ----------*/ @@ -629,9 +629,9 @@ typedef struct tagWLAN_FR_REASSOCRESP { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwCapInfo; - PWORD pwStatus; - PWORD pwAid; + unsigned short *pwCapInfo; + unsigned short *pwStatus; + unsigned short *pwAid; /*-- info elements ----------*/ PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates; @@ -662,8 +662,8 @@ typedef struct tagWLAN_FR_PROBERESP { PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ PQWORD pqwTimestamp; - PWORD pwBeaconInterval; - PWORD pwCapInfo; + unsigned short *pwBeaconInterval; + unsigned short *pwCapInfo; /*-- info elements ----------*/ PWLAN_IE_SSID pSSID; PWLAN_IE_SUPP_RATES pSuppRates; @@ -690,9 +690,9 @@ typedef struct tagWLAN_FR_AUTHEN { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwAuthAlgorithm; - PWORD pwAuthSequence; - PWORD pwStatus; + unsigned short *pwAuthAlgorithm; + unsigned short *pwAuthSequence; + unsigned short *pwStatus; /*-- info elements ----------*/ PWLAN_IE_CHALLENGE pChallenge; @@ -706,7 +706,7 @@ typedef struct tagWLAN_FR_DEAUTHEN { unsigned char *pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ - PWORD pwReason; + unsigned short *pwReason; /*-- info elements ----------*/ diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c index f148356..a77a104 100644 --- a/drivers/staging/vt6655/aes_ccmp.c +++ b/drivers/staging/vt6655/aes_ccmp.c @@ -267,8 +267,8 @@ 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(*(unsigned short *)pbyFrame) && + WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) { bA4 = TRUE; pbyIV += 6; // 6 is 802.11 address4 wHLen += 6; diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index f96a337..87c66e2 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -1849,7 +1849,7 @@ BBvCaculateParameter ( unsigned int cbFrameLength, WORD wRate, BYTE byPacketType, - PWORD pwPhyLen, + unsigned short *pwPhyLen, unsigned char *pbyPhySrv, unsigned char *pbyPhySgn ) diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index 616dab6..eb0368a 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -132,7 +132,7 @@ BBvCaculateParameter ( unsigned int cbFrameLength, WORD wRate, BYTE byPacketType, - PWORD pwPhyLen, + unsigned short *pwPhyLen, unsigned char *pbyPhySrv, unsigned char *pbyPhySgn ); diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 76e8136..ddfc97c 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -542,8 +542,8 @@ BSSbInsertToBSSList ( TRUE, pQuiet->byQuietCount, pQuiet->byQuietPeriod, - *((PWORD)pQuiet->abyQuietDuration), - *((PWORD)pQuiet->abyQuietOffset) + *((unsigned short *)pQuiet->abyQuietDuration), + *((unsigned short *)pQuiet->abyQuietOffset) ); } else { pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; @@ -551,8 +551,8 @@ BSSbInsertToBSSList ( FALSE, pQuiet->byQuietCount, pQuiet->byQuietPeriod, - *((PWORD)pQuiet->abyQuietDuration), - *((PWORD)pQuiet->abyQuietOffset) + *((unsigned short *)pQuiet->abyQuietDuration), + *((unsigned short *)pQuiet->abyQuietOffset) ); } } @@ -719,8 +719,8 @@ BSSbUpdateToBSSList ( TRUE, pQuiet->byQuietCount, pQuiet->byQuietPeriod, - *((PWORD)pQuiet->abyQuietDuration), - *((PWORD)pQuiet->abyQuietOffset) + *((unsigned short *)pQuiet->abyQuietDuration), + *((unsigned short *)pQuiet->abyQuietOffset) ); } else { pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; @@ -728,8 +728,8 @@ BSSbUpdateToBSSList ( FALSE, pQuiet->byQuietCount, pQuiet->byQuietPeriod, - *((PWORD)pQuiet->abyQuietDuration), - *((PWORD)pQuiet->abyQuietOffset) + *((unsigned short *)pQuiet->abyQuietDuration), + *((unsigned short *)pQuiet->abyQuietOffset) ); } } @@ -898,7 +898,7 @@ BSSvRemoveOneNode( void BSSvUpdateAPNode( void *hDeviceContext, - PWORD pwCapInfo, + unsigned short *pwCapInfo, PWLAN_IE_SUPP_RATES pSuppRates, PWLAN_IE_SUPP_RATES pExtSuppRates ) diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h index ac6473a..9f197c3 100644 --- a/drivers/staging/vt6655/bssdb.h +++ b/drivers/staging/vt6655/bssdb.h @@ -324,7 +324,7 @@ BSSvCreateOneNode( void BSSvUpdateAPNode( void *hDeviceContext, - PWORD pwCapInfo, + unsigned short *pwCapInfo, PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pExtSuppRates ); diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 4504724..e800bbc 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -1749,7 +1749,7 @@ CARDbStartMeasure ( if (pDevice->byLocalID > REV_ID_VT3253_B1) { HIDWORD(qwStartTSF) = HIDWORD(*((PQWORD) (pDevice->pCurrMeasureEID->sReq.abyStartTime))); LODWORD(qwStartTSF) = LODWORD(*((PQWORD) (pDevice->pCurrMeasureEID->sReq.abyStartTime))); - wDuration = *((PWORD) (pDevice->pCurrMeasureEID->sReq.abyDuration)); + wDuration = *((unsigned short *) (pDevice->pCurrMeasureEID->sReq.abyDuration)); wDuration += 1; // 1 TU for channel switching if ((LODWORD(qwStartTSF) == 0) && (HIDWORD(qwStartTSF) == 0)) { diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c index e1ab300..4be933c 100644 --- a/drivers/staging/vt6655/datarate.c +++ b/drivers/staging/vt6655/datarate.c @@ -200,9 +200,9 @@ RATEvParseMaxRate ( PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pItemExtRates, BOOL bUpdateBasicRate, - PWORD pwMaxBasicRate, - PWORD pwMaxSuppRate, - PWORD pwSuppRate, + unsigned short *pwMaxBasicRate, + unsigned short *pwMaxSuppRate, + unsigned short *pwSuppRate, unsigned char *pbyTopCCKRate, unsigned char *pbyTopOFDMRate ) diff --git a/drivers/staging/vt6655/datarate.h b/drivers/staging/vt6655/datarate.h index 2cb3b50..dc4baed 100644 --- a/drivers/staging/vt6655/datarate.h +++ b/drivers/staging/vt6655/datarate.h @@ -60,9 +60,9 @@ RATEvParseMaxRate( PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pItemExtRates, BOOL bUpdateBasicRate, - PWORD pwMaxBasicRate, - PWORD pwMaxSuppRate, - PWORD pwSuppRate, + unsigned short *pwMaxBasicRate, + unsigned short *pwMaxSuppRate, + unsigned short *pwSuppRate, unsigned char *pbyTopCCKRate, unsigned char *pbyTopOFDMRate ); diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ecc362d..f1af517 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -487,7 +487,7 @@ static void s_vCompleteCurrentMeasure (PSDevice pDevice, BYTE byResult) for(ii=1;ii<8;ii++) { pDevice->dwRPIs[ii] *= 255; - dwDuration |= *((PWORD) (pDevice->pCurrMeasureEID->sReq.abyDuration)); + dwDuration |= *((unsigned short *) (pDevice->pCurrMeasureEID->sReq.abyDuration)); dwDuration <<= 10; pDevice->dwRPIs[ii] /= dwDuration; pDevice->abyRPIs[ii] = (BYTE) pDevice->dwRPIs[ii]; diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index 723f846..98bc255 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -124,7 +124,7 @@ static BOOL s_bHandleRxEncryption( unsigned char *pbyNewRsr, PSKeyItem *pKeyOut, int * pbExtIV, - PWORD pwRxTSC15_0, + unsigned short *pwRxTSC15_0, PDWORD pdwRxTSC47_16 ); @@ -138,7 +138,7 @@ static BOOL s_bHostWepRxEncryption( PSKeyItem pKey, unsigned char *pbyNewRsr, int * pbExtIV, - PWORD pwRxTSC15_0, + unsigned short *pwRxTSC15_0, PDWORD pdwRxTSC47_16 ); @@ -175,7 +175,7 @@ s_vProcessRxMACHeader ( { unsigned char *pbyRxBuffer; unsigned int cbHeaderSize = 0; - PWORD pwType; + unsigned short *pwType; PS802_11Header pMACHeader; int ii; @@ -203,12 +203,12 @@ s_vProcessRxMACHeader ( } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { cbHeaderSize += 6; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (unsigned short *) (pbyRxBufferAddr + cbHeaderSize); if ((*pwType!= TYPE_PKT_IPX) && (*pwType != cpu_to_le16(0xF380))) { } else { cbHeaderSize -= 8; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (unsigned short *) (pbyRxBufferAddr + cbHeaderSize); if (bIsWEP) { if (bExtIV) { *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV @@ -223,7 +223,7 @@ s_vProcessRxMACHeader ( } else { cbHeaderSize -= 2; - pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); + pwType = (unsigned short *) (pbyRxBufferAddr + cbHeaderSize); if (bIsWEP) { if (bExtIV) { *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV @@ -353,7 +353,7 @@ device_receive_frame ( unsigned char *pbyNewRsr; unsigned char *pbyRSSI; PQWORD pqwTSFTime; - PWORD pwFrameSize; + unsigned short *pwFrameSize; unsigned char *pbyFrame; BOOL bDeFragRx = FALSE; BOOL bIsWEP = FALSE; @@ -391,7 +391,7 @@ device_receive_frame ( pDevice->rx_buf_sz, PCI_DMA_FROMDEVICE); #endif //PLICE_DEBUG<- - pwFrameSize = (PWORD)(skb->data + 2); + pwFrameSize = (unsigned short *)(skb->data + 2); FrameSize = cpu_to_le16(pCurrRD->m_rd1RD1.wReqCount) - cpu_to_le16(pCurrRD->m_rd0RD0.wResCount); // Max: 2312Payload + 30HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR @@ -1170,7 +1170,7 @@ static BOOL s_bHandleRxEncryption ( unsigned char *pbyNewRsr, PSKeyItem *pKeyOut, int * pbExtIV, - PWORD pwRxTSC15_0, + unsigned short *pwRxTSC15_0, PDWORD pdwRxTSC47_16 ) { @@ -1186,8 +1186,8 @@ static BOOL s_bHandleRxEncryption ( *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(*(unsigned short *)pbyFrame) && + WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) { pbyIV += 6; // 6 is 802.11 address4 PayloadLen -= 6; } @@ -1280,7 +1280,7 @@ static BOOL s_bHandleRxEncryption ( 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(*(unsigned short *)pbyIV); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); @@ -1317,7 +1317,7 @@ static BOOL s_bHostWepRxEncryption ( PSKeyItem pKey, unsigned char *pbyNewRsr, int * pbExtIV, - PWORD pwRxTSC15_0, + unsigned short *pwRxTSC15_0, PDWORD pdwRxTSC47_16 ) { @@ -1333,8 +1333,8 @@ static BOOL s_bHostWepRxEncryption ( *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(*(unsigned short *)pbyFrame) && + WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) { pbyIV += 6; // 6 is 802.11 address4 PayloadLen -= 6; } @@ -1391,7 +1391,7 @@ static BOOL s_bHostWepRxEncryption ( 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(*(unsigned short *)pbyIV); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 32725da..f3051b1 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -745,11 +745,11 @@ s_uFillDataHead ( PSTxDataHead_g pBuf = (PSTxDataHead_g)pTxDataHead; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); BBvCaculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get Duration and TimeStamp @@ -771,11 +771,11 @@ s_uFillDataHead ( PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); BBvCaculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get Duration and TimeStamp @@ -800,7 +800,7 @@ s_uFillDataHead ( PSTxDataHead_a_FB pBuf = (PSTxDataHead_a_FB)pTxDataHead; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff @@ -817,7 +817,7 @@ s_uFillDataHead ( PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff @@ -835,7 +835,7 @@ s_uFillDataHead ( PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff @@ -883,11 +883,11 @@ s_vFillRTSHead ( PSRTS_g pBuf = (PSRTS_g)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration @@ -916,11 +916,11 @@ s_vFillRTSHead ( PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); @@ -958,7 +958,7 @@ s_vFillRTSHead ( PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -987,7 +987,7 @@ s_vFillRTSHead ( PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -1017,7 +1017,7 @@ s_vFillRTSHead ( PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration @@ -1077,7 +1077,7 @@ s_vFillCTSHead ( PSCTS_FB pBuf = (PSCTS_FB)pvCTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); @@ -1104,7 +1104,7 @@ s_vFillCTSHead ( PSCTS pBuf = (PSCTS)pvCTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, - (PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) + (unsigned short *)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get CTSDuration_ba @@ -2703,7 +2703,7 @@ CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { } BBvCaculateParameter(pDevice, cbFrameSize, wCurrentRate, byPktType, - (PWORD)&(wLen), (unsigned char *)&(pTxDataHead->byServiceField), (unsigned char *)&(pTxDataHead->bySignalField) + (unsigned short *)&(wLen), (unsigned char *)&(pTxDataHead->byServiceField), (unsigned char *)&(pTxDataHead->bySignalField) ); pTxDataHead->wTransmitLength = cpu_to_le16(wLen); //Get TimeStampOff diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h index cc1c0e4..397dd10 100644 --- a/drivers/staging/vt6655/ttype.h +++ b/drivers/staging/vt6655/ttype.h @@ -96,8 +96,6 @@ typedef unsigned long DWORD_PTR; // 32-bit // boolean pointer typedef unsigned int * PUINT; -typedef WORD * PWORD; - typedef DWORD * PDWORD; typedef QWORD * PQWORD; diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h index c12d028..ecf683f 100644 --- a/drivers/staging/vt6655/upc.h +++ b/drivers/staging/vt6655/upc.h @@ -82,7 +82,7 @@ #define VNSvInPortW(dwIOAddress, pwData) { \ - volatile WORD* pwAddr = ((PWORD)(dwIOAddress)); \ + volatile WORD* pwAddr = ((unsigned short *)(dwIOAddress)); \ *(pwData) = readw(pwAddr); \ } @@ -99,7 +99,7 @@ #define VNSvOutPortW(dwIOAddress, wData) { \ - volatile WORD* pwAddr = ((PWORD)(dwIOAddress)); \ + volatile WORD* pwAddr = ((unsigned short *)(dwIOAddress)); \ writew((WORD)wData, pwAddr); \ } diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index 88c0ad4..ce60f7c 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -533,7 +533,7 @@ void VNTWIFIvGetTxRate( void *pMgmtHandle, unsigned char *pbyDestAddress, - PWORD pwTxDataRate, + unsigned short *pwTxDataRate, unsigned char *pbyACKRate, unsigned char *pbyCCKBasicRate, unsigned char *pbyOFDMBasicRate diff --git a/drivers/staging/vt6655/vntwifi.h b/drivers/staging/vt6655/vntwifi.h index 6d14161..724cd4c 100644 --- a/drivers/staging/vt6655/vntwifi.h +++ b/drivers/staging/vt6655/vntwifi.h @@ -240,7 +240,7 @@ void VNTWIFIvGetTxRate( void *pMgmtHandle, unsigned char *pbyDestAddress, - PWORD pwTxDataRate, + unsigned short *pwTxDataRate, unsigned char *pbyACKRate, unsigned char *pbyCCKBasicRate, unsigned char *pbyOFDMBasicRate diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index faaf246..45bd5ae 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -1014,7 +1014,7 @@ BOOL bScheduleCommand ( break; /* case WLAN_CMD_DEAUTH: - pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((PWORD)pbyItem0); + pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((unsigned short *)pbyItem0); break; */ diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index 3994ed2..231a3e7 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -3329,11 +3329,11 @@ s_MgrMakeBeacon( // Pairwise Key Cipher Suite sFrame.pRSNWPA->wPKCount = 0; // Auth Key Management Suite - *((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; + *((unsigned short *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; sFrame.pRSNWPA->len +=2; // RSN Capabilites - *((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; + *((unsigned short *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; sFrame.pRSNWPA->len +=2; sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; } @@ -3800,7 +3800,7 @@ s_MgrMakeAssocRequest( (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { unsigned int ii; - PWORD pwPMKID; + unsigned short *pwPMKID; // WPA IE sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -3865,7 +3865,7 @@ s_MgrMakeAssocRequest( 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 = (unsigned short *)pbyRSN; // Point to PMKID count *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { @@ -4056,7 +4056,7 @@ s_MgrMakeReAssocRequest( (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { unsigned int ii; - PWORD pwPMKID; + unsigned short *pwPMKID; /* WPA IE */ sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -4121,7 +4121,7 @@ s_MgrMakeReAssocRequest( 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 = (unsigned short *)pbyRSN; // Point to PMKID count *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index d3b54c5..4f81364 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -211,7 +211,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 = *(unsigned short *)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/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index e77fb08..c4387de 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -164,7 +164,7 @@ WPA2vParseRSN ( } if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2) - pBSSNode->wCSSPKCount = *((PWORD) &(pRSN->abyRSN[4])); + pBSSNode->wCSSPKCount = *((unsigned short *) &(pRSN->abyRSN[4])); j = 0; pbyOUI = &(pRSN->abyRSN[6]); @@ -213,10 +213,10 @@ WPA2vParseRSN ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount); } - m = *((PWORD) &(pRSN->abyRSN[4])); + m = *((unsigned short *) &(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 = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));; j = 0; pbyOUI = &(pRSN->abyRSN[8+4*m]); for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(BYTE)); i++) { @@ -235,10 +235,10 @@ WPA2vParseRSN ( pBSSNode->wAKMSSAuthCount = (WORD)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount); - n = *((PWORD) &(pRSN->abyRSN[6+4*m]));; + n = *((unsigned short *) &(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 = *((unsigned short *) &(pRSN->abyRSN[8+4*m+4*n])); } } //ignore PMKID lists bcs only (Re)Assocrequest has this field @@ -270,7 +270,7 @@ WPA2uSetIEs( PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle; unsigned char *pbyBuffer = NULL; unsigned int ii = 0; - PWORD pwPMKID = NULL; + unsigned short *pwPMKID = NULL; if (pRSNIEs == NULL) { return(0); @@ -342,7 +342,7 @@ WPA2uSetIEs( (pMgmt->bRoaming == TRUE) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID - pwPMKID = (PWORD)(&pRSNIEs->abyRSN[18]); // Point to PMKID count + pwPMKID = (unsigned short *)(&pRSNIEs->abyRSN[18]); // Point to PMKID count *pwPMKID = 0; // Initialize PMKID count pbyBuffer = &pRSNIEs->abyRSN[20]; // Point to PMKID list for (ii = 0; ii < pMgmt->gsPMKIDCache.BSSIDInfoCount; ii++) { -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel