diff options
author | Salil Mehta <salil.mehta@huawei.com> | 2017-09-19 18:17:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-20 01:06:49 +0200 |
commit | fbbb1536b220eb4f4f95cbceae6579489a8adad5 (patch) | |
tree | 2458edfe42da827f66f27d2e7021bcb3b18d6650 /drivers/net/ethernet/hisilicon | |
parent | net: hns3: Fixes the initialization of MAC address in hardware (diff) | |
download | linux-fbbb1536b220eb4f4f95cbceae6579489a8adad5.tar.xz linux-fbbb1536b220eb4f4f95cbceae6579489a8adad5.zip |
net: hns3: Fixes the ether address copy with appropriate API
This patch replaces the ethernet address copy instance with more
appropriate ether_addr_copy() function.
Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine &
Compatibility Layer Support")
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index eafd9c678162..8e172afd4876 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1063,8 +1063,7 @@ static int hclge_configure(struct hclge_dev *hdev) hdev->base_tqp_pid = 0; hdev->rss_size_max = 1; hdev->rx_buf_len = cfg.rx_buf_len; - for (i = 0; i < ETH_ALEN; i++) - hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i]; + ether_addr_copy(hdev->hw.mac.mac_addr, cfg.mac_addr); hdev->hw.mac.media_type = cfg.media_type; hdev->hw.mac.phy_addr = cfg.phy_addr; hdev->num_desc = cfg.tqp_desc_num; |