summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/prism54
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 15:41:34 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-26 22:31:35 +0400
commit692e5167b4487c96123c2de4c8d9577d50606112 (patch)
tree0c7c97774c2c5bcf092de4852da404c543d725d9 /drivers/net/wireless/prism54
parent4f29739bb05cfbe5529460d0e8afeff2a528c2fa (diff)
downloadlinux-692e5167b4487c96123c2de4c8d9577d50606112.tar.xz
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/prism54')
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index df784fefb8e3..78fa64d3f223 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -24,6 +24,7 @@
#include <linux/if_arp.h>
#include <linux/slab.h>
#include <linux/pci.h>
+#include <linux/etherdevice.h>
#include <asm/uaccess.h>
@@ -1860,7 +1861,7 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
if (mutex_lock_interruptible(&acl->lock))
return -ERESTARTSYS;
list_for_each_entry(entry, &acl->mac_list, _list) {
- if (memcmp(entry->addr, addr->sa_data, ETH_ALEN) == 0) {
+ if (ether_addr_equal(entry->addr, addr->sa_data)) {
list_del(&entry->_list);
acl->size--;
kfree(entry);