net: seeq: slight optimization of addr compare
authordingtianhong <dingtianhong@huawei.com>
Mon, 30 Dec 2013 07:41:21 +0000 (15:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 21:48:32 +0000 (16:48 -0500)
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/seeq/sgiseeq.c

index c765718860114f42849faa0d8086e78711c867dc..ced5b13d937f33111d86255395870dec95bf96fc 100644 (file)
@@ -356,7 +356,7 @@ static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp
                if (pkt_status & SEEQ_RSTAT_FIG) {
                        /* Packet is OK. */
                        /* We don't want to receive our own packets */
-                       if (memcmp(rd->skb->data + 6, dev->dev_addr, ETH_ALEN)) {
+                       if (!ether_addr_equal(rd->skb->data + 6, dev->dev_addr)) {
                                if (len > rx_copybreak) {
                                        skb = rd->skb;
                                        newskb = netdev_alloc_skb(dev, PKT_BUF_SZ);