net: mvpp2: fix use of the random mac address for PPv2.2
commitd2a6e48e5254f653decc1612f3cbee3e5c8592c7
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Sat, 2 Sep 2017 09:06:48 +0000 (2 11:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 03:16:55 +0000 (3 20:16 -0700)
treed52f1ed6fc60bb1975dc50ffd9d5eb13aff64c7d
parent3ba8c81e15c11fc396d0b5d11adaf9db6ed39533
net: mvpp2: fix use of the random mac address for PPv2.2

The MAC retrieval logic is using a variable to store an h/w stored mac
address and checks this mac against invalid ones before using it. But
the mac address is only read from h/w when using PPv2.1. So when using
PPv2.2 it defaults to its init state.

This patches fixes the logic to only check if the h/w mac is valid when
actually retrieving a mac from h/w.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c