summaryrefslogtreecommitdiff
path: root/net/atm/lec.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-23 02:21:03 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-24 15:59:45 +0300
commitd6b3daf24e7514c043404cb142f96c83c735cbb2 (patch)
treeb7e4ff091b5c7db7414836130eb771b0d03b5a60 /net/atm/lec.c
parent8bc7823ed3bd5b87765e1b3d6f72c69624680921 (diff)
downloadlinux-d6b3daf24e7514c043404cb142f96c83c735cbb2.tar.xz
net: atm: use address setting helpers
Get it ready for constant netdev->dev_addr. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 8eaea4a4bbd6..6257bf12e5a0 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -340,12 +340,12 @@ static int lec_close(struct net_device *dev)
static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
{
+ static const u8 zero_addr[ETH_ALEN] = {};
unsigned long flags;
struct net_device *dev = (struct net_device *)vcc->proto_data;
struct lec_priv *priv = netdev_priv(dev);
struct atmlec_msg *mesg;
struct lec_arp_table *entry;
- int i;
char *tmp; /* FIXME */
WARN_ON(refcount_sub_and_test(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc));
@@ -358,8 +358,7 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
eth_hw_addr_set(dev, mesg->content.normal.mac_addr);
break;
case l_del_mac_addr:
- for (i = 0; i < 6; i++)
- dev->dev_addr[i] = 0;
+ eth_hw_addr_set(dev, zero_addr);
break;
case l_addr_delete:
lec_addr_delete(priv, mesg->content.normal.atm_addr,