]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: vt6656: replaced IS_BROADCAST_ADDRESS with is_broadcast_ether_addr
authorAndres More <more.andres@gmail.com>
Wed, 23 Jun 2010 00:57:42 +0000 (21:57 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Jun 2010 22:20:21 +0000 (15:20 -0700)
Replaced and removed the custom definition.
Minor checkpatch warnings on long lines and indentation were not cleared.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/iwctl.c
drivers/staging/vt6656/key.c
drivers/staging/vt6656/rxtx.c
drivers/staging/vt6656/tether.h
drivers/staging/vt6656/wpactl.c

index 57271f1a0eeec07071da8b9acb65d04927223ec4..e8f98f1966dbab76f786dfafe4d0b43d32a18b01 100644 (file)
@@ -135,7 +135,7 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext,
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n",
                             *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2),
                             *(pbyDesireBSSID+3),*(pbyDesireBSSID+4),*(pbyDesireBSSID+5));
-        if ((!IS_BROADCAST_ADDRESS(pbyDesireBSSID)) &&
+       if ((!is_broadcast_ether_addr(pbyDesireBSSID)) &&
             (memcmp(pbyDesireBSSID, ZeroBSSID, 6)!= 0)){
             pbyBSSID = pbyDesireBSSID;
         }
index dd4648d1de9ac776f8101e0f384fc9dd7633326d..79ed88298c5cae1e619c18eb73590147aedc98fa 100644 (file)
@@ -460,7 +460,7 @@ RXbBulkInProcessData (
        }
     }
 
