--- xradio-20230124/main.c.orig 2023-01-24 21:21:31.309279511 +0100 +++ xradio-20230124/main.c 2023-01-26 19:22:17.438993808 +0100 @@ -539,6 +539,13 @@ } #endif + if(memcmp(addr,"\x12\x34\x56\x78\x9a\xbc",6)==0) + { + // Default address in device tree, make it random to + // avoid MAC duplication if xr819 used in the same network + dev_warn(hw_priv->pdev, "default mac address in device tree, using random\n"); + eth_random_addr(addr); + } memcpy(hw_priv->addresses[0].addr, addr, ETH_ALEN); memcpy(hw_priv->addresses[1].addr, addr, ETH_ALEN); hw_priv->addresses[1].addr[5] += 0x01;