aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@free-electrons.com>2017-08-25 16:14:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-20 08:22:07 +0200
commit59b304fdff15cda0c95fdd83466c0f1fd5ab2621 (patch)
treeae505b18c95ba11b37993f21dd559238536863aa
parentudp6: set rx_dst_cookie on rx_dst updates (diff)
downloadlinux-stable-59b304fdff15cda0c95fdd83466c0f1fd5ab2621.tar.xz
linux-stable-59b304fdff15cda0c95fdd83466c0f1fd5ab2621.zip
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>
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 33c901622ed5..2ad48150b826 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -6465,7 +6465,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
struct resource *res;
const char *dt_mac_addr;
const char *mac_from;
- char hw_mac_addr[ETH_ALEN];
+ char hw_mac_addr[ETH_ALEN] = {0};
u32 id;
int features;
int phy_mode;