• Mark Starovoytov's avatar
    net: atlantic: unify MAC generation · b4de6c49
    Mark Starovoytov authored
    This patch unifies invalid MAC address handling with other drivers.
    
    Basically we've switched to using standard APIs (is_valid_ether_addr /
    eth_hw_addr_random) where possible.
    It's worth noting that some of engineering Aquantia NICs might be
    provisioned with a partially zeroed out MAC, which is still invalid,
    but not caught by is_valid_ether_addr(), so we've added a special
    handling for this case.
    
    Also adding a warning in case of fallback to random MAC, because
    this shouldn't be needed on production NICs, they should all be
    provisioned with unique MAC.
    
    NB! Default systemd/udevd configuration is 'MACAddressPolicy=persistent'.
        This causes MAC address to be persisted across driver reloads and
        reboots. We had to change it to 'none' for verification purposes.
    Signed-off-by: default avatarMark Starovoytov <mstarovoitov@marvell.com>
    Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    b4de6c49
aq_nic.c 30.2 KB