mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
qca-nss-gmac: fix of_get_mac_address
This commit is contained in:
parent
d0183630ee
commit
fdce1eab21
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=qca-nss-gmac
|
PKG_NAME:=qca-nss-gmac
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac
|
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
--- a/ipq806x/nss_gmac_ctrl.c
|
--- a/ipq806x/nss_gmac_ctrl.c
|
||||||
+++ b/ipq806x/nss_gmac_ctrl.c
|
+++ b/ipq806x/nss_gmac_ctrl.c
|
||||||
@@ -991,8 +991,8 @@
|
@@ -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);
|
pr_err("%s: Can't map interrupt\n", np->name);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
- maddr = (uint8_t *)of_get_mac_address(np);
|
- maddr = (uint8_t *)of_get_mac_address(np);
|
||||||
- if (!IS_ERR_OR_NULL(maddr))
|
- if (!IS_ERR_OR_NULL(maddr))
|
||||||
+ of_get_mac_address(np, netdev->dev_addr);
|
- memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN);
|
||||||
+ if (!is_valid_ether_addr(netdev->dev_addr))
|
+
|
||||||
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)
|
if (of_address_to_resource(np, 0, &memres_devtree) != 0)
|
||||||
|
return -EFAULT;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user