mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix
This commit is contained in:
parent
e4955a3c0b
commit
00f51ecf79
114 changed files with 12104 additions and 0 deletions
25
qaa/nss/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch
Normal file
25
qaa/nss/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
--- a/ipq806x/nss_gmac_ctrl.c
|
||||
+++ b/ipq806x/nss_gmac_ctrl.c
|
||||
@@ -957,7 +957,8 @@ static int32_t nss_gmac_of_get_pdata(struct device_node *np,
|
||||
struct net_device *netdev,
|
||||
struct msm_nss_gmac_platform_data *gmaccfg)
|
||||
{
|
||||
- uint8_t *maddr = NULL;
|
||||
+ int ret;
|
||||
+ u8 maddr[ETH_ALEN];
|
||||
struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev);
|
||||
struct resource memres_devtree = {0};
|
||||
|
||||
@@ -991,9 +992,9 @@ static int32_t nss_gmac_of_get_pdata(struct device_node *np,
|
||||
pr_err("%s: Can't map interrupt\n", np->name);
|
||||
return -EFAULT;
|
||||
}
|
||||
- maddr = (uint8_t *)of_get_mac_address(np);
|
||||
- if (maddr)
|
||||
- memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN);
|
||||
+ ret = of_get_mac_address(np, maddr);
|
||||
+ if (!ret && is_valid_ether_addr(maddr))
|
||||
+ ether_addr_copy(gmaccfg->mac_addr, maddr);
|
||||
|
||||
if (of_address_to_resource(np, 0, &memres_devtree) != 0)
|
||||
return -EFAULT;
|
||||
Loading…
Add table
Add a link
Reference in a new issue