Skip to content

Commit fbbb153

Browse files
Salil Mehtadavem330
authored andcommitted
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>
1 parent 139e879 commit fbbb153

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,7 @@ static int hclge_configure(struct hclge_dev *hdev)
10631063
hdev->base_tqp_pid = 0;
10641064
hdev->rss_size_max = 1;
10651065
hdev->rx_buf_len = cfg.rx_buf_len;
1066-
for (i = 0; i < ETH_ALEN; i++)
1067-
hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i];
1066+
ether_addr_copy(hdev->hw.mac.mac_addr, cfg.mac_addr);
10681067
hdev->hw.mac.media_type = cfg.media_type;
10691068
hdev->hw.mac.phy_addr = cfg.phy_addr;
10701069
hdev->num_desc = cfg.tqp_desc_num;

0 commit comments

Comments
 (0)