diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-01 09:22:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:38:31 -0500 |
commit | 888d04dfbe7e09f930fdaafb257cce2c54c9c3f3 (patch) | |
tree | cdf0c4d4008860fd91db31bcc620a8ecd3d95bc1 /net/mac80211/status.c | |
parent | 4d196e4b2ffd734393b54f351507462f19d737b5 (diff) |
mac80211: use compare_ether_addr on MAC addresses instead of memcmp
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: Felix Fietkau <nbd@openwrt.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index c928e4a4effd..5f8f89e89d6b 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/export.h> | 12 | #include <linux/export.h> |
13 | #include <linux/etherdevice.h> | ||
13 | #include <net/mac80211.h> | 14 | #include <net/mac80211.h> |
14 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
15 | #include "ieee80211_i.h" | 16 | #include "ieee80211_i.h" |
@@ -377,7 +378,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
377 | 378 | ||
378 | for_each_sta_info(local, hdr->addr1, sta, tmp) { | 379 | for_each_sta_info(local, hdr->addr1, sta, tmp) { |
379 | /* skip wrong virtual interface */ | 380 | /* skip wrong virtual interface */ |
380 | if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN)) | 381 | if (compare_ether_addr(hdr->addr2, sta->sdata->vif.addr)) |
381 | continue; | 382 | continue; |
382 | 383 | ||
383 | if (info->flags & IEEE80211_TX_STATUS_EOSP) | 384 | if (info->flags & IEEE80211_TX_STATUS_EOSP) |