aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/key.c
diff options
context:
space:
mode:
authorAndres More <more.andres@gmail.com>2010-06-23 19:38:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-24 17:15:07 -0400
commit4722a26cc61983295ad8e7a552999ec847aa0abd (patch)
tree519b6298e21e44e73c66aca5bd83466c688965a8 /drivers/staging/vt6656/key.c
parentcbf05091e53de6a879d16fcdb88ed9ab26295448 (diff)
staging: vt6656: replace IS_ETH_ADDRESS_EQUAL with compare_ether_addr
Code cleanup, removed custom macro to compare Ethernet addresses. Some checkpatch warnings on indentation were not resolved. The return value of compare_ether_addr was reversed, something to consider. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6656/key.c')
-rw-r--r--drivers/staging/vt6656/key.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index 24745dbe566..d181a2f6626 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -174,7 +174,7 @@ BOOL KeybGetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex,
174 *pKey = NULL; 174 *pKey = NULL;
175 for (i=0;i<MAX_KEY_TABLE;i++) { 175 for (i=0;i<MAX_KEY_TABLE;i++) {
176 if ((pTable->KeyTable[i].bInUse == TRUE) && 176 if ((pTable->KeyTable[i].bInUse == TRUE) &&
177 IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) { 177 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
178 if (dwKeyIndex == 0xFFFFFFFF) { 178 if (dwKeyIndex == 0xFFFFFFFF) {
179 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { 179 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) {
180 *pKey = &(pTable->KeyTable[i].PairwiseKey); 180 *pKey = &(pTable->KeyTable[i].PairwiseKey);
@@ -245,7 +245,7 @@ BOOL KeybSetKey(
245 j = i; 245 j = i;
246 } 246 }
247 if ((pTable->KeyTable[i].bInUse == TRUE) && 247 if ((pTable->KeyTable[i].bInUse == TRUE) &&
248 IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) { 248 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
249 // found table already exist 249 // found table already exist
250 if ((dwKeyIndex & PAIRWISE_KEY) != 0) { 250 if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
251 // Pairwise key 251 // Pairwise key
@@ -427,7 +427,7 @@ BOOL KeybRemoveKey(
427 } else { 427 } else {
428 for (i=0;i<MAX_KEY_TABLE;i++) { 428 for (i=0;i<MAX_KEY_TABLE;i++) {
429 if ( (pTable->KeyTable[i].bInUse == TRUE) && 429 if ( (pTable->KeyTable[i].bInUse == TRUE) &&
430 IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) { 430 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
431 431
432 if ((dwKeyIndex & PAIRWISE_KEY) != 0) { 432 if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
433 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; 433 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
@@ -483,7 +483,7 @@ BOOL KeybRemoveAllKey(
483 483
484 for (i=0;i<MAX_KEY_TABLE;i++) { 484 for (i=0;i<MAX_KEY_TABLE;i++) {
485 if ((pTable->KeyTable[i].bInUse == TRUE) && 485 if ((pTable->KeyTable[i].bInUse == TRUE) &&
486 IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) { 486 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
487 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; 487 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
488 for (u = 0; u < MAX_GROUP_KEY; u++) 488 for (u = 0; u < MAX_GROUP_KEY; u++)
489 pTable->KeyTable[i].GroupKey[u].bKeyValid = FALSE; 489 pTable->KeyTable[i].GroupKey[u].bKeyValid = FALSE;
@@ -561,7 +561,7 @@ BOOL KeybGetTransmitKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyType,
561 *pKey = NULL; 561 *pKey = NULL;
562 for (i=0;i<MAX_KEY_TABLE;i++) { 562 for (i=0;i<MAX_KEY_TABLE;i++) {
563 if ((pTable->KeyTable[i].bInUse == TRUE) && 563 if ((pTable->KeyTable[i].bInUse == TRUE) &&
564 IS_ETH_ADDRESS_EQUAL(pTable->KeyTable[i].abyBSSID,pbyBSSID)) { 564 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
565 565
566 if (dwKeyType == PAIRWISE_KEY) { 566 if (dwKeyType == PAIRWISE_KEY) {
567 567