diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-11-04 14:36:50 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-11-15 00:38:45 +0100 |
commit | 63ce6fcd2093a3503044d51f7a025bf8b0a8260f (patch) | |
tree | b08d21ad62b53d08f7515e39b4c3ffa57e49dfda /target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch | |
parent | c9536520bdc2dccd88316fb889f65c0331a080ad (diff) | |
download | upstream-63ce6fcd2093a3503044d51f7a025bf8b0a8260f.tar.gz upstream-63ce6fcd2093a3503044d51f7a025bf8b0a8260f.tar.bz2 upstream-63ce6fcd2093a3503044d51f7a025bf8b0a8260f.zip |
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 <ptpt52@gmail.com>
Fixes: d284e6ef0f06 ("treewide: convert mtd-mac-address-increment* to generic implementation")
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.patch | 6 |
1 files changed, 3 insertions, 3 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 0cb96025cf..03cd763d9d 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 @@ -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 -@@ -161,6 +182,7 @@ found: - if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) - addr[inc_idx] += mac_inc; +@@ -171,6 +192,7 @@ found: + addr[5] = (mac_val >> 0) & 0xff; + } + of_add_mac_address(np, addr); return ret; |