From 03996954fd758c4f3b5de6528f77db16ef460eb3 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 27 Dec 2010 21:48:32 +0900 Subject: [PATCH] Staging: rtl8192e: Use compare_ether_addr instead of eqMacAddr Signed-off-by: Mike McCormack Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/dot11d.h | 6 ------ drivers/staging/rtl8192e/r8192E_core.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index 3bec1a4..8666083 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -41,12 +41,6 @@ typedef struct _RT_DOT11D_INFO { DOT11D_STATE State; } RT_DOT11D_INFO, *PRT_DOT11D_INFO; -static inline bool eqMacAddr(u8 *a, u8 *b) -{ - return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && - a[3] == b[3] && a[4] == b[4] && a[5] == b[5]; -} - #define cpMacAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], \ (des)[2] = (src)[2], (des)[3] = (src)[3], \ (des)[4] = (src)[4], (des)[5] = (src)[5]) diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 075245b..54853ee 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -5571,9 +5571,9 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev, /* Check if the received packet is acceptabe. */ bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) && - (eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3)) + (!compare_ether_addr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3)) && (!pstats->bHwError) && (!pstats->bCRC)&& (!pstats->bICV)); - bpacket_toself = bpacket_match_bssid & (eqMacAddr(praddr, priv->ieee80211->dev->dev_addr)); + bpacket_toself = bpacket_match_bssid & (!compare_ether_addr(praddr, priv->ieee80211->dev->dev_addr)); #if 1//cosa if(WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON) { @@ -5582,7 +5582,7 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev, } if(WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BLOCKACK) { - if((eqMacAddr(praddr,dev->dev_addr))) + if((!compare_ether_addr(praddr,dev->dev_addr))) bToSelfBA = true; //DbgPrint("BlockAck, MatchBSSID = %d, ToSelf = %d \n", bPacketMatchBSSID, bPacketToSelf); } -- 2.7.4