diff options
author | Albert Aribaud <albert.aribaud@free.fr> | 2010-07-12 11:03:33 +0200 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2010-07-12 23:38:25 -0700 |
commit | c67e2ccd5045d7f1dff7eac3ac9007bb4bfa9794 (patch) | |
tree | 41ee3ba3fa21453338b02e37f519b02b97b14af5 | |
parent | 836cd453583627cbef784bd4d7963109d5914bde (diff) | |
download | u-boot-imx-c67e2ccd5045d7f1dff7eac3ac9007bb4bfa9794.zip u-boot-imx-c67e2ccd5045d7f1dff7eac3ac9007bb4bfa9794.tar.gz u-boot-imx-c67e2ccd5045d7f1dff7eac3ac9007bb4bfa9794.tar.bz2 |
kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION
This configuration option allows SoCs without random
generation capability to fill in local MACs with a fixed
rather than random value
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r-- | drivers/net/kirkwood_egiga.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c index dca9f11..7aabcef 100644 --- a/drivers/net/kirkwood_egiga.c +++ b/drivers/net/kirkwood_egiga.c @@ -699,13 +699,21 @@ int kirkwood_egiga_initialize(bd_t * bis) } while (!eth_getenv_enetaddr(s, dev->enetaddr)) { - /* Generate Random Private MAC addr if not set */ + /* Generate Private MAC addr if not set */ dev->enetaddr[0] = 0x02; dev->enetaddr[1] = 0x50; dev->enetaddr[2] = 0x43; +#if defined (CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION) + /* Generate fixed lower MAC half using devnum */ + dev->enetaddr[3] = 0; + dev->enetaddr[4] = 0; + dev->enetaddr[5] = devnum; +#else + /* Generate random lower MAC half */ dev->enetaddr[3] = get_random_hex(); dev->enetaddr[4] = get_random_hex(); dev->enetaddr[5] = get_random_hex(); +#endif eth_setenv_enetaddr(s, dev->enetaddr); } |