Staging: vt6656: code cleanup, fixed 'for' statements
Resolved checkpatch findings, but some long lines warnings. ERROR: space required before the open parenthesis '(' ERROR: spaces required around that Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
afb97d9a26
commit
33d33e42b6
15 changed files with 161 additions and 160 deletions
|
@ -701,8 +701,10 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
|
|||
ldBmSum = 0;
|
||||
for (ii = 0, jj = 0; ii < RSSI_STAT_COUNT; ii++) {
|
||||
if (pBSSList->ldBmAverage[ii] != 0) {
|
||||
pBSSList->ldBmMAX = max(pBSSList->ldBmAverage[ii], ldBm);
|
||||
ldBmSum += pBSSList->ldBmAverage[ii];
|
||||
pBSSList->ldBmMAX =
|
||||
max(pBSSList->ldBmAverage[ii], ldBm);
|
||||
ldBmSum +=
|
||||
pBSSList->ldBmAverage[ii];
|
||||
jj++;
|
||||
}
|
||||
}
|
||||
|
@ -1424,17 +1426,21 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
|
|||
} else if (byFallBack == AUTO_FB_0) {
|
||||
for (ii = 0; ii < byTxRetry; ii++) {
|
||||
if (ii < 5)
|
||||
wFallBackRate = awHWRetry0[wRate-RATE_18M][ii];
|
||||
wFallBackRate =
|
||||
awHWRetry0[wRate-RATE_18M][ii];
|
||||
else
|
||||
wFallBackRate = awHWRetry0[wRate-RATE_18M][4];
|
||||
wFallBackRate =
|
||||
awHWRetry0[wRate-RATE_18M][4];
|
||||
pMgmt->sNodeDBTable[0].uTxFail[wFallBackRate]++;
|
||||
}
|
||||
} else if (byFallBack == AUTO_FB_1) {
|
||||
for (ii = 0; ii < byTxRetry; ii++) {
|
||||
if (ii < 5)
|
||||
wFallBackRate = awHWRetry1[wRate-RATE_18M][ii];
|
||||
wFallBackRate =
|
||||
awHWRetry1[wRate-RATE_18M][ii];
|
||||
else
|
||||
wFallBackRate = awHWRetry1[wRate-RATE_18M][4];
|
||||
wFallBackRate =
|
||||
awHWRetry1[wRate-RATE_18M][4];
|
||||
pMgmt->sNodeDBTable[0].uTxFail[wFallBackRate]++;
|
||||
}
|
||||
}
|
||||
|
@ -1478,9 +1484,11 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
|
|||
} else if (byFallBack == AUTO_FB_0) {
|
||||
for (ii = 0; ii < byTxRetry; ii++) {
|
||||
if (ii < 5)
|
||||
wFallBackRate = awHWRetry0[wRate-RATE_18M][ii];
|
||||
wFallBackRate =
|
||||
awHWRetry0[wRate-RATE_18M][ii];
|
||||
else
|
||||
wFallBackRate = awHWRetry0[wRate-RATE_18M][4];
|
||||
wFallBackRate =
|
||||
awHWRetry0[wRate-RATE_18M][4];
|
||||
pMgmt->sNodeDBTable[uNodeIndex].uTxFail[wFallBackRate]++;
|
||||
}
|
||||
} else if (byFallBack == AUTO_FB_1) {
|
||||
|
|
|
@ -462,7 +462,6 @@ void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType)
|
|||
abyData[16+i*2+1] = abyRsvTime[i];
|
||||
}
|
||||
|
||||
|
||||
CONTROLnsRequestOut(pDevice,
|
||||
MESSAGE_TYPE_WRITE,
|
||||
MAC_REG_RSPINF_B_1,
|
||||
|
|
|
@ -443,9 +443,8 @@ void CHvInitChannelTable(void *pDeviceHandler)
|
|||
BOOL bMultiBand = FALSE;
|
||||
unsigned int ii;
|
||||
|
||||
for(ii=1;ii<=CB_MAX_CHANNEL;ii++) {
|
||||
for (ii = 1; ii <= CB_MAX_CHANNEL; ii++)
|
||||
sChannelTbl[ii].bValid = FALSE;
|
||||
}
|
||||
|
||||
switch (pDevice->byRFType) {
|
||||
case RF_AL2230:
|
||||
|
|
|
@ -760,7 +760,8 @@ RXbBulkInProcessData (
|
|||
pMgmt->pCurrBSS->ldBmAverage[pMgmt->pCurrBSS->byRSSIStatCnt] = ldBm;
|
||||
for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
|
||||
if (pMgmt->pCurrBSS->ldBmAverage[ii] != 0) {
|
||||
pMgmt->pCurrBSS->ldBmMAX = max(pMgmt->pCurrBSS->ldBmAverage[ii], ldBm);
|
||||
pMgmt->pCurrBSS->ldBmMAX =
|
||||
max(pMgmt->pCurrBSS->ldBmAverage[ii], ldBm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1936,12 +1936,12 @@ printk("param->u.wpa_key.key_index =%d\n",param->u.wpa_key.key_index);
|
|||
printk("param->u.wpa_key.key_len =%d\n",param->u.wpa_key.key_len);
|
||||
printk("param->u.wpa_key.key =");
|
||||
for (ii = 0; ii < param->u.wpa_key.key_len; ii++)
|
||||
printk("%02x:",param->u.wpa_key.key[ii]);
|
||||
printk(KERN_DEBUG "%02x:", param->u.wpa_key.key[ii]);
|
||||
printk("\n");
|
||||
printk("param->u.wpa_key.seq_len =%d\n",param->u.wpa_key.seq_len);
|
||||
printk("param->u.wpa_key.seq =");
|
||||
for (ii = 0; ii < param->u.wpa_key.seq_len; ii++)
|
||||
printk("%02x:",param->u.wpa_key.seq[ii]);
|
||||
printk(KERN_DEBUG "%02x:", param->u.wpa_key.seq[ii]);
|
||||
printk("\n");
|
||||
|
||||
printk("...........\n");
|
||||
|
|
|
@ -485,9 +485,9 @@ BOOL KeybRemoveAllKey(
|
|||
if ((pTable->KeyTable[i].bInUse == TRUE) &&
|
||||
IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) {
|
||||
pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
|
||||
for(u=0;u<MAX_GROUP_KEY;u++) {
|
||||
for (u = 0; u < MAX_GROUP_KEY; u++)
|
||||
pTable->KeyTable[i].GroupKey[u].bKeyValid = FALSE;
|
||||
}
|
||||
|
||||
pTable->KeyTable[i].dwGTKeyIndex = 0;
|
||||
s_vCheckKeyTableValid(pDevice, pTable);
|
||||
return (TRUE);
|
||||
|
@ -531,21 +531,15 @@ void KeyvRemoveWEPKey(
|
|||
return;
|
||||
}
|
||||
|
||||
void KeyvRemoveAllWEPKey(
|
||||
void *pDeviceHandler,
|
||||
PSKeyManagement pTable
|
||||
)
|
||||
void KeyvRemoveAllWEPKey(void *pDeviceHandler, PSKeyManagement pTable)
|
||||
{
|
||||
PSDevice pDevice = (PSDevice) pDeviceHandler;
|
||||
|
||||
int i;
|
||||
|
||||
for(i=0;i<MAX_GROUP_KEY;i++) {
|
||||
for (i = 0; i < MAX_GROUP_KEY; i++)
|
||||
KeyvRemoveWEPKey(pDevice, pTable, i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Description: Get Transmit Key from table
|
||||
*
|
||||
|
|
|
@ -111,22 +111,21 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader)
|
|||
* Return Value: index number in Defragment Database
|
||||
*
|
||||
*/
|
||||
|
||||
unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
|
||||
{
|
||||
unsigned int ii;
|
||||
|
||||
for (ii = 0; ii < pDevice->cbDFCB; ii++) {
|
||||
if ((pDevice->sRxDFCB[ii].bInUse == TRUE) &&
|
||||
(IS_ETH_ADDRESS_EQUAL (&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0])))
|
||||
) {
|
||||
//
|
||||
return(ii);
|
||||
(IS_ETH_ADDRESS_EQUAL(&(pDevice->sRxDFCB[ii].abyAddr2[0]),
|
||||
&(pMACHeader->abyAddr2[0])))) {
|
||||
return ii;
|
||||
}
|
||||
}
|
||||
return(pDevice->cbDFCB);
|
||||
return pDevice->cbDFCB;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* Insert received fragment packet in Defragment Database
|
||||
|
|
|
@ -353,9 +353,9 @@ void vMgrObjectInit(void *hDeviceContext)
|
|||
pMgmt->pbyPSPacketPool = &pMgmt->byPSPacketPool[0];
|
||||
pMgmt->pbyMgmtPacketPool = &pMgmt->byMgmtPacketPool[0];
|
||||
pMgmt->uCurrChannel = pDevice->uChannel;
|
||||
for(ii=0;ii<WLAN_BSSID_LEN;ii++) {
|
||||
for (ii = 0; ii < WLAN_BSSID_LEN; ii++)
|
||||
pMgmt->abyDesireBSSID[ii] = 0xFF;
|
||||
}
|
||||
|
||||
pMgmt->sAssocInfo.AssocInfo.Length = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||
//memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN +1);
|
||||
pMgmt->byCSSPK = KEY_CTL_NONE;
|
||||
|
@ -4795,18 +4795,18 @@ s_bCipherMatch (
|
|||
byMulticastCipher = KEY_CTL_INVALID;
|
||||
}
|
||||
|
||||
// check Pairwise Key Cipher
|
||||
/* check Pairwise Key Cipher */
|
||||
for (i = 0; i < pBSSNode->wCSSPKCount; i++) {
|
||||
if ((pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_WEP40) ||
|
||||
(pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_WEP104)) {
|
||||
// this should not happen as defined 802.11i
|
||||
/* this should not happen as defined 802.11i */
|
||||
byCipherMask |= 0x01;
|
||||
} else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_TKIP) {
|
||||
byCipherMask |= 0x02;
|
||||
} else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_CCMP) {
|
||||
byCipherMask |= 0x04;
|
||||
} else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_USE_GROUP) {
|
||||
// use group key only ignore all others
|
||||
/* use group key only ignore all others */
|
||||
byCipherMask = 0;
|
||||
i = pBSSNode->wCSSPKCount;
|
||||
}
|
||||
|
@ -4828,14 +4828,14 @@ s_bCipherMatch (
|
|||
byMulticastCipher = KEY_CTL_INVALID;
|
||||
}
|
||||
|
||||
// check Pairwise Key Cipher
|
||||
/* check Pairwise Key Cipher */
|
||||
for (i = 0; i < pBSSNode->wPKCount; i++) {
|
||||
if (pBSSNode->abyPKType[i] == WPA_TKIP) {
|
||||
byCipherMask |= 0x02;
|
||||
} else if (pBSSNode->abyPKType[i] == WPA_AESCCMP) {
|
||||
byCipherMask |= 0x04;
|
||||
} else if (pBSSNode->abyPKType[i] == WPA_NONE) {
|
||||
// use group key only ignore all others
|
||||
/* use group key only ignore all others */
|
||||
byCipherMask = 0;
|
||||
i = pBSSNode->wPKCount;
|
||||
}
|
||||
|
|
|
@ -148,7 +148,8 @@ 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(BYTE)); 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;
|
||||
|
@ -180,7 +181,8 @@ 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(BYTE)); 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;
|
||||
|
|
|
@ -186,7 +186,6 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
|
|||
return wpa_release_wpadev(pDevice);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* Set WPA algorithm & keys
|
||||
|
|
Loading…
Reference in a new issue