aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/base.c
diff options
context:
space:
mode:
authorJonathan Bither <jonbither@gmail.com>2012-04-12 15:44:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:16:59 -0400
commit94c84ee61478ff19411fb684d42e3c4f84ae7e88 (patch)
tree62db3806ec196154112c1b46c7ea583d8da4b3ea /drivers/net/wireless/ath/ath5k/base.c
parentath9k: Gather and report IRQ sync_cause errors. (diff)
downloadlinux-dev-94c84ee61478ff19411fb684d42e3c4f84ae7e88.tar.xz
linux-dev-94c84ee61478ff19411fb684d42e3c4f84ae7e88.zip
ath5k: use compare_ether_addr on MAC addresses instead of memcmp
Following Felix's recent patchset as an example I have replaced memcmp with compare_ether_addr. "Because of the constant size and guaranteed 16 bit alignment, the inline compare_ether_addr function is much cheaper than calling memcmp." Signed-off-by: Jonathan Bither <jonbither@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3007bba12d94..49e3b19cf781 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1170,7 +1170,7 @@ ath5k_check_ibss_tsf(struct ath5k_hw *ah, struct sk_buff *skb,
if (ieee80211_is_beacon(mgmt->frame_control) &&
le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS &&
- memcmp(mgmt->bssid, common->curbssid, ETH_ALEN) == 0) {
+ compare_ether_addr(mgmt->bssid, common->curbssid) == 0) {
/*
* Received an IBSS beacon with the same BSSID. Hardware *must*
* have updated the local TSF. We have to work around various
@@ -1234,7 +1234,7 @@ ath5k_update_beacon_rssi(struct ath5k_hw *ah, struct sk_buff *skb, int rssi)
/* only beacons from our BSSID */
if (!ieee80211_is_beacon(mgmt->frame_control) ||
- memcmp(mgmt->bssid, common->curbssid, ETH_ALEN) != 0)
+ compare_ether_addr(mgmt->bssid, common->curbssid) != 0)
return;
ewma_add(&ah->ah_beacon_rssi_avg, rssi);