diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-01 15:22:09 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:38:31 -0500 |
commit | 888d04dfbe7e09f930fdaafb257cce2c54c9c3f3 (patch) | |
tree | cdf0c4d4008860fd91db31bcc620a8ecd3d95bc1 /net/mac80211/sta_info.h | |
parent | 4d196e4b2ffd734393b54f351507462f19d737b5 (diff) | |
download | linux-3.10-888d04dfbe7e09f930fdaafb257cce2c54c9c3f3.tar.gz linux-3.10-888d04dfbe7e09f930fdaafb257cce2c54c9c3f3.tar.bz2 linux-3.10-888d04dfbe7e09f930fdaafb257cce2c54c9c3f3.zip |
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/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 23a97c9dc04..3336d54e555 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -14,6 +14,7 @@ #include <linux/if_ether.h> #include <linux/workqueue.h> #include <linux/average.h> +#include <linux/etherdevice.h> #include "key.h" /** @@ -489,7 +490,7 @@ void for_each_sta_info_type_check(struct ieee80211_local *local, nxt = _sta ? rcu_dereference(_sta->hnext) : NULL \ ) \ /* compare address and run code only if it matches */ \ - if (memcmp(_sta->sta.addr, (_addr), ETH_ALEN) == 0) + if (compare_ether_addr(_sta->sta.addr, (_addr)) == 0) /* * Get STA info by index, BROKEN! |