-    if (!IS_MULTICAST_ADDRESS(pMACHeader->abyAddr1) && !IS_BROADCAST_ADDRESS(pMACHeader->abyAddr1)) {
+    if (!is_multicast_ether_addr(pMACHeader->abyAddr1) && !is_broadcast_ether_addr(pMACHeader->abyAddr1)) {
         if ( WCTLbIsDuplicate(&(pDevice->sDupRxCache), (PS802_11Header) pbyFrame) ) {
             pDevice->s802_11Counter.FrameDuplicateCount++;
             return FALSE;
@@ -1449,7 +1449,7 @@ static BOOL s_bAPModeRxData (
     if (FrameSize > CB_MAX_BUF_SIZE)
         return FALSE;
     // check DA
-    if(IS_MULTICAST_ADDRESS((PBYTE)(skb->data+cbHeaderOffset))) {
+    if (is_multicast_ether_addr((PBYTE)(skb->data+cbHeaderOffset))) {
        if (pMgmt->sNodeDBTable[0].bPSEnable) {
 
            skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz);
index 0d2d491823ee474c56bc2fe3355d9f9e980feeb1..ebb4fa4b83f252fcc35152398b45f4209a29c756 100644 (file)
@@ -761,7 +761,7 @@ int iwctl_siwap(struct net_device *dev,
                memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
 
        //mike :add
-        if ((IS_BROADCAST_ADDRESS(pMgmt->abyDesireBSSID)) ||
+        if ((is_broadcast_ether_addr(pMgmt->abyDesireBSSID)) ||
             (memcmp(pMgmt->abyDesireBSSID, ZeroBSSID, 6) == 0)){
              PRINT_K("SIOCSIWAP:invalid desired BSSID return!\n");
                return rc;
index 6a77ce35e708c91c6a4f95651c841384a895098d..24745dbe566fe950ded208f642ecc6ed505684d2 100644 (file)
@@ -402,7 +402,7 @@ BOOL KeybRemoveKey(
     int     i;
     BOOL    bReturnValue = FALSE;
 
-    if (IS_BROADCAST_ADDRESS(pbyBSSID)) {
+    if (is_broadcast_ether_addr(pbyBSSID)) {
         // dealte all key
         if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
             for (i=0;i<MAX_KEY_TABLE;i++) {
index d5cf7b06d36e75b9a097d5352c1e20bab83839d6..24437a081b7f810fcc316b5cb403d9c56093a201 100644 (file)
@@ -304,10 +304,9 @@ s_vSaveTxPktInfo(PSDevice pDevice, BYTE byPktNum, PBYTE pbyDestAddr, WORD wPktLe
 {
     PSStatCounter           pStatistic=&(pDevice->scStatistic);
 
-
-    if (IS_BROADCAST_ADDRESS(pbyDestAddr))
+    if (is_broadcast_ether_addr(pbyDestAddr))
         pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_BROAD;
-    else if (IS_MULTICAST_ADDRESS(pbyDestAddr))
+    else if (is_multicast_ether_addr(pbyDestAddr))
         pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_MULTI;
     else
         pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_UNI;
@@ -319,9 +318,6 @@ s_vSaveTxPktInfo(PSDevice pDevice, BYTE byPktNum, PBYTE pbyDestAddr, WORD wPktLe
           ETH_ALEN);
 }
 
-
-
-
 static
 void
 s_vFillTxKey (
@@ -1494,8 +1490,8 @@ s_bPacketToWirelessUsb(
     } else { //if (pDevice->dwDiagRefCount != 0) {
         if ((pDevice->eOPMode == OP_MODE_ADHOC) ||
             (pDevice->eOPMode == OP_MODE_AP)) {
-            if (IS_MULTICAST_ADDRESS(&(psEthHeader->abyDstAddr[0])) ||
-                IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) {
+           if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) ||
+               is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) {
                 bNeedACK = FALSE;
                 pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK);
             }
@@ -2038,8 +2034,8 @@ CMD_STATUS csMgmt_xmit(
     pTxBufHead->wTimeStamp = cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us);
 
 
-    if (IS_MULTICAST_ADDRESS(&(pPacket->p80211Header->sA3.abyAddr1[0])) ||
-        IS_BROADCAST_ADDRESS(&(pPacket->p80211Header->sA3.abyAddr1[0]))) {
+    if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0])) ||
+       is_broadcast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0]))) {
         bNeedACK = FALSE;
     }
     else {
@@ -2447,8 +2443,8 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb) {
     pTxBufHead->wTimeStamp = cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us);
 
 
-    if (IS_MULTICAST_ADDRESS(&(p80211Header->sA3.abyAddr1[0])) ||
-        IS_BROADCAST_ADDRESS(&(p80211Header->sA3.abyAddr1[0]))) {
+    if (is_multicast_ether_addr(&(p80211Header->sA3.abyAddr1[0])) ||
+       is_broadcast_ether_addr(&(p80211Header->sA3.abyAddr1[0]))) {
         bNeedACK = FALSE;
         if (pDevice->bEnableHostWEP) {
             uNodeIndex = 0;
@@ -2783,7 +2779,7 @@ nsDMA_tx_packet(
             return 0;
         }
 
-        if (IS_MULTICAST_ADDRESS((PBYTE)(skb->data))) {
+       if (is_multicast_ether_addr((PBYTE)(skb->data))) {
             uNodeIndex = 0;
             bNodeExist = TRUE;
             if (pMgmt->sNodeDBTable[0].bPSEnable) {
@@ -2975,7 +2971,7 @@ nsDMA_tx_packet(
     else {
         if (pDevice->eOPMode == OP_MODE_ADHOC) {
             // Adhoc Tx rate decided from node DB
-            if (IS_MULTICAST_ADDRESS(&(pDevice->sTxEthHeader.abyDstAddr[0]))) {
+           if (is_multicast_ether_addr(&(pDevice->sTxEthHeader.abyDstAddr[0]))) {
                 // Multicast use highest data rate
                 pDevice->wCurrentRate = pMgmt->sNodeDBTable[0].wTxDataRate;
                 // preamble type
index 819aaf7c00e39b94571852a6499d3bbeb64e9cde..f37dc82be8f9fe9d184f30ddb8e427ee0a4e0238 100644 (file)
@@ -199,14 +199,6 @@ S802_11Header, *PS802_11Header;
 /*---------------------  Export Macros ------------------------------*/
 // Frame type macro
 
-#define IS_MULTICAST_ADDRESS(pbyEtherAddr)          \
-    ((*(PBYTE)(pbyEtherAddr) & 0x01) == 1)
-
-#define IS_BROADCAST_ADDRESS(pbyEtherAddr) (        \
-    (*(PDWORD)(pbyEtherAddr) == 0xFFFFFFFFL) &&     \
-    (*(PWORD)((PBYTE)(pbyEtherAddr) + 4) == 0xFFFF) \
-)
-
 #define IS_NULL_ADDRESS(pbyEtherAddr) (             \
     (*(PDWORD)(pbyEtherAddr) == 0L) &&              \
     (*(PWORD)((PBYTE)(pbyEtherAddr) + 4) == 0)      \
index c886722a54bc17f9ebc4230e54997891953078bc..f7bf925b6395ddf814231f7d116c81c4f34ff148 100644 (file)
@@ -348,9 +348,8 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
         return -EINVAL;
     }
 
-
-    if (IS_BROADCAST_ADDRESS(&param->addr[0]) || (param->addr == NULL)) {
-        // If IS_BROADCAST_ADDRESS, set the key as every key entry's group key.
+    if (is_broadcast_ether_addr(&param->addr[0]) || (param->addr == NULL)) {
+       /* if broadcast, set the key as every key entry's group key */
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n");
 
         if ((KeybSetAllGroupKey(pDevice,