openwrt/package/kernel/qca-nss-dp/patches/0017-nss-dp-use-proper-netdev-MAC-helpers.patch
Robert Marko 87b03d9961
kernel: qca-nss-dp: add kernel 6.1 support
Add the required changes for kernel 6.1 support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-28 08:57:08 +02:00

28 lines
927 B
Diff

From 704706969301076961c15423dedce9e2e6f1026e Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
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 <robimarko@gmail.com>
---
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);
}