diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-18 22:58:04 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-09 16:09:35 -0400 |
commit | c6fb08aaa879d1a70ed01e9ac1080066abf7ef78 (patch) | |
tree | 0ee780fb5dd69fb2dc083fba6f037403597a43f9 /net/wireless/scan.c | |
parent | 4272a27f2f5773f4e4cb5285feba655450a720a8 (diff) | |
download | linux-c6fb08aaa879d1a70ed01e9ac1080066abf7ef78.tar.gz linux-c6fb08aaa879d1a70ed01e9ac1080066abf7ef78.tar.bz2 linux-c6fb08aaa879d1a70ed01e9ac1080066abf7ef78.zip |
cfg80211: 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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 70faadf16a32..fdbcfe692a36 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -378,7 +378,7 @@ static int cmp_bss_core(struct cfg80211_bss *a, b->len_information_elements); } - return memcmp(a->bssid, b->bssid, ETH_ALEN); + return compare_ether_addr(a->bssid, b->bssid); } static int cmp_bss(struct cfg80211_bss *a, |