Skip to content

Commit

Permalink
Staging: vt6655: remove WORD typedef
Browse files Browse the repository at this point in the history
Replace all occurrences with unsigned short type.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Charles Clément authored and Greg Kroah-Hartman committed Jun 24, 2010
1 parent 0f4c60d commit 2986db5
Show file tree
Hide file tree
Showing 44 changed files with 589 additions and 590 deletions.
94 changes: 47 additions & 47 deletions drivers/staging/vt6655/80211hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,21 @@
#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) & (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_PRVER(n) ((((unsigned short)(n) >> 8) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((unsigned short)(n) >> 8) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((unsigned short)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((unsigned short)(n) << 8) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((unsigned short)(n) << 8) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((unsigned short)(n) << 8) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((unsigned short)(n) << 8) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((unsigned short)(n) << 8) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((unsigned short)(n) << 8) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((unsigned short)(n) << 8) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((unsigned short)(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) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
#define WLAN_GET_SEQ_FRGNUM(n) (((unsigned short)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((unsigned short)(n) >> 8) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)


/* Capability Field bit */
Expand All @@ -196,22 +196,22 @@
#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) (((unsigned short)(n)) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((unsigned short)(n)) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((unsigned short)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((unsigned short)(n)) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((unsigned short)(n)) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((unsigned short)(n)) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((unsigned short)(n)) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((unsigned short)(n)) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((unsigned short)(n)) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((unsigned short)(n)) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((unsigned short)(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) (((unsigned short)(n)) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((unsigned short)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)


/* Capability Field bit */
Expand Down Expand Up @@ -246,20 +246,20 @@
#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_FC_PRVER(n) ((unsigned short)(n))
#define WLAN_SET_FC_FTYPE(n) (((unsigned short)(n)) << 2)
#define WLAN_SET_FC_FSTYPE(n) (((unsigned short)(n)) << 4)
#define WLAN_SET_FC_TODS(n) (((unsigned short)(n)) << 8)
#define WLAN_SET_FC_FROMDS(n) (((unsigned short)(n)) << 9)
#define WLAN_SET_FC_MOREFRAG(n) (((unsigned short)(n)) << 10)
#define WLAN_SET_FC_RETRY(n) (((unsigned short)(n)) << 11)
#define WLAN_SET_FC_PWRMGT(n) (((unsigned short)(n)) << 12)
#define WLAN_SET_FC_MOREDATA(n) (((unsigned short)(n)) << 13)
#define WLAN_SET_FC_ISWEP(n) (((unsigned short)(n)) << 14)
#define WLAN_SET_FC_ORDER(n) (((unsigned short)(n)) << 15)

#define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n))
#define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4)
#define WLAN_SET_SEQ_FRGNUM(n) ((unsigned short)(n))
#define WLAN_SET_SEQ_SEQNUM(n) (((unsigned short)(n)) << 4)

/* ERP Field bit */

Expand Down Expand Up @@ -297,8 +297,8 @@ typedef struct {

typedef struct tagWLAN_80211HDR_A2 {

WORD wFrameCtl;
WORD wDurationID;
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];

Expand All @@ -307,24 +307,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;

typedef struct tagWLAN_80211HDR_A3 {

WORD wFrameCtl;
WORD wDurationID;
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl;
unsigned short wSeqCtl;

}__attribute__ ((__packed__))
WLAN_80211HDR_A3, *PWLAN_80211HDR_A3;

typedef struct tagWLAN_80211HDR_A4 {

WORD wFrameCtl;
WORD wDurationID;
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl;
unsigned short wSeqCtl;
BYTE abyAddr4[WLAN_ADDR_LEN];

} __attribute__ ((__packed__))
Expand Down
16 changes: 8 additions & 8 deletions drivers/staging/vt6655/80211mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
typedef struct _WLAN_IE_FH_PARMS {
BYTE byElementID;
BYTE len;
WORD wDwellTime;
unsigned short wDwellTime;
BYTE byHopSet;
BYTE byHopPattern;
BYTE byHopIndex;
Expand All @@ -285,8 +285,8 @@ typedef struct tagWLAN_IE_CF_PARMS {
BYTE len;
BYTE byCFPCount;
BYTE byCFPPeriod;
WORD wCFPMaxDuration;
WORD wCFPDurRemaining;
unsigned short wCFPMaxDuration;
unsigned short wCFPDurRemaining;
}__attribute__ ((__packed__))
WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;

Expand All @@ -309,7 +309,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM;
typedef struct tagWLAN_IE_IBSS_PARMS {
BYTE byElementID;
BYTE len;
WORD wATIMWindow;
unsigned short wATIMWindow;
}__attribute__ ((__packed__))
WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;

Expand All @@ -329,9 +329,9 @@ typedef struct tagWLAN_IE_RSN_EXT {
BYTE byElementID;
BYTE len;
BYTE abyOUI[4];
WORD wVersion;
unsigned short wVersion;
BYTE abyMulticast[4];
WORD wPKCount;
unsigned short wPKCount;
struct {
BYTE abyOUI[4];
} PKSList[1]; // the rest is variable so need to
Expand All @@ -340,7 +340,7 @@ typedef struct tagWLAN_IE_RSN_EXT {

#pragma pack(1)
typedef struct tagWLAN_IE_RSN_AUTH {
WORD wAuthCount;
unsigned short wAuthCount;
struct {
BYTE abyOUI[4];
} AuthKSList[1];
Expand All @@ -351,7 +351,7 @@ typedef struct tagWLAN_IE_RSN_AUTH {
typedef struct tagWLAN_IE_RSN {
BYTE byElementID;
BYTE len;
WORD wVersion;
unsigned short wVersion;
BYTE abyRSN[WLAN_MIN_ARRAY];
} WLAN_IE_RSN, *PWLAN_IE_RSN;

Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/vt6655/aes_ccmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ BYTE abyRoundKey[16];
* Return Value: MIC compare result
*
*/
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize)
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize)
{
BYTE abyNonce[13];
BYTE MIC_IV[16];
Expand All @@ -258,11 +258,11 @@ BYTE abyLastCipher[16];
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
unsigned char *pbyIV;
unsigned char *pbyPayload;
WORD wHLen = 22;
WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
unsigned short wHLen = 22;
unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
BOOL bA4 = FALSE;
BYTE byTmp;
WORD wCnt;
unsigned short wCnt;
int ii,jj,kk;


Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/vt6655/aes_ccmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
/*--------------------- Export Variables --------------------------*/

/*--------------------- Export Functions --------------------------*/
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize);
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize);

#endif //__AES_H__
14 changes: 7 additions & 7 deletions drivers/staging/vt6655/baseband.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ BYTE byVT3253B0_AGC[CB_VT3253B0_AGC][2] = {
{0xF0, 0x00},
};

const WORD awcFrameTime[MAX_RATE] =
const unsigned short awcFrameTime[MAX_RATE] =
{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};


Expand Down Expand Up @@ -1781,7 +1781,7 @@ BBuGetFrameTime (
BYTE byPreambleType,
BYTE byPktType,
unsigned int cbFrameLength,
WORD wRate
unsigned short wRate
)
{
unsigned int uFrameTime;
Expand Down Expand Up @@ -1847,7 +1847,7 @@ void
BBvCaculateParameter (
PSDevice pDevice,
unsigned int cbFrameLength,
WORD wRate,
unsigned short wRate,
BYTE byPacketType,
unsigned short *pwPhyLen,
unsigned char *pbyPhySrv,
Expand Down Expand Up @@ -1994,11 +1994,11 @@ BBvCaculateParameter (
*pbyPhySrv = 0x00;
if (bExtBit)
*pbyPhySrv = *pbyPhySrv | 0x80;
*pwPhyLen = (WORD)cbUsCount;
*pwPhyLen = (unsigned short)cbUsCount;
}
else {
*pbyPhySrv = 0x00;
*pwPhyLen = (WORD)cbFrameLength;
*pwPhyLen = (unsigned short)cbFrameLength;
}
}

Expand All @@ -2017,7 +2017,7 @@ BBvCaculateParameter (
*/
BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyData)
{
WORD ww;
unsigned short ww;
BYTE byValue;

// BB reg offset
Expand Down Expand Up @@ -2060,7 +2060,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyDa
*/
BOOL BBbWriteEmbeded (unsigned long dwIoBase, BYTE byBBAddr, BYTE byData)
{
WORD ww;
unsigned short ww;
BYTE byValue;

// BB reg offset
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/vt6655/baseband.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ BBuGetFrameTime(
BYTE byPreambleType,
BYTE byPktType,
unsigned int cbFrameLength,
WORD wRate
unsigned short wRate
);

void
BBvCaculateParameter (
PSDevice pDevice,
unsigned int cbFrameLength,
WORD wRate,
unsigned short wRate,
BYTE byPacketType,
unsigned short *pwPhyLen,
unsigned char *pbyPhySrv,
Expand Down
16 changes: 8 additions & 8 deletions drivers/staging/vt6655/bssdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ static int msglevel =MSG_LEVEL_INFO;



const WORD awHWRetry0[5][5] = {
const unsigned short 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 unsigned short 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},
Expand Down Expand Up @@ -372,8 +372,8 @@ BSSbInsertToBSSList (
void *hDeviceContext,
unsigned char *abyBSSIDAddr,
QWORD qwTimestamp,
WORD wBeaconInterval,
WORD wCapInfo,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates,
Expand Down Expand Up @@ -587,8 +587,8 @@ BOOL
BSSbUpdateToBSSList (
void *hDeviceContext,
QWORD qwTimestamp,
WORD wBeaconInterval,
WORD wCapInfo,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
BOOL bChannelHit,
PWLAN_IE_SSID pSSID,
Expand Down Expand Up @@ -1402,8 +1402,8 @@ BSSvUpdateNodeTxCounter(
BYTE byTxRetry = (byTsr0 & TSR0_NCR);
PSTxBufHead pTxBufHead;
PS802_11Header pMACHeader;
WORD wRate;
WORD wFallBackRate = RATE_1M;
unsigned short wRate;
unsigned short wFallBackRate = RATE_1M;
BYTE byFallBack;
unsigned int ii;
// unsigned int txRetryTemp;
Expand Down
Loading

0 comments on commit 2986db5

Please sign in to comment.