summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4vf
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-01 23:32:25 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-02 15:18:25 +0200
commit47d71f45902ea4a870174b72b66fd82b7248854d (patch)
treeaf33cd0d58d699ddba7d164ef731006d03824db4 /drivers/net/ethernet/chelsio/cxgb4vf
parentnet: usb: use eth_hw_addr_set() instead of ether_addr_copy() (diff)
downloadlinux-47d71f45902ea4a870174b72b66fd82b7248854d.tar.xz
linux-47d71f45902ea4a870174b72b66fd82b7248854d.zip
ethernet: chelsio: use eth_hw_addr_set()
Convert chelsio drivers from memcpy() and ether_addr_copy() to eth_hw_addr_set(). They lack includes. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/adapter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
index f55105a4112f..03cb1410d6fc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
@@ -40,6 +40,7 @@
#ifndef __CXGB4VF_ADAPTER_H__
#define __CXGB4VF_ADAPTER_H__
+#include <linux/etherdevice.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
@@ -507,7 +508,7 @@ static inline const char *port_name(struct adapter *adapter, int pidx)
static inline void t4_os_set_hw_addr(struct adapter *adapter, int pidx,
u8 hw_addr[])
{
- memcpy(adapter->port[pidx]->dev_addr, hw_addr, ETH_ALEN);
+ eth_hw_addr_set(adapter->port[pidx], hw_addr);
}
/**