From 51df588b77cb3d8f675103b93b8e2f8f5b6e9310 Mon Sep 17 00:00:00 2001 From: ivanovborislav <81085106+ivanovborislav@users.noreply.github.com> Date: Sun, 22 Jan 2023 10:09:14 +0200 Subject: [PATCH] Add Kernel 6.2 support --- os_dep/linux/os_intfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 1246e04..ab147a4 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -2154,7 +2154,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name) u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); #ifdef CONFIG_RTW_NAPI +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) + netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); +#else netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); +#endif #endif /* CONFIG_RTW_NAPI */ #if defined(CONFIG_IOCTL_CFG80211)