OSDN Git Service

ice: remove unnecessary check for old MAC == new MAC
authorPiotr Gardocki <piotrx.gardocki@intel.com>
Wed, 14 Jun 2023 14:53:02 +0000 (16:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Jun 2023 05:54:54 +0000 (22:54 -0700)
The check has been moved to core. The ndo_set_mac_address callback
is not being called with new MAC address equal to the old one anymore.

Signed-off-by: Piotr Gardocki <piotrx.gardocki@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c

index a0283b5..65bf399 100644 (file)
@@ -5624,11 +5624,6 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)
        if (!is_valid_ether_addr(mac))
                return -EADDRNOTAVAIL;
 
-       if (ether_addr_equal(netdev->dev_addr, mac)) {
-               netdev_dbg(netdev, "already using mac %pM\n", mac);
-               return 0;
-       }
-
        if (test_bit(ICE_DOWN, pf->state) ||
            ice_is_reset_in_progress(pf->state)) {
                netdev_err(netdev, "can't set mac %pM. device not ready\n",