mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
23 lines
665 B
Diff
23 lines
665 B
Diff
--- a/ipq806x/nss_gmac_ctrl.c
|
|
+++ b/ipq806x/nss_gmac_ctrl.c
|
|
@@ -957,7 +957,6 @@
|
|
struct net_device *netdev,
|
|
struct msm_nss_gmac_platform_data *gmaccfg)
|
|
{
|
|
- uint8_t *maddr = NULL;
|
|
struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev);
|
|
struct resource memres_devtree = {0};
|
|
|
|
@@ -991,9 +990,8 @@
|
|
pr_err("%s: Can't map interrupt\n", np->name);
|
|
return -EFAULT;
|
|
}
|
|
- maddr = (uint8_t *)of_get_mac_address(np);
|
|
- if (!IS_ERR_OR_NULL(maddr))
|
|
- memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN);
|
|
+
|
|
+ of_get_mac_address(np, gmaccfg->mac_addr);
|
|
|
|
if (of_address_to_resource(np, 0, &memres_devtree) != 0)
|
|
return -EFAULT;
|
|
|