Commit fbbb1536 authored by Salil Mehta's avatar Salil Mehta Committed by David S. Miller

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: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 139e8792
...@@ -1063,8 +1063,7 @@ static int hclge_configure(struct hclge_dev *hdev) ...@@ -1063,8 +1063,7 @@ static int hclge_configure(struct hclge_dev *hdev)
hdev->base_tqp_pid = 0; hdev->base_tqp_pid = 0;
hdev->rss_size_max = 1; hdev->rss_size_max = 1;
hdev->rx_buf_len = cfg.rx_buf_len; hdev->rx_buf_len = cfg.rx_buf_len;
for (i = 0; i < ETH_ALEN; i++) ether_addr_copy(hdev->hw.mac.mac_addr, cfg.mac_addr);
hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i];
hdev->hw.mac.media_type = cfg.media_type; hdev->hw.mac.media_type = cfg.media_type;
hdev->hw.mac.phy_addr = cfg.phy_addr; hdev->hw.mac.phy_addr = cfg.phy_addr;
hdev->num_desc = cfg.tqp_desc_num; hdev->num_desc = cfg.tqp_desc_num;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment