mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 13:11:45 +00:00
Staging: vt6656: replaced IS_BROADCAST_ADDRESS with is_broadcast_ether_addr
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>
This commit is contained in:
parent
6cda24f5df
commit
4b50fb4042
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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++) {
|
||||
|
@ -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
|
||||
|
@ -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) \
|
||||
|
@ -348,9 +348,8 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
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 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,
|
||||
|
Loading…
Reference in New Issue
Block a user