From 8b05e418a2fe5f5369be177d2acb311597cd67b8 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 28 Dec 2022 18:22:03 +0800 Subject: [PATCH] ath10k-ct: add linux kernel v6.1 api update --- .../ath10k-ct/patches/100-api_update.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/kernel/ath10k-ct/patches/100-api_update.patch diff --git a/package/kernel/ath10k-ct/patches/100-api_update.patch b/package/kernel/ath10k-ct/patches/100-api_update.patch new file mode 100644 index 000000000..beb7836cf --- /dev/null +++ b/package/kernel/ath10k-ct/patches/100-api_update.patch @@ -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)