* [PATCH net-next] stmmac: copy unicast mac address to MAC registers
@ 2017-10-27 2:52 Bhadram Varka
2017-10-28 10:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Bhadram Varka @ 2017-10-27 2:52 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: peppe.cavallaro, alexandre.torgue, Bhadram Varka
Currently stmmac driver not copying the valid ethernet
MAC address to MAC registers. This patch takes care
of updating the MAC register with MAC address.
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 0e1b0a3..e0e6348 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3748,6 +3748,20 @@ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
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
static struct dentry *stmmac_fs_dir;
@@ -3975,7 +3989,7 @@ static const struct net_device_ops stmmac_netdev_ops = {
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = stmmac_poll_controller,
#endif
- .ndo_set_mac_address = eth_mac_addr,
+ .ndo_set_mac_address = stmmac_set_mac_address,
};
/**
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] stmmac: copy unicast mac address to MAC registers
2017-10-27 2:52 [PATCH net-next] stmmac: copy unicast mac address to MAC registers Bhadram Varka
@ 2017-10-28 10:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-10-28 10:04 UTC (permalink / raw)
To: vbhadram; +Cc: netdev, linux-kernel, peppe.cavallaro, alexandre.torgue
From: Bhadram Varka <vbhadram@nvidia.com>
Date: Fri, 27 Oct 2017 08:22:02 +0530
> Currently stmmac driver not copying the valid ethernet
> MAC address to MAC registers. This patch takes care
> of updating the MAC register with MAC address.
>
> Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-28 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27 2:52 [PATCH net-next] stmmac: copy unicast mac address to MAC registers Bhadram Varka
2017-10-28 10:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome