ipq806x: backport support for nvmem

This commit is contained in:
lean 2022-03-31 14:39:11 +08:00
parent 6371d6313d
commit bcbc73b584
2 changed files with 14 additions and 1 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-gmac
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac
PKG_SOURCE_PROTO:=git

View File

@ -0,0 +1,13 @@
--- a/ipq806x/nss_gmac_ctrl.c
+++ b/ipq806x/nss_gmac_ctrl.c
@@ -991,8 +991,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))
+ of_get_mac_address(np, netdev->dev_addr);
+ if (!is_valid_ether_addr(netdev->dev_addr))
memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN);
if (of_address_to_resource(np, 0, &memres_devtree) != 0)