summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl3501_cs.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 19:41:34 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:31:35 -0500
commit692e5167b4487c96123c2de4c8d9577d50606112 (patch)
tree0c7c97774c2c5bcf092de4852da404c543d725d9 /drivers/net/wireless/wl3501_cs.c
parent4f29739bb05cfbe5529460d0e8afeff2a528c2fa (diff)
downloadlwn-692e5167b4487c96123c2de4c8d9577d50606112.tar.gz
lwn-692e5167b4487c96123c2de4c8d9577d50606112.zip
wireless: slight optimization of addr compare
Use possibly more efficient ether_addr_equal or ether_addr_equal_unaligned instead of memcmp. Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/wl3501_cs.c')
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 38d2089f338a..1477d7f05905 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -44,6 +44,7 @@
#include <linux/string.h>
#include <linux/wireless.h>
#include <linux/ieee80211.h>
+#include <linux/etherdevice.h>
#include <net/iw_handler.h>
@@ -673,8 +674,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
matchflag = 1;
if (matchflag) {
for (i = 0; i < this->bss_cnt; i++) {
- if (!memcmp(this->bss_set[i].bssid,
- sig.bssid, ETH_ALEN)) {
+ if (ether_addr_equal_unaligned(this->bss_set[i].bssid, sig.bssid)) {
matchflag = 0;
break;
}