diff options
author | Charles Clément <caratorn@gmail.com> | 2010-05-19 18:30:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-18 17:06:53 (GMT) |
commit | ca9e12acda7ab451ab481d29911af7ee27c512cf (patch) | |
tree | 090bff240fe3e51ec298c644e1fbbe535cb8adaf /drivers | |
parent | 670ea81eadf68fa68023731e3f747fd6b0c61dd4 (diff) | |
download | linux-ca9e12acda7ab451ab481d29911af7ee27c512cf.tar.xz |
Staging: vt6655: use is_broadcast_ether_addr instead of custom macro
Replace custom macro IS_BROADCAST_ADDRESS by is_broadcast_ether_addr
from <linux/etherdevice.h>.
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vt6655/bssdb.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/dpc.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/iwctl.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/key.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/mib.c | 4 | ||||
-rw-r--r-- | drivers/staging/vt6655/rxtx.c | 10 | ||||
-rw-r--r-- | drivers/staging/vt6655/tether.h | 5 | ||||
-rw-r--r-- | drivers/staging/vt6655/wpactl.c | 4 |
8 files changed, 13 insertions, 18 deletions
diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 6312a55..0c27150 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -144,7 +144,7 @@ BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; 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; } diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index addbd4d..c82fc310 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -463,7 +463,7 @@ device_receive_frame ( return FALSE; } - if (!is_multicast_ether_addr(pbyFrame) && !IS_BROADCAST_ADDRESS(pbyFrame)) { + if (!is_multicast_ether_addr(pbyFrame) && !is_broadcast_ether_addr(pbyFrame)) { if (WCTLbIsDuplicate(&(pDevice->sDupRxCache), (PS802_11Header) (skb->data + 4))) { pDevice->s802_11Counter.FrameDuplicateCount++; return FALSE; diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index cf69034..1663235 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -706,7 +706,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { return rc; } //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; diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index bfc5c50..474091c 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -371,7 +371,7 @@ BOOL KeybRemoveKey ( { int i; - 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++) { diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 1300f06..7f7dc7e 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -471,7 +471,7 @@ STAvUpdateTDStatCounter ( pStatistic->CustomStat.ullTsrAllOK = (pStatistic->ullTsrOK[TYPE_AC0DMA] + pStatistic->ullTsrOK[TYPE_TXDMA0]); // update counters in case that successful transmit - if (IS_BROADCAST_ADDRESS(pbyDestAddr)) { + if (is_broadcast_ether_addr(pbyDestAddr)) { pStatistic->ullTxBroadcastFrames[uIdx]++; pStatistic->ullTxBroadcastBytes[uIdx] += (ULONGLONG)cbFrameLength; } @@ -495,7 +495,7 @@ STAvUpdateTDStatCounter ( pStatistic->dwTsrACKData[uIdx]++; } - if (IS_BROADCAST_ADDRESS(pbyDestAddr)) + if (is_broadcast_ether_addr(pbyDestAddr)) pStatistic->dwTsrBroadcast[uIdx]++; else if (is_multicast_ether_addr(pbyDestAddr)) pStatistic->dwTsrMulticast[uIdx]++; diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 253ca24..590fc7f 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1395,7 +1395,7 @@ s_cbFillTxBufHead ( (pDevice->eOPMode == OP_MODE_AP)) { if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) || - IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) { + is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) { bNeedACK = FALSE; } else { @@ -2124,7 +2124,7 @@ vGenerateFIFOHeader ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) || - IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) { + is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) { bNeedACK = FALSE; pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK); } @@ -2425,7 +2425,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0])) || - IS_BROADCAST_ADDRESS(&(pPacket->p80211Header->sA3.abyAddr1[0]))) { + is_broadcast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0]))) { bNeedACK = FALSE; } else { @@ -2761,7 +2761,7 @@ cbGetFragCount ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) || - IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) { + is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) { bNeedACK = FALSE; } else { @@ -2939,7 +2939,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU if (is_multicast_ether_addr(&(p80211Header->sA3.abyAddr1[0])) || - IS_BROADCAST_ADDRESS(&(p80211Header->sA3.abyAddr1[0]))) { + is_broadcast_ether_addr(&(p80211Header->sA3.abyAddr1[0]))) { bNeedACK = FALSE; if (pDevice->bEnableHostWEP) { uNodeIndex = 0; diff --git a/drivers/staging/vt6655/tether.h b/drivers/staging/vt6655/tether.h index 5365e7f..e25ad4b 100644 --- a/drivers/staging/vt6655/tether.h +++ b/drivers/staging/vt6655/tether.h @@ -188,11 +188,6 @@ S802_11Header, *PS802_11Header; /*--------------------- Export Macros ------------------------------*/ // Frame type macro -#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) \ diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 22c2fab..3d13712 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -351,8 +351,8 @@ spin_lock_irq(&pDevice->lock); } // spin_lock_irq(&pDevice->lock); - if (IS_BROADCAST_ADDRESS(¶m->addr[0]) || (param->addr == NULL)) { - // If IS_BROADCAST_ADDRESS, set the key as every key entry's group key. + if (is_broadcast_ether_addr(¶m->addr[0]) || (param->addr == NULL)) { + // If is_broadcast_ether_addr, set the key as every key entry's group key. DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n"); if ((KeybSetAllGroupKey(&(pDevice->sKey), |