Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc050c9e authored by dingtianhong's avatar dingtianhong Committed by David S. Miller
Browse files

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: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e6d9f8a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)))