[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3fsstd1f3.fsf@t19.piap.pl>
Date: Fri, 22 Oct 2021 08:22:08 +0200
From: Krzysztof Hałasa <khalasa@...p.pl>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 12/12] net: hldc_fr: use dev_addr_set()
Jakub Kicinski <kuba@...nel.org> writes:
> Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> of VLANs...") introduced a rbtree for faster Ethernet address look
> up. To maintain netdev->dev_addr in this tree we need to make all
> the writes to it got through appropriate helpers.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Acked-by: Krzysztof Hałasa <khalasa@...p.pl>
> --- a/drivers/net/wan/hdlc_fr.c
> +++ b/drivers/net/wan/hdlc_fr.c
> @@ -1093,7 +1093,9 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
> dev->priv_flags &= ~IFF_TX_SKB_SHARING;
> eth_hw_addr_random(dev);
> } else {
> - *(__be16 *)dev->dev_addr = htons(dlci);
> + __be16 addr = htons(dlci);
> +
> + dev_addr_set(dev, (u8 *)&addr);
> dlci_to_q922(dev->broadcast, dlci);
> }
> dev->netdev_ops = &pvc_ops;
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
Powered by blists - more mailing lists