net: mvpp2: fix the mac address used when using PPv2.2
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Fri, 25 Aug 2017 14:14:17 +0000 (16:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Sep 2017 06:22:07 +0000 (08:22 +0200)
commit59b304fdff15cda0c95fdd83466c0f1fd5ab2621
treeae505b18c95ba11b37993f21dd559238536863aa
parent38ca2d395e1cd24f205db3176c4ce9198f22576e
net: mvpp2: fix the mac address used when using PPv2.2

[ Upstream commit 4c22868264516fe0c42817a87f37efb44254e7a9 ]

The mac address is only retrieved from h/w when using PPv2.1. Otherwise
the variable holding it is still checked and used if it contains a valid
value. As the variable isn't initialized to an invalid mac address
value, we end up with random mac addresses which can be the same for all
the ports handled by this PPv2 driver.

Fixes this by initializing the h/w mac address variable to {0}, which is
an invalid mac address value. This way the random assignation fallback
is called and all ports end up with their own addresses.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Fixes: 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2.c