]> git.baikalelectronics.ru Git - kernel.git/commit
net: pxa168_eth: rework the MAC address setup
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Tue, 30 Sep 2014 14:28:12 +0000 (16:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 20:36:13 +0000 (16:36 -0400)
commit2da438fe3d52ad57cf6f4a2b5715ae3ac3841e10
tree49dae18b27e37cc6d661423ac4f64e8931669dd9
parentaa21ecff186f71575651e59d366739290915164e
net: pxa168_eth: rework the MAC address setup

This patch rework the way the MAC address is retrieved. The MAC address
can now, in addition to being random, be set in the device tree or
retrieved from the Ethernet controller MAC address registers. The
probing function will try to get a MAC address in the following order:
- From the device tree.
- From the Ethernet controller MAC address registers.
- Generate a random one.

This patch also adds a function to read the MAC address from the
Ethernet Controller registers.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c