summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-30 15:40:32 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-31 16:48:30 -0500
commit8fd90de800a838320406c29587d40fb8167ec48e (patch)
tree053b57bba06fdf5ed3394dc1009e3967e0450125 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
parentc466a9b2b329f7d9982c14eedc83a923d3bc711c (diff)
downloadblackbird-op-linux-8fd90de800a838320406c29587d40fb8167ec48e.tar.gz
blackbird-op-linux-8fd90de800a838320406c29587d40fb8167ec48e.zip
net: bnx2x: slight optimization of addr compare
Use the possibly more efficient ether_addr_equal or ether_addr_equal_unaligned to instead of memcmp. Cc: Ariel Elior <ariele@broadcom.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 25182765e4be..6fe52d301dfe 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -3616,7 +3616,7 @@ enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp)
/* the mac address in bulletin board is valid and is new */
if (bulletin.valid_bitmap & 1 << MAC_ADDR_VALID &&
- memcmp(bulletin.mac, bp->old_bulletin.mac, ETH_ALEN)) {
+ !ether_addr_equal(bulletin.mac, bp->old_bulletin.mac)) {
/* update new mac to net device */
memcpy(bp->dev->dev_addr, bulletin.mac, ETH_ALEN);
}
OpenPOWER on IntegriCloud