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/mesh.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/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index c707c8bf6d2c..e5fbb7cf3562 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -204,7 +204,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr, | |||
204 | kmem_cache_free(rm_cache, p); | 204 | kmem_cache_free(rm_cache, p); |
205 | --entries; | 205 | --entries; |
206 | } else if ((seqnum == p->seqnum) && | 206 | } else if ((seqnum == p->seqnum) && |
207 | (memcmp(sa, p->sa, ETH_ALEN) == 0)) | 207 | (compare_ether_addr(sa, p->sa) == 0)) |
208 | return -1; | 208 | return -1; |
209 | } | 209 | } |
210 | 210 | ||