diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-26 19:41:34 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-26 13:31:35 -0500 |
commit | 692e5167b4487c96123c2de4c8d9577d50606112 (patch) | |
tree | 0c7c97774c2c5bcf092de4852da404c543d725d9 /drivers/net/wireless/wl3501_cs.c | |
parent | 4f29739bb05cfbe5529460d0e8afeff2a528c2fa (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 38d2089f338..1477d7f0590 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; } |