[U-Boot] [PATCH v2 08/13] usb: gadget: ether: Provide a way to read MAC address
Marek Vasut
marex at denx.de
Tue Jun 13 14:06:07 UTC 2017
On 06/13/2017 02:10 PM, Vignesh R wrote:
> Provide a way to read MAC address for usb_ether device from board
> function. Board files can override board_set_usbnet_devaddr() to
> populate MAC address to be used by usb_ether as device address.
>
> Signed-off-by: Vignesh R <vigneshr at ti.com>
This patch is totally unrelated to this series. Moreover, just set
eth*addr using setenv() to achieve the same iirc .
> ---
> drivers/usb/gadget/ether.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
> index 4137d76c42af..8854e8eb004a 100644
> --- a/drivers/usb/gadget/ether.c
> +++ b/drivers/usb/gadget/ether.c
> @@ -2619,6 +2619,10 @@ int usb_eth_initialize(bd_t *bi)
> return 0;
> }
> #else
> +void __weak board_set_usbnet_devaddr(void)
> +{
> +}
> +
> static int usb_eth_start(struct udevice *dev)
> {
> struct ether_priv *priv = dev_get_priv(dev);
> @@ -2683,6 +2687,8 @@ static int usb_eth_probe(struct udevice *dev)
>
> priv->netdev = dev;
> l_priv = priv;
> + /* Get MAC address for USB ETH interface */
> + board_set_usbnet_devaddr();
>
> get_ether_addr(CONFIG_USBNET_DEVADDR, pdata->enetaddr);
> eth_setenv_enetaddr("usbnet_devaddr", pdata->enetaddr);
>
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list