All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	chris@zankel.net, jcmvbkbc@gmail.com, geert@linux-m68k.org,
	linux-xtensa@linux-xtensa.org
Subject: [PATCH net-next 3/3] net: xtensa: use eth_hw_addr_set()
Date: Thu, 28 Oct 2021 19:47:07 -0700	[thread overview]
Message-ID: <20211029024707.316066-4-kuba@kernel.org> (raw)
In-Reply-To: <20211029024707.316066-1-kuba@kernel.org>

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 go through appropriate helpers.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: chris@zankel.net
CC: jcmvbkbc@gmail.com
CC: geert@linux-m68k.org
CC: linux-xtensa@linux-xtensa.org
---
 arch/xtensa/platforms/iss/network.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 8b806d305948..962e5e145209 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -124,7 +124,7 @@ static char *split_if_spec(char *str, ...)
 
 static void setup_etheraddr(struct net_device *dev, char *str)
 {
-	unsigned char *addr = dev->dev_addr;
+	u8 addr[ETH_ALEN];
 
 	if (str == NULL)
 		goto random;
@@ -147,6 +147,7 @@ static void setup_etheraddr(struct net_device *dev, char *str)
 	if (!is_local_ether_addr(addr))
 		pr_warn("%s: assigning a globally valid ethernet address\n",
 			dev->name);
+	eth_hw_addr_set(dev, addr);
 	return;
 
 random:
-- 
2.31.1


  parent reply	other threads:[~2021-10-29  2:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  2:47 [PATCH net-next 0/3] arch, misc: use eth_hw_addr_set() Jakub Kicinski
2021-10-29  2:47 ` [PATCH net-next 1/3] net: sgi-xp: " Jakub Kicinski
2021-10-29 15:57   ` Steve Wahl
2021-10-29  2:47 ` [PATCH net-next 2/3] net: um: " Jakub Kicinski
2021-10-29  2:47   ` Jakub Kicinski
2021-10-29  6:37   ` Anton Ivanov
2021-10-29  6:37     ` Anton Ivanov
2021-10-29  2:47 ` Jakub Kicinski [this message]
2021-10-29 12:30 ` [PATCH net-next 0/3] arch, misc: " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211029024707.316066-4-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.