net: introduce per device index
Instead of counting the device index everytime a functions needs it, store
it in the eth_device struct. eth_register() keeps track of the indices and
updates the device's index number. This simplifies some functions in
net/eth.c.
Additionally, a network driver can now query its index, eg. to get the
correct environment ethaddr name.
Signed-off-by: Michael Walle <[email protected]>
Cc: Prafulla Wadaskar <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Wolfgang Denk <[email protected]>
Acked-by: Mike Frysinger <[email protected]>