From 704706969301076961c15423dedce9e2e6f1026e Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 29 Sep 2022 20:39:07 +0200 Subject: [PATCH 16/16] nss-dp: use proper netdev MAC helpers mac_addr is const, so utilize proper helpers for setting random and desired MAC addres as old ones were dropped in newer kernels. Signed-off-by: Robert Marko --- nss_dp_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/nss_dp_main.c +++ b/nss_dp_main.c @@ -599,9 +599,9 @@ static int32_t nss_dp_of_get_pdata(struc ret = of_get_mac_address(np, maddr); if (!ret && is_valid_ether_addr(maddr)) { - ether_addr_copy(netdev->dev_addr, maddr); + eth_hw_addr_set(netdev, maddr); } else { - random_ether_addr(netdev->dev_addr); + eth_hw_addr_random(netdev); pr_info("GMAC%d(%px) Invalid MAC@ - using %pM\n", dp_priv->macid, dp_priv, netdev->dev_addr); }