]> 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)
commit5498092744715660d46af7aa6b8ce00f06a5926b
treeb4e8142ddeee16769170103cda3d71964145267f
parentf9b0344ba680095e8e25bad6f09295ec21eb6a92
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: ec09655ee34a ("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