|
@@ -3749,6 +3749,20 @@ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int stmmac_set_mac_address(struct net_device *ndev, void *addr)
|
|
|
|
+{
|
|
|
|
+ struct stmmac_priv *priv = netdev_priv(ndev);
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
|
|
+ ret = eth_mac_addr(ndev, addr);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
|
|
+ priv->hw->mac->set_umac_addr(priv->hw, ndev->dev_addr, 0);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
#ifdef CONFIG_DEBUG_FS
|
|
#ifdef CONFIG_DEBUG_FS
|
|
static struct dentry *stmmac_fs_dir;
|
|
static struct dentry *stmmac_fs_dir;
|
|
|
|
|
|
@@ -3976,7 +3990,7 @@ static const struct net_device_ops stmmac_netdev_ops = {
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
.ndo_poll_controller = stmmac_poll_controller,
|
|
.ndo_poll_controller = stmmac_poll_controller,
|
|
#endif
|
|
#endif
|
|
- .ndo_set_mac_address = eth_mac_addr,
|
|
|
|
|
|
+ .ndo_set_mac_address = stmmac_set_mac_address,
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|