forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
package/qca/nss/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
--- a/ipq806x/nss_gmac_ctrl.c | ||
+++ b/ipq806x/nss_gmac_ctrl.c | ||
@@ -992,7 +992,7 @@ static int32_t nss_gmac_of_get_pdata(str | ||
@@ -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); | ||
- maddr = (uint8_t *)of_get_mac_address(np); | ||
- if (maddr) | ||
+ if (!IS_ERR_OR_NULL(maddr)) | ||
memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN); | ||
- 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; |
23 changes: 0 additions & 23 deletions
23
package/qca/nss/qca-nss-gmac/patches/102-nss-gmac-nvmem.patch
This file was deleted.
Oops, something went wrong.