From 46bc04b3b4d1aa407617658235e60b409132fa77 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 21 Sep 2023 13:23:47 +0800 Subject: [PATCH] rtl8192eu: fix build for kernel 5.15 Signed-off-by: Tianling Shen --- package/kernel/rtl8192eu/Makefile | 2 +- .../rtl8192eu/patches/030-wireless-5.8.patch | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package/kernel/rtl8192eu/Makefile b/package/kernel/rtl8192eu/Makefile index a70e2f1037..4c2d6c0d7b 100644 --- a/package/kernel/rtl8192eu/Makefile +++ b/package/kernel/rtl8192eu/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rtl8192eu -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://github.com/Mange/rtl8192eu-linux-driver.git PKG_SOURCE_PROTO:=git diff --git a/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch b/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch index 46f8475b24..ffb64123e7 100644 --- a/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch +++ b/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch @@ -92,12 +92,15 @@ if (wdev->current_bss) { --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c -@@ -1673,7 +1673,7 @@ int rtw_os_ndev_register(_adapter *adapt - u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); - - #ifdef CONFIG_RTW_NAPI --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) +@@ -1676,7 +1676,10 @@ int rtw_os_ndev_register(_adapter *adapt + #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 +- netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT ++ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll ++#ifndef BUILD_OPENWRT ++ ,RTL_NAPI_WEIGHT ++#endif + #endif + ); + #endif /* CONFIG_RTW_NAPI */