]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 18:24:52 +0000 (11:24 -0700)
commita0f8f0ef4fdec816a0e885dcba17d757dfaa2fe0
tree4e10747dc444ba8d8ad3cf7d2df15d17f1b5ec06
parent9b7a73ce1b3e7ee8e69979f9e0a1f7269b6773d5
net: mvpp2: fix the mac address used when using PPv2.2

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: 548249111fba ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c