mac80211: fix complie with kernel 5.15

This commit is contained in:
lean 2022-02-26 19:08:42 +08:00
parent 3ea7ae24c6
commit 1c96c4ace0

View File

@ -0,0 +1,18 @@
--- 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;
}