summaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-18 22:58:04 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 22:09:35 +0200
commitc6fb08aaa879d1a70ed01e9ac1080066abf7ef78 (patch)
tree0ee780fb5dd69fb2dc083fba6f037403597a43f9 /net/wireless/scan.c
parentrt2x00: increase led's name buffer length (diff)
downloadlinux-c6fb08aaa879d1a70ed01e9ac1080066abf7ef78.tar.xz
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.c2
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,