summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/key.c
diff options
context:
space:
mode:
authorGuido Martínez <guido@vanguardiasur.com.ar>2014-04-19 16:45:00 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-15 13:26:37 -0700
commitbc5cf6563576bb36baa7e93417b9a2e29999a5c6 (patch)
treeda9dc6ca3942286a8ea23ab62e7061df89bc6a78 /drivers/staging/vt6655/key.c
parent4e8a7e5fc29697f881f5c358f84df52914908703 (diff)
downloadop-kernel-dev-bc5cf6563576bb36baa7e93417b9a2e29999a5c6.zip
op-kernel-dev-bc5cf6563576bb36baa7e93417b9a2e29999a5c6.tar.gz
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/key.c')
-rw-r--r--drivers/staging/vt6655/key.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
index 54de7d0..09a8bf5 100644
--- a/drivers/staging/vt6655/key.c
+++ b/drivers/staging/vt6655/key.c
@@ -255,9 +255,9 @@ bool KeybSetKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybSetKey(R): \n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->bKeyValid: %d\n ", pKey->bKeyValid);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->abyKey: ");
- for (ii = 0; ii < pKey->uKeyLength; ii++) {
+ for (ii = 0; ii < pKey->uKeyLength; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16);
@@ -319,9 +319,9 @@ bool KeybSetKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->bKeyValid: %d\n ", pKey->bKeyValid);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->abyKey: ");
- for (ii = 0; ii < pKey->uKeyLength; ii++) {
+ for (ii = 0; ii < pKey->uKeyLength; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16);
@@ -359,9 +359,9 @@ bool KeybRemoveKey(
if (is_broadcast_ether_addr(pbyBSSID)) {
// delete all keys
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
- for (i = 0; i < MAX_KEY_TABLE; i++) {
+ for (i = 0; i < MAX_KEY_TABLE; i++)
pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
- }
+
s_vCheckKeyTableValid(pTable, dwIoBase);
return true;
} else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
@@ -427,9 +427,9 @@ bool KeybRemoveAllKey(
if (pTable->KeyTable[i].bInUse &&
ether_addr_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(pTable, dwIoBase);
return true;
@@ -478,9 +478,8 @@ void KeyvRemoveAllWEPKey(
{
int i;
- for (i = 0; i < MAX_GROUP_KEY; i++) {
+ for (i = 0; i < MAX_GROUP_KEY; i++)
KeyvRemoveWEPKey(pTable, i, dwIoBase);
- }
}
/*
@@ -515,9 +514,9 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybGetTransmitKey:");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PAIRWISE_KEY: KeyTable.abyBSSID: ");
- for (ii = 0; ii < 6; ii++) {
+ for (ii = 0; ii < 6; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%x ", pTable->KeyTable[i].abyBSSID[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
return true;
@@ -536,9 +535,9 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybGetTransmitKey:");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP_KEY: KeyTable.abyBSSID\n");
- for (ii = 0; ii < 6; ii++) {
+ for (ii = 0; ii < 6; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%x ", pTable->KeyTable[i].abyBSSID[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
@@ -551,9 +550,9 @@ bool KeybGetTransmitKey(
} // BSSID match
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ERROR: NO Match BSSID !!! ");
- for (ii = 0; ii < 6; ii++) {
+ for (ii = 0; ii < 6; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", *(pbyBSSID+ii));
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
return false;
}
@@ -621,11 +620,10 @@ bool KeybSetDefaultKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enter KeybSetDefaultKey: %1x, %d \n", (int)dwKeyIndex, (int)uKeyLength);
- if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
+ if ((dwKeyIndex & PAIRWISE_KEY) != 0) // Pairwise key
return false;
- } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
+ else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
return false;
- }
if (uKeyLength > MAX_KEY_LEN)
return false;
@@ -683,9 +681,9 @@ bool KeybSetDefaultKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->bKeyValid: %d\n", pKey->bKeyValid);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->uKeyLength: %d\n", (int)pKey->uKeyLength);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->abyKey: \n");
- for (ii = 0; ii < pKey->uKeyLength; ii++) {
+ for (ii = 0; ii < pKey->uKeyLength; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%x", pKey->abyKey[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwTSC47_16: %lx\n", pKey->dwTSC47_16);
@@ -729,11 +727,10 @@ bool KeybSetAllGroupKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex);
- if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
+ if ((dwKeyIndex & PAIRWISE_KEY) != 0) // Pairwise key
return false;
- } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
+ else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
return false;
- }
for (i = 0; i < MAX_KEY_TABLE - 1; i++) {
if (pTable->KeyTable[i].bInUse) {
@@ -779,9 +776,9 @@ bool KeybSetAllGroupKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->bKeyValid: %d\n ", pKey->bKeyValid);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->abyKey: ");
- for (ii = 0; ii < pKey->uKeyLength; ii++) {
+ for (ii = 0; ii < pKey->uKeyLength; ii++)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]);
- }
+
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
} // (pTable->KeyTable[i].bInUse == true)
OpenPOWER on IntegriCloud