]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: fix incorrect mac address assignment
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 22 Nov 2021 21:35:33 +0000 (22:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2021 12:12:37 +0000 (12:12 +0000)
commitec69e4c3b45770357e3060ac0c8eae4da6bc2558
treeb4e8142ddeee16769170103cda3d71964145267f
parent1bc221c3d821c3a2a23c25b63f20c949a2383a8f
r8169: fix incorrect mac address assignment

The original changes brakes MAC address assignment on older chip
versions (see bug report [0]), and it brakes random MAC assignment.

is_valid_ether_addr() requires that its argument is word-aligned.
Add the missing alignment to array mac_addr.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=215087

Fixes: 9c4bf1ab2cab ("ethernet: r8169: use eth_hw_addr_set()")
Reported-by: Richard Herbert <rherbert@sympatico.ca>
Tested-by: Richard Herbert <rherbert@sympatico.ca>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c