hamradio: slight optimization of addr compare
Subsystems (2)
PATCH v3 4/19 hamradio: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc Joerg Reuter <[email protected]>
Signed-off-by Ding Tianhong <[email protected]>
--- drivers/net/hamradio/bpqether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hamradio/bpqether.c +1 -1
@@ -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 )))
Signature · 1 line
1.8.0