aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-08-22 14:58:53 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-10-09 21:14:54 +0200
commit5ae2e786395c7f9db0167ebe875be5df9502d8d8 (patch)
tree21d888f47b626306af0842c9e325fa4208d3cdc9 /target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
parent46646efc38b496d95c87d1951aff21d2cff838d5 (diff)
downloadupstream-5ae2e786395c7f9db0167ebe875be5df9502d8d8.tar.gz
upstream-5ae2e786395c7f9db0167ebe875be5df9502d8d8.tar.bz2
upstream-5ae2e786395c7f9db0167ebe875be5df9502d8d8.zip
kernel: drop support for mtd-mac-address
Now that we have fully switched to nvmem interface we can drop the use of mtd-mac-address patches as it's not used anymore and the new nvmem implementation should be used for any new device. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch')
-rw-r--r--target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
index 02f7519f74..0cb96025cf 100644
--- a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
+++ b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
@@ -1,7 +1,7 @@
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
-@@ -141,6 +141,26 @@ static int of_get_mac_address_mtd(struct
- return -EINVAL;
+@@ -95,6 +95,27 @@ static int of_get_mac_addr_nvmem(struct
+ return 0;
}
+static int of_add_mac_address(struct device_node *np, u8* addr)
@@ -24,10 +24,11 @@
+ kfree(prop);
+ return -ENOMEM;
+}
-
++
/**
* Search the device tree for the best MAC address to use. 'mac-address' is
-@@ -216,6 +236,7 @@ found:
+ * checked first, because that is supposed to contain to "most recent" MAC
+@@ -161,6 +182,7 @@ found:
if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
addr[inc_idx] += mac_inc;