summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-30 08:40:43 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-31 22:48:31 +0100
commit61d23e9f3d60347dd05475b35a7837f4e7fcbd7a (patch)
tree62368990bbfb46b2971156bc4fc764e11782f0c3 /drivers/net/ethernet/emulex
parentnet: enic: slight optimization of addr compare (diff)
downloadlinux-61d23e9f3d60347dd05475b35a7837f4e7fcbd7a.tar.xz
linux-61d23e9f3d60347dd05475b35a7837f4e7fcbd7a.zip
net: benet: slight optimization of addr compare
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index f67586a766d2..b5c238aa6861 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -287,7 +287,7 @@ static int be_mac_addr_set(struct net_device *netdev, void *p)
/* The MAC change did not happen, either due to lack of privilege
* or PF didn't pre-provision.
*/
- if (memcmp(addr->sa_data, mac, ETH_ALEN)) {
+ if (!ether_addr_equal(addr->sa_data, mac)) {
status = -EPERM;
goto err;
}