summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xircom
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-15 23:53:04 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-18 14:20:38 +0200
commit4abd7cffc09a38015fa14a22471e3de48a4ca032 (patch)
treeb6a0100f08a5de51263210934a6ce8f4fec1f4f0 /drivers/net/ethernet/xircom
parentocteontx2-nic: fix mixed module build (diff)
downloadlinux-4abd7cffc09a38015fa14a22471e3de48a4ca032.tar.xz
linux-4abd7cffc09a38015fa14a22471e3de48a4ca032.zip
ethernet: use eth_hw_addr_set() in unmaintained drivers
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@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xircom')
-rw-r--r--drivers/net/ethernet/xircom/xirc2ps_cs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c b/drivers/net/ethernet/xircom/xirc2ps_cs.c
index ab513dcc3b22..f9587e55b842 100644
--- a/drivers/net/ethernet/xircom/xirc2ps_cs.c
+++ b/drivers/net/ethernet/xircom/xirc2ps_cs.c
@@ -671,7 +671,6 @@ static int pcmcia_get_mac_ce(struct pcmcia_device *p_dev,
void *priv)
{
struct net_device *dev = priv;
- int i;
if (tuple->TupleDataLen != 13)
return -EINVAL;
@@ -679,8 +678,7 @@ static int pcmcia_get_mac_ce(struct pcmcia_device *p_dev,
(tuple->TupleData[2] != 6))
return -EINVAL;
/* another try (James Lehmer's CE2 version 4.1)*/
- for (i = 2; i < 6; i++)
- dev->dev_addr[i] = tuple->TupleData[i+2];
+ dev_addr_mod(dev, 2, &tuple->TupleData[2], 4);
return 0;
};
@@ -742,11 +740,9 @@ xirc2ps_config(struct pcmcia_device * link)
len = pcmcia_get_tuple(link, 0x89, &buf);
/* data layout looks like tuple 0x22 */
if (buf && len == 8) {
- if (*buf == CISTPL_FUNCE_LAN_NODE_ID) {
- int i;
- for (i = 2; i < 6; i++)
- dev->dev_addr[i] = buf[i+2];
- } else
+ if (*buf == CISTPL_FUNCE_LAN_NODE_ID)
+ dev_addr_mod(dev, 2, &buf[2], 4);
+ else
err = -1;
}
kfree(buf);