Commit 03996954 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

Staging: rtl8192e: Use compare_ether_addr instead of eqMacAddr

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dbb6c036
...@@ -41,12 +41,6 @@ typedef struct _RT_DOT11D_INFO { ...@@ -41,12 +41,6 @@ typedef struct _RT_DOT11D_INFO {
DOT11D_STATE State; DOT11D_STATE State;
} RT_DOT11D_INFO, *PRT_DOT11D_INFO; } 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], \ #define cpMacAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], \
(des)[2] = (src)[2], (des)[3] = (src)[3], \ (des)[2] = (src)[2], (des)[3] = (src)[3], \
(des)[4] = (src)[4], (des)[5] = (src)[5]) (des)[4] = (src)[4], (des)[5] = (src)[5])
......
...@@ -5571,9 +5571,9 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev, ...@@ -5571,9 +5571,9 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev,
/* Check if the received packet is acceptabe. */ /* Check if the received packet is acceptabe. */
bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) && 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)); && (!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 1//cosa
if(WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON) if(WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON)
{ {
...@@ -5582,7 +5582,7 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev, ...@@ -5582,7 +5582,7 @@ static void TranslateRxSignalStuff819xpci(struct net_device *dev,
} }
if(WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BLOCKACK) 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; bToSelfBA = true;
//DbgPrint("BlockAck, MatchBSSID = %d, ToSelf = %d \n", bPacketMatchBSSID, bPacketToSelf); //DbgPrint("BlockAck, MatchBSSID = %d, ToSelf = %d \n", bPacketMatchBSSID, bPacketToSelf);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment