summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/cw1200/sta.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 12:41:20 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-26 19:31:35 +0100
commit35df5388ac7cd205cc642b28eb90f940c816eaf7 (patch)
treeb929d38a99ee3425e78ebfc6347a46ae0fd1e5b2 /drivers/net/wireless/cw1200/sta.c
parenthostap: slight optimization of addr compare (diff)
downloadlinux-35df5388ac7cd205cc642b28eb90f940c816eaf7.tar.xz
linux-35df5388ac7cd205cc642b28eb90f940c816eaf7.zip
cw1200: slight optimization of addr compare
Use possibly more efficient ether_addr_equal instead of memcmp. Cc: Solomon Peachy <pizza@shaftnet.org> 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/cw1200/sta.c')
-rw-r--r--drivers/net/wireless/cw1200/sta.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c
index 010b252be584..103f7bce8932 100644
--- a/drivers/net/wireless/cw1200/sta.c
+++ b/drivers/net/wireless/cw1200/sta.c
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/firmware.h>
#include <linux/module.h>
+#include <linux/etherdevice.h>
#include "cw1200.h"
#include "sta.h"
@@ -555,8 +556,8 @@ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
pr_debug("[STA] multicast: %pM\n", ha->addr);
memcpy(&priv->multicast_filter.macaddrs[count],
ha->addr, ETH_ALEN);
- if (memcmp(ha->addr, broadcast_ipv4, ETH_ALEN) &&
- memcmp(ha->addr, broadcast_ipv6, ETH_ALEN))
+ if (!ether_addr_equal(ha->addr, broadcast_ipv4) &&
+ !ether_addr_equal(ha->addr, broadcast_ipv6))
priv->has_multicast_subscription = true;
count++;
}