]> Git Repo - J-u-boot.git/commit
net: make net_random_ethaddr() more random
authorMichael Walle <[email protected]>
Tue, 27 Aug 2019 08:13:52 +0000 (10:13 +0200)
committerJoe Hershberger <[email protected]>
Wed, 4 Sep 2019 16:37:19 +0000 (11:37 -0500)
commit12c2a310e87d4eacfd669346338e856cb3ad54c2
tree5d9962b295fb126a6ebed0d04d67c61f7c3daecc
parent5ccd657b6d6cdf2378b98f6b71a2a5a22d8f4d50
net: make net_random_ethaddr() more random

The net_random_ethaddr() tries to get some entropy from different
startup times of a board. The seed is initialized with get_timer() which
has only a granularity of milliseconds. We can do better if we use
get_ticks() which returns the raw timer ticks. Using this we have a
higher chance of getting different values at startup.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
include/net.h
This page took 0.027147 seconds and 4 git commands to generate.