From 63ce6fcd2093a3503044d51f7a025bf8b0a8260f Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Thu, 4 Nov 2021 14:36:50 +0100 Subject: kernel: fix mac-address-increment patch Fix mac address increment patch. Permit to overflow to the next byte and correctly calculate the incremented mac. Reported-by: Chen Minqiang Fixes: d284e6ef0f06 ("treewide: convert mtd-mac-address-increment* to generic implementation") Signed-off-by: Ansuel Smith --- .../generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch') diff --git a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch index 78514dd9e3..448084b821 100644 --- a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch +++ b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch @@ -28,9 +28,9 @@ /** * Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC -@@ -155,6 +176,7 @@ found: - if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) - addr[inc_idx] += mac_inc; +@@ -165,6 +186,7 @@ found: + addr[5] = (mac_val >> 0) & 0xff; + } + of_add_mac_address(np, addr); return ret; -- cgit v1.2.3