aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-03-11 15:53:40 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:00:59 -0400
commit832855dc5a9beb78644d6163f94eccf2094bf30d (patch)
tree9bbf082ebcc3828b7d9b7c24fb3cc9633409e41c
parent6bab99be917054736097b758489a9ea27fd44245 (diff)
[PATCH] zd1211rw: Use compare_ether_addr()
Suggested by Maxime Austruy, based on mac80211 changes from Stephen Hemminger Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 4c5f78eac349..19172f571524 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -974,14 +974,14 @@ static int is_data_packet_for_us(struct ieee80211_device *ieee,
974 switch (ieee->iw_mode) { 974 switch (ieee->iw_mode) {
975 case IW_MODE_ADHOC: 975 case IW_MODE_ADHOC:
976 if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) != 0 || 976 if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) != 0 ||
977 memcmp(hdr->addr3, ieee->bssid, ETH_ALEN) != 0) 977 compare_ether_addr(hdr->addr3, ieee->bssid) != 0)
978 return 0; 978 return 0;
979 break; 979 break;
980 case IW_MODE_AUTO: 980 case IW_MODE_AUTO:
981 case IW_MODE_INFRA: 981 case IW_MODE_INFRA:
982 if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) != 982 if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) !=
983 IEEE80211_FCTL_FROMDS || 983 IEEE80211_FCTL_FROMDS ||
984 memcmp(hdr->addr2, ieee->bssid, ETH_ALEN) != 0) 984 compare_ether_addr(hdr->addr2, ieee->bssid) != 0)
985 return 0; 985 return 0;
986 break; 986 break;
987 default: 987 default:
@@ -989,9 +989,9 @@ static int is_data_packet_for_us(struct ieee80211_device *ieee,
989 return 0; 989 return 0;
990 } 990 }
991 991
992 return memcmp(hdr->addr1, netdev->dev_addr, ETH_ALEN) == 0 || 992 return compare_ether_addr(hdr->addr1, netdev->dev_addr) == 0 ||
993 (is_multicast_ether_addr(hdr->addr1) && 993 (is_multicast_ether_addr(hdr->addr1) &&
994 memcmp(hdr->addr3, netdev->dev_addr, ETH_ALEN) != 0) || 994 compare_ether_addr(hdr->addr3, netdev->dev_addr) != 0) ||
995 (netdev->flags & IFF_PROMISC); 995 (netdev->flags & IFF_PROMISC);
996} 996}
997 997
@@ -1047,7 +1047,7 @@ static void update_qual_rssi(struct zd_mac *mac,
1047 hdr = (struct ieee80211_hdr_3addr *)buffer; 1047 hdr = (struct ieee80211_hdr_3addr *)buffer;
1048 if (length < offsetof(struct ieee80211_hdr_3addr, addr3)) 1048 if (length < offsetof(struct ieee80211_hdr_3addr, addr3))
1049 return; 1049 return;
1050 if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0) 1050 if (compare_ether_addr(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid) != 0)
1051 return; 1051 return;
1052 1052
1053 spin_lock_irqsave(&mac->lock, flags); 1053 spin_lock_irqsave(&mac->lock, flags);