All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Waldekranz <tobias@waldekranz.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com,
	olteanv@gmail.com, netdev@vger.kernel.org
Subject: [PATCH v3 net-next 5/8] net: dsa: mv88e6xxx: Use standard helper for broadcast address
Date: Thu, 18 Mar 2021 20:25:37 +0100	[thread overview]
Message-ID: <20210318192540.895062-6-tobias@waldekranz.com> (raw)
In-Reply-To: <20210318192540.895062-1-tobias@waldekranz.com>

Use the conventional declaration style of a MAC address in the
kernel (u8 addr[ETH_ALEN]) for the broadcast address, then set it
using the existing helper.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index c18c55e1617e..17578f774683 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1968,8 +1968,10 @@ static int mv88e6xxx_set_rxnfc(struct dsa_switch *ds, int port,
 static int mv88e6xxx_port_add_broadcast(struct mv88e6xxx_chip *chip, int port,
 					u16 vid)
 {
-	const char broadcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 	u8 state = MV88E6XXX_G1_ATU_DATA_STATE_MC_STATIC;
+	u8 broadcast[ETH_ALEN];
+
+	eth_broadcast_addr(broadcast);
 
 	return mv88e6xxx_port_db_load_purge(chip, port, broadcast, vid, state);
 }
-- 
2.25.1


  parent reply	other threads:[~2021-03-18 19:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 19:25 [PATCH v3 net-next 0/8] net: dsa: mv88e6xxx: Offload bridge port flags Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 1/8] net: dsa: Add helper to resolve bridge port from DSA port Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 2/8] net: dsa: mv88e6xxx: Avoid useless attempts to fast-age LAGs Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 3/8] net: dsa: mv88e6xxx: Provide generic VTU iterator Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 4/8] net: dsa: mv88e6xxx: Remove some bureaucracy around querying the VTU Tobias Waldekranz
2021-03-18 19:25 ` Tobias Waldekranz [this message]
2021-03-18 19:25 ` [PATCH v3 net-next 6/8] net: dsa: mv88e6xxx: Flood all traffic classes on standalone ports Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 7/8] net: dsa: mv88e6xxx: Offload bridge learning flag Tobias Waldekranz
2021-03-18 19:25 ` [PATCH v3 net-next 8/8] net: dsa: mv88e6xxx: Offload bridge broadcast flooding flag Tobias Waldekranz
2021-03-23 10:45 ` [PATCH v3 net-next 0/8] net: dsa: mv88e6xxx: Offload bridge port flags Tobias Waldekranz
2021-03-23 10:52   ` Vladimir Oltean
2021-03-23 11:03     ` Tobias Waldekranz

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=20210318192540.895062-6-tobias@waldekranz.com \
    --to=tobias@waldekranz.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /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.