Re: [PATCH] net: Set the actual ethaddr in register_preset_mac_address()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wadim,

On Tue, Jun 09, 2015 at 09:04:25AM +0200, Wadim Egorov wrote:
> Set the ethaddr for the current edev.
> 
> Signed-off-by: Wadim Egorov <w.egorov@xxxxxxxxx>
> ---
>  net/eth.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/eth.c b/net/eth.c
> index 89bddba..03e0a2e 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -49,6 +49,7 @@ static void register_preset_mac_address(struct eth_device *edev, const char *eth
>  	ethaddr_to_string(ethaddr, ethaddr_str);
>  
>  	if (is_valid_ether_addr(ethaddr)) {
> +		memcpy(edev->ethaddr, ethaddr, 6);
>  		dev_info(&edev->dev, "got preset MAC address: %s\n", ethaddr_str);
>  		dev_set_param(&edev->dev, "ethaddr", ethaddr_str);
>  	}

In which case is this necessary? Normally a dev_set_param on "ethaddr"
should already set edev->ethaddr, there should be no need to copy this
manually.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux