2020-07-09 06:49:44

by Xu Wang

[permalink] [raw]
Subject: [PATCH] net: enetc: use eth_broadcast_addr() to assign broadcast

This patch is to use eth_broadcast_addr() to assign broadcast address
insetad of memset().

Signed-off-by: Xu Wang <[email protected]>
---
drivers/net/ethernet/freescale/enetc/enetc_qos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_qos.c b/drivers/net/ethernet/freescale/enetc/enetc_qos.c
index fd3df19eaa32..6fc0c275306f 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_qos.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_qos.c
@@ -487,7 +487,7 @@ static int enetc_streamid_hw_set(struct enetc_ndev_priv *priv,

cbd.addr[0] = lower_32_bits(dma);
cbd.addr[1] = upper_32_bits(dma);
- memset(si_data->dmac, 0xff, ETH_ALEN);
+ eth_broadcast_addr(si_data->dmac);
si_data->vid_vidm_tg =
cpu_to_le16(ENETC_CBDR_SID_VID_MASK
+ ((0x3 << 14) | ENETC_CBDR_SID_VIDM));
--
2.17.1


2020-07-09 19:34:33

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: enetc: use eth_broadcast_addr() to assign broadcast

From: Xu Wang <[email protected]>
Date: Thu, 9 Jul 2020 06:48:55 +0000

> This patch is to use eth_broadcast_addr() to assign broadcast address
> insetad of memset().
>
> Signed-off-by: Xu Wang <[email protected]>

Applied to net-next, thanks.