lede/package/kernel/mac80211/patches/ath9k/999-ath9k-fix-5.15.patch

19 lines
410 B
Diff

--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -646,11 +646,13 @@
ah->ah_flags &= ~AH_USE_EEPROM;
ah->ah_flags |= AH_NO_EEP_SWAP;
}
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
+ of_get_mac_address(np, common->macaddr);
+#else
mac = of_get_mac_address(np);
if (!IS_ERR(mac))
ether_addr_copy(common->macaddr, mac);
-
+#endif
return 0;
}