1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-20 07:38:28 +02:00

lantiq: replace random_ether_addr with eth_random_addr

Random_ether_addr() is a helper function which was kept for backward
compatibility. It is available in the kernel from version 3.6 to 5.16.
In newer kernel verions, it has been completely replaced by eth_random_addr().

There should be no functional changes.

Ref: ba530fea8c
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
This commit is contained in:
Aleksander Jan Bajkowski 2023-05-06 20:39:59 +02:00
parent 6892603efa
commit 37c3d6105c

View File

@ -127,7 +127,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+ if (!is_valid_ether_addr(athxk_eeprom_mac)) {
+ dev_warn(&pdev->dev, "using random mac\n");
+ random_ether_addr(athxk_eeprom_mac);
+ eth_random_addr(athxk_eeprom_mac);
+ }
+
+ if (!of_property_read_u32(np, "ath,mac-increment", &mac_inc))