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/prism54/isl_ioctl.c | |
parent | 4f29739bb05cfbe5529460d0e8afeff2a528c2fa (diff) | |
download | op-kernel-dev-692e5167b4487c96123c2de4c8d9577d50606112.zip op-kernel-dev-692e5167b4487c96123c2de4c8d9577d50606112.tar.gz |
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/isl_ioctl.c')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 3 |
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 df784fe..78fa64d 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); |