cmd: net: add a 'net list' command to list network devs
authorTim Harvey <tharvey@gateworks.com>
Fri, 18 Jun 2021 22:26:21 +0000 (15:26 -0700)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 6 Jul 2021 02:22:41 +0000 (05:22 +0300)
commit8a3987f47ad749fc2e37687bab6a049d92fe42e8
treea9aa2c05b36f684f15a95a18e071964c5485a89e
parent3ef2050a6a121d9b3cb3490695c8f863b72095e9
cmd: net: add a 'net list' command to list network devs

In a system with multiple network controllers it can be difficult
to know the names of the various devices available. This is especially
true for USB ether devices as they do not display device names upon
detection.

This is being added as a net sub-system in case other commands may
want to be added or moved here.

Note that this is only enabled for DM_ETH

Example:
U-Boot > net
net - NET sub-system

Usage:
net list - list available devices

U-Boot > net list
eth0 : ethernet@2188000 00:d0:12:98:f5:47 active
eth1 : e1000#0 00:d0:12:98:f5:48
eth2 : asix_eth 8c:ae:4c:f5:84:9d
eth3 : asix_eth 8c:ae:4c:f9:41:e3

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
cmd/net.c