diff options
author | Guido MartÃnez <guido@vanguardiasur.com.ar> | 2014-04-19 16:45:00 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-15 13:26:37 -0700 |
commit | bc5cf6563576bb36baa7e93417b9a2e29999a5c6 (patch) | |
tree | da9dc6ca3942286a8ea23ab62e7061df89bc6a78 /drivers/staging/vt6655/wpa2.c | |
parent | 4e8a7e5fc29697f881f5c358f84df52914908703 (diff) |
staging: vt6655: fix checkpatch bracing issues
This patchs fixes tons of warnings such as:
WARNING: braces {} are not necessary for single statement blocks
#354: FILE: drivers/staging/vt6655/wmgr.c:354:
+ for (ii = 0; ii < WLAN_BSSID_LEN; ii++) {
+ pMgmt->abyDesireBSSID[ii] = 0xFF;
+ }
Please note: this patch only fixes bracing issues (and there is still a
lot to do); so if you run checkpatch it _will_ throw a lot of errors.
Use --test-only=braces
Signed-off-by: Guido MartÃnez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/wpa2.c')
-rw-r--r-- | drivers/staging/vt6655/wpa2.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index f5be587f78d2..4e1b63be380f 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -121,9 +121,9 @@ WPA2vParseRSN( WPA2_ClearRSN(pBSSNode); if (pRSN->len == 2) { // ver(2) - if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { + if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) pBSSNode->bWPA2Valid = true; - } + return; } @@ -267,9 +267,9 @@ WPA2uSetIEs( unsigned int ii = 0; unsigned short *pwPMKID = NULL; - if (pRSNIEs == NULL) { + if (pRSNIEs == NULL) return 0; - } + if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { @@ -282,15 +282,14 @@ WPA2uSetIEs( pRSNIEs->abyRSN[0] = 0x00; pRSNIEs->abyRSN[1] = 0x0F; pRSNIEs->abyRSN[2] = 0xAC; - if (pMgmt->byCSSGK == KEY_CTL_WEP) { + if (pMgmt->byCSSGK == KEY_CTL_WEP) pRSNIEs->abyRSN[3] = pMgmt->pCurrBSS->byCSSGK; - } else if (pMgmt->byCSSGK == KEY_CTL_TKIP) { + else if (pMgmt->byCSSGK == KEY_CTL_TKIP) pRSNIEs->abyRSN[3] = WLAN_11i_CSS_TKIP; - } else if (pMgmt->byCSSGK == KEY_CTL_CCMP) { + else if (pMgmt->byCSSGK == KEY_CTL_CCMP) pRSNIEs->abyRSN[3] = WLAN_11i_CSS_CCMP; - } else { + else pRSNIEs->abyRSN[3] = WLAN_11i_CSS_UNKNOWN; - } // Pairwise Key Cipher Suite pRSNIEs->abyRSN[4] = 1; @@ -298,15 +297,15 @@ WPA2uSetIEs( pRSNIEs->abyRSN[6] = 0x00; pRSNIEs->abyRSN[7] = 0x0F; pRSNIEs->abyRSN[8] = 0xAC; - if (pMgmt->byCSSPK == KEY_CTL_TKIP) { + if (pMgmt->byCSSPK == KEY_CTL_TKIP) pRSNIEs->abyRSN[9] = WLAN_11i_CSS_TKIP; - } else if (pMgmt->byCSSPK == KEY_CTL_CCMP) { + else if (pMgmt->byCSSPK == KEY_CTL_CCMP) pRSNIEs->abyRSN[9] = WLAN_11i_CSS_CCMP; - } else if (pMgmt->byCSSPK == KEY_CTL_NONE) { + else if (pMgmt->byCSSPK == KEY_CTL_NONE) pRSNIEs->abyRSN[9] = WLAN_11i_CSS_USE_GROUP; - } else { + else pRSNIEs->abyRSN[9] = WLAN_11i_CSS_UNKNOWN; - } + pRSNIEs->len += 6; // Auth Key Management Suite @@ -315,13 +314,13 @@ WPA2uSetIEs( pRSNIEs->abyRSN[12] = 0x00; pRSNIEs->abyRSN[13] = 0x0F; pRSNIEs->abyRSN[14] = 0xAC; - if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK) { + if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK) pRSNIEs->abyRSN[15] = WLAN_11i_AKMSS_PSK; - } else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) { + else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) pRSNIEs->abyRSN[15] = WLAN_11i_AKMSS_802_1X; - } else { + else pRSNIEs->abyRSN[15] = WLAN_11i_AKMSS_UNKNOWN; - } + pRSNIEs->len += 6; // RSN Capabilities @@ -347,11 +346,10 @@ WPA2uSetIEs( pbyBuffer += 16; } } - if (*pwPMKID != 0) { + if (*pwPMKID != 0) pRSNIEs->len += (2 + (*pwPMKID)*16); - } else { + else pbyBuffer = &pRSNIEs->abyRSN[18]; - } } return pRSNIEs->len + WLAN_IEHDR_LEN; } |