From: dingtianhong Date: Thu, 26 Dec 2013 11:40:31 +0000 (+0800) Subject: hamradio: slight optimization of addr compare X-Git-Tag: MMI-PSA29.97-13-9~12877^2~393^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc050c9e774cfd7105090118777a072ea4498dad;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git hamradio: slight optimization of addr compare Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Joerg Reuter Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index f91bf0ddf031..d50b23cf9ea9 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -208,7 +208,7 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty eth = eth_hdr(skb); if (!(bpq->acpt_addr[0] & 0x01) && - memcmp(eth->h_source, bpq->acpt_addr, ETH_ALEN)) + !ether_addr_equal(eth->h_source, bpq->acpt_addr)) goto drop_unlock; if (skb_cow(skb, sizeof(struct ethhdr)))