]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xtensa: iss: replace iss_net_set_mac with eth_mac_addr
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 8 Apr 2022 12:15:16 +0000 (05:15 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 2 May 2022 02:51:20 +0000 (19:51 -0700)
iss_net_set_mac is just a copy of eth_mac_addr with pointless locking.
Drop this function and replace it with eth_mac_addr.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/platforms/iss/network.c

index 409def002f55a01fa3a59b62cda0b3c7470fb93b..e9454652551b1af349edc92b9286719c7ee7e5f6 100644 (file)
@@ -436,19 +436,6 @@ static void iss_net_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
 }
 
-static int iss_net_set_mac(struct net_device *dev, void *addr)
-{
-       struct iss_net_private *lp = netdev_priv(dev);
-       struct sockaddr *hwaddr = addr;
-
-       if (!is_valid_ether_addr(hwaddr->sa_data))
-               return -EADDRNOTAVAIL;
-       spin_lock_bh(&lp->lock);
-       eth_hw_addr_set(dev, hwaddr->sa_data);
-       spin_unlock_bh(&lp->lock);
-       return 0;
-}
-
 static int iss_net_change_mtu(struct net_device *dev, int new_mtu)
 {
        return -EINVAL;
@@ -474,7 +461,7 @@ static const struct net_device_ops iss_netdev_ops = {
        .ndo_start_xmit         = iss_net_start_xmit,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_change_mtu         = iss_net_change_mtu,
-       .ndo_set_mac_address    = iss_net_set_mac,
+       .ndo_set_mac_address    = eth_mac_addr,
        .ndo_tx_timeout         = iss_net_tx_timeout,
        .ndo_set_rx_mode        = iss_net_set_multicast_list,
 };