Commit b7fce6ae authored by Simon Schuster's avatar Simon Schuster Committed by Greg Kroah-Hartman

Staging: vt6656: Correct usage of braces

Conforming to the linux coding style guidelines, a single line block
of an if statement does not require curly braces unless another block
of the if cascade requires them. Therefore unnecessary curly braces
are removed by this patch and missing ones are added.
Signed-off-by: default avatarSebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: default avatarSimon Schuster <linux@rationality.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd2251e2
...@@ -104,15 +104,13 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ...@@ -104,15 +104,13 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID); "BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID);
if ((!is_broadcast_ether_addr(pbyDesireBSSID)) && if ((!is_broadcast_ether_addr(pbyDesireBSSID)) &&
(memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0)) { (memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0))
pbyBSSID = pbyDesireBSSID; pbyBSSID = pbyDesireBSSID;
} }
}
if (pbyDesireSSID != NULL) { if (pbyDesireSSID != NULL) {
if (((PWLAN_IE_SSID) pbyDesireSSID)->len != 0) { if (((PWLAN_IE_SSID) pbyDesireSSID)->len != 0)
pSSID = (PWLAN_IE_SSID) pbyDesireSSID; pSSID = (PWLAN_IE_SSID) pbyDesireSSID;
} }
}
if ((pbyBSSID != NULL) && (pDevice->bRoaming == false)) { if ((pbyBSSID != NULL) && (pDevice->bRoaming == false)) {
/* match BSSID first */ /* match BSSID first */
...@@ -191,14 +189,13 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ...@@ -191,14 +189,13 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
pCurrBSS->abyBSSID); pCurrBSS->abyBSSID);
jj++; jj++;
if (pSelect == NULL) { if (pSelect == NULL)
pSelect = pCurrBSS; pSelect = pCurrBSS;
/* compare RSSI, select the strongest signal */ /* compare RSSI, select the strongest signal */
} else if (pCurrBSS->uRSSI < pSelect->uRSSI) { else if (pCurrBSS->uRSSI < pSelect->uRSSI)
pSelect = pCurrBSS; pSelect = pCurrBSS;
} }
} }
}
pDevice->bSameBSSMaxNum = jj; pDevice->bSameBSSMaxNum = jj;
...@@ -206,7 +203,9 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ...@@ -206,7 +203,9 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
pSelect->bSelected = true; pSelect->bSelected = true;
if (pDevice->bRoaming == false) { if (pDevice->bRoaming == false) {
/* Einsn Add @20070907 */ /* Einsn Add @20070907 */
memcpy(pbyDesireSSID, pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); memcpy(pbyDesireSSID,
pCurrBSS->abySSID,
WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
} }
return pSelect; return pSelect;
...@@ -374,10 +373,9 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, ...@@ -374,10 +373,9 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC)) { (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
/* assoc with BSS */ /* assoc with BSS */
if (pBSSList == pMgmt->pCurrBSS) { if (pBSSList == pMgmt->pCurrBSS)
bParsingQuiet = true; bParsingQuiet = true;
} }
}
WPA_ClearRSN(pBSSList); WPA_ClearRSN(pBSSList);
...@@ -504,11 +502,10 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, ...@@ -504,11 +502,10 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN); memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
memcpy(pBSSList->abySuppRates, pSuppRates, pSuppRates->len + WLAN_IEHDR_LEN); memcpy(pBSSList->abySuppRates, pSuppRates, pSuppRates->len + WLAN_IEHDR_LEN);
if (pExtSuppRates != NULL) { if (pExtSuppRates != NULL)
memcpy(pBSSList->abyExtSuppRates, pExtSuppRates, pExtSuppRates->len + WLAN_IEHDR_LEN); memcpy(pBSSList->abyExtSuppRates, pExtSuppRates, pExtSuppRates->len + WLAN_IEHDR_LEN);
} else { else
memset(pBSSList->abyExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1); memset(pBSSList->abyExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
}
pBSSList->sERP.byERP = psERP->byERP; pBSSList->sERP.byERP = psERP->byERP;
pBSSList->sERP.bERPExist = psERP->bERPExist; pBSSList->sERP.bERPExist = psERP->bERPExist;
...@@ -529,10 +526,9 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, ...@@ -529,10 +526,9 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC)) { (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
/* assoc with BSS */ /* assoc with BSS */
if (pBSSList == pMgmt->pCurrBSS) { if (pBSSList == pMgmt->pCurrBSS)
bParsingQuiet = true; bParsingQuiet = true;
} }
}
WPA_ClearRSN(pBSSList); /* mike update */ WPA_ClearRSN(pBSSList); /* mike update */
...@@ -707,9 +703,8 @@ void BSSvUpdateAPNode(struct vnt_private *pDevice, ...@@ -707,9 +703,8 @@ void BSSvUpdateAPNode(struct vnt_private *pDevice,
memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].bActive = true;
if (pDevice->byBBType == BB_TYPE_11B) { if (pDevice->byBBType == BB_TYPE_11B)
uRateLen = WLAN_RATES_MAXLEN_11B; uRateLen = WLAN_RATES_MAXLEN_11B;
}
pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES) pSuppRates, pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES) pSuppRates,
(PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates,
uRateLen); uRateLen);
...@@ -827,9 +822,10 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -827,9 +822,10 @@ void BSSvSecondCallBack(struct work_struct *work)
PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
} }
} else if (pDevice->bLinkPass == true) } else if (pDevice->bLinkPass == true) {
pDevice->byReAssocCount = 0; pDevice->byReAssocCount = 0;
} }
}
pMgmt->eLastState = pMgmt->eCurrState; pMgmt->eLastState = pMgmt->eCurrState;
...@@ -1119,13 +1115,12 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO) ...@@ -1119,13 +1115,12 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO)
wFIFOCtl = pkt_info[byPktNum].fifo_ctl; wFIFOCtl = pkt_info[byPktNum].fifo_ctl;
pbyDestAddr = pkt_info[byPktNum].dest_addr; pbyDestAddr = pkt_info[byPktNum].dest_addr;
if (wFIFOCtl & FIFOCTL_AUTO_FB_0) { if (wFIFOCtl & FIFOCTL_AUTO_FB_0)
byFallBack = AUTO_FB_0; byFallBack = AUTO_FB_0;
} else if (wFIFOCtl & FIFOCTL_AUTO_FB_1) { else if (wFIFOCtl & FIFOCTL_AUTO_FB_1)
byFallBack = AUTO_FB_1; byFallBack = AUTO_FB_1;
} else { else
byFallBack = AUTO_FB_NONE; byFallBack = AUTO_FB_NONE;
}
/* Only Unicast using support rates */ /* Only Unicast using support rates */
if (wFIFOCtl & FIFOCTL_NEEDACK) { if (wFIFOCtl & FIFOCTL_NEEDACK) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment