Staging: rtl8192e: Use compare_ether_addr instead of eqMacAddr
authorMike McCormack <mikem@ring3k.org>
Mon, 27 Dec 2010 12:48:32 +0000 (21:48 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 21 Jan 2011 00:14:10 +0000 (16:14 -0800)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/dot11d.h
drivers/staging/rtl8192e/r8192E_core.c

index 3bec1a40016df715ec9475baf78d3c1ba04a9d27..86660833d11063ac1b8dfa5694e1727a89e5a2b3 100644 (file)
@@ -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])
index 075245b92a87e272d0d9be42c055ca21454f46a7..54853ee9e0efc994a647df35ac6c99f469273261 100644 (file)
@@ -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);
     }