From: dingtianhong Date: Thu, 26 Dec 2013 11:40:31 +0000 (+0800) Subject: hamradio: slight optimization of addr compare X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dc050c9e774cfd7105090118777a072ea4498dad;p=linux-beck.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)))