]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: fix use of the random mac address for PPv2.2
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Sat, 2 Sep 2017 09:06:48 +0000 (11:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 03:16:55 +0000 (20:16 -0700)
commitd2b1d678e121db7bf8fb4b9b1f16ec0ea2950c3b
treed52f1ed6fc60bb1975dc50ffd9d5eb13aff64c7d
parentadae9cb0ef9e55c659329fb38577ad0311262bee
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