diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-26 19:40:31 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-26 13:31:33 -0500 |
commit | dc050c9e774cfd7105090118777a072ea4498dad (patch) | |
tree | 861056a21595550127ee053cba956555f8a32ab8 /drivers/net/hamradio | |
parent | e6d9f8a31c6906f68364487a3540206e7d8d635a (diff) |
hamradio: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Joerg Reuter <jreuter@yaina.de>
Cc: linux-hams@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 2 |
1 files changed, 1 insertions, 1 deletions
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))) |