diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-07-23 15:03:11 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-07-23 15:03:11 +1000 |
commit | fa49686c1e78e51bb7e443029afe604bd2ddf49e (patch) | |
tree | edaf2b53170f723e8baecba45073ab03ec796804 /drivers/staging/vt6655/wpa.c | |
parent | 9f28e837bf1a78db2497b61cb2e78f39be2fe2b3 (diff) | |
parent | 83c720ea395c4ee725e1035cbcda809794b46091 (diff) |
Merge remote branch 'staging-next/staging-next'
Conflicts:
drivers/staging/batman-adv/bat_sysfs.c
drivers/staging/batman-adv/device.c
drivers/staging/batman-adv/hard-interface.c
drivers/staging/cx25821/cx25821-audups11.c
Diffstat (limited to 'drivers/staging/vt6655/wpa.c')
-rw-r--r-- | drivers/staging/vt6655/wpa.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index da5c814e200e..5ac468881636 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -45,12 +45,12 @@ /*--------------------- Static Variables --------------------------*/ static int msglevel =MSG_LEVEL_INFO; -const BYTE abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 }; -const BYTE abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 }; -const BYTE abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 }; -const BYTE abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 }; -const BYTE abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 }; -const BYTE abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 }; +const unsigned char abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 }; +const unsigned char abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 }; +const unsigned char abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 }; +const unsigned char abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 }; +const unsigned char abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 }; +const unsigned char abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 }; /*+ @@ -112,7 +112,7 @@ WPA_ParseRSN ( { PWLAN_IE_RSN_AUTH pIE_RSN_Auth = NULL; int i, j, m, n = 0; - PBYTE pbyCaps; + unsigned char *pbyCaps; WPA_ClearRSN(pBSSList); @@ -148,7 +148,7 @@ WPA_ParseRSN ( { j = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %zu\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType)); - for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(BYTE)); i++) { + for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(unsigned char)); i++) { if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i) if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI00, 4)) pBSSList->abyPKType[j++] = WPA_NONE; @@ -166,7 +166,7 @@ WPA_ParseRSN ( break; //DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1])); } //for - pBSSList->wPKCount = (WORD)j; + pBSSList->wPKCount = (unsigned short)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount); } @@ -180,7 +180,7 @@ WPA_ParseRSN ( j = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %zu\n", pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType)); - for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(BYTE)); i++) { + for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(unsigned char)); i++) { if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i) if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI01, 4)) pBSSList->abyAuthType[j++] = WPA_AUTH_IEEE802_1X; @@ -195,7 +195,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 = (unsigned short)j; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount); } @@ -207,11 +207,11 @@ WPA_ParseRSN ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4); if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2) - pbyCaps = (PBYTE)pIE_RSN_Auth->AuthKSList[n].abyOUI; + pbyCaps = (unsigned char *)pIE_RSN_Auth->AuthKSList[n].abyOUI; pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); pBSSList->sRSNCapObj.bRSNCapExist = TRUE; - 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)); @@ -239,13 +239,13 @@ WPA_ParseRSN ( -*/ BOOL WPA_SearchRSN ( - BYTE byCmd, - BYTE byEncrypt, + unsigned char byCmd, + unsigned char byEncrypt, PKnownBSS pBSSList ) { int ii; - BYTE byPKType = WPA_NONE; + unsigned char byPKType = WPA_NONE; if (pBSSList->bWPAValid == FALSE) return FALSE; |