lantiq: replace random_ether_addr with eth_random_addr
authorAleksander Jan Bajkowski <olek2@wp.pl>
Sat, 6 May 2023 18:39:59 +0000 (20:39 +0200)
committerAleksander Jan Bajkowski <olek2@wp.pl>
Sat, 10 Jun 2023 10:40:29 +0000 (12:40 +0200)
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: https://github.com/torvalds/linux/commit/ba530fea8ca1b57ee71d4e62f287a5d7ed92f789
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
target/linux/lantiq/patches-5.15/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch

index f7fbfdf9e42ef691fe4df25ce83c88c317602e4f..be0f0bfccd4699ac78387acd1eb80c2fe0626fc2 100644 (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))