diff options
author | Jan-Christoph Tebbe <jan-christoph.tebbe@ithinx.io> | 2020-03-16 17:51:51 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-03 11:47:47 -0400 |
commit | 740370282e0caa9fab1c5865fe9b9a58ac008c5f (patch) | |
tree | 8dc2e3aabb84207568a90301fea826f1f3843905 | |
parent | 9d15d1d1c24f6d3a2bcc7f35c706d8c76c2960b0 (diff) | |
download | u-boot-740370282e0caa9fab1c5865fe9b9a58ac008c5f.zip u-boot-740370282e0caa9fab1c5865fe9b9a58ac008c5f.tar.gz u-boot-740370282e0caa9fab1c5865fe9b9a58ac008c5f.tar.bz2 |
mach-snapdragon: Fix overwriting last digit of serial number
When generating the MAC address based on the boards serial number
the last digit was overwritten with the null termination. That way
boards with serial numbers close to each other would use the same
MAC address.
Signed-off-by: Jan-Christoph Tebbe <Jan-Christoph.Tebbe@ithinx.io>
-rw-r--r-- | arch/arm/mach-snapdragon/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-snapdragon/misc.c b/arch/arm/mach-snapdragon/misc.c index f6c8786..aaa561c 100644 --- a/arch/arm/mach-snapdragon/misc.c +++ b/arch/arm/mach-snapdragon/misc.c @@ -41,7 +41,7 @@ void msm_generate_mac_addr(u8 *mac) int i; char sn[9]; - snprintf(sn, 8, "%08x", msm_board_serial()); + snprintf(sn, 9, "%08x", msm_board_serial()); /* fill in the mac with serialno, use locally adminstrated pool */ mac[0] = 0x02; |