ath10k-ct: add linux kernel v6.1 api update

This commit is contained in:
coolsnowwolf 2022-12-28 18:22:03 +08:00
parent cc75f3926f
commit 8b05e418a2

View File

@ -0,0 +1,29 @@
--- a/ath10k-5.15/core.c
+++ b/ath10k-5.15/core.c
@@ -4151,7 +4151,11 @@
ath10k_debug_print_board_info(ar);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
+#else
+ device_get_mac_address(ar->dev, ar->mac_addr);
+#endif
/* Try to get mac address from device node (from nvmem cell) */
of_get_mac_address(ar->dev->of_node, ar->mac_addr);
--- a/ath10k-5.15/pci.c
+++ b/ath10k-5.15/pci.c
@@ -3563,8 +3563,12 @@
void ath10k_pci_init_napi(struct ath10k *ar)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll,
ATH10K_NAPI_BUDGET);
+#else
+ netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
+#endif
}
static int ath10k_pci_init_irq(struct ath10k *ar)