mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 01:56:57 +07:00
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: 2697582144
("net: mvpp2: handle misc PPv2.1/PPv2.2 differences")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3b638f0f0b
commit
4c22868264
@ -6504,7 +6504,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;
|
||||
|
Loading…
Reference in New Issue
Block a user