ipq806x: NSS GMAC of get mac address fix
This commit is contained in:
		| @@ -0,0 +1,22 @@ | |||||||
|  | --- a/ipq806x/nss_gmac_ctrl.c | ||||||
|  | +++ b/ipq806x/nss_gmac_ctrl.c | ||||||
|  | @@ -957,7 +957,6 @@ static int32_t nss_gmac_of_get_pdata(str | ||||||
|  |  				     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 @@ static int32_t nss_gmac_of_get_pdata(str | ||||||
|  |  		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; | ||||||
		Reference in New Issue
	
	Block a user
	 ACwifidude
					ACwifidude