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

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

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: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9130ac61
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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
	/* The MAC change did not happen, either due to lack of privilege
	 * or PF didn't pre-provision.
	 * or PF didn't pre-provision.
	 */
	 */
	if (memcmp(addr->sa_data, mac, ETH_ALEN)) {
	if (!ether_addr_equal(addr->sa_data, mac)) {
		status = -EPERM;
		status = -EPERM;
		goto err;
		goto err;
	}
	}