lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a12f593a-a9e4-44bf-1740-92303ceb1dc3@linux.ibm.com>
Date:   Mon, 15 Nov 2021 13:19:49 +0200
From:   Julian Wiedmann <jwi@...ux.ibm.com>
To:     Clément Léger <clement.leger@...tlin.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v2 1/6] net: ocelot: add support to get port mac from
 device-tree

On 03.11.21 11:19, Clément Léger wrote:
> Add support to get mac from device-tree using of_get_mac_address.
> 
> Signed-off-by: Clément Léger <clement.leger@...tlin.com>
> ---
>  drivers/net/ethernet/mscc/ocelot_net.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
> index eaeba60b1bba..d76def435b23 100644
> --- a/drivers/net/ethernet/mscc/ocelot_net.c
> +++ b/drivers/net/ethernet/mscc/ocelot_net.c
> @@ -1704,7 +1704,10 @@ int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,
>  		NETIF_F_HW_TC;
>  	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC;
>  
> -	eth_hw_addr_gen(dev, ocelot->base_mac, port);
> +	err = of_get_mac_address(portnp, dev->dev_addr);

of_get_ethdev_address() maybe, so that this gets routed through Jakub's fancy
new eth_hw_addr_set() infrastructure?

> +	if (err)
> +		eth_hw_addr_gen(dev, ocelot->base_mac, port);
> +
>  	ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr,
>  			  OCELOT_VLAN_UNAWARE_PVID, ENTRYTYPE_LOCKED);
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