From a2ade7655fde4d688bc2576f5ca502274879ce6c Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Sun, 2 May 2021 10:46:25 +0200 Subject: [PATCH] RTL8812AU: Fix building with 5.12 --- ...Fix-GRO_DROP-deprecation-kernel-5-12.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/linux-drivers/RTL8812AU/patches/Fix-GRO_DROP-deprecation-kernel-5-12.patch diff --git a/packages/linux-drivers/RTL8812AU/patches/Fix-GRO_DROP-deprecation-kernel-5-12.patch b/packages/linux-drivers/RTL8812AU/patches/Fix-GRO_DROP-deprecation-kernel-5-12.patch new file mode 100644 index 0000000000..c544a07ec7 --- /dev/null +++ b/packages/linux-drivers/RTL8812AU/patches/Fix-GRO_DROP-deprecation-kernel-5-12.patch @@ -0,0 +1,26 @@ +From e7e83f2593c9e67e3ee50d032f1ad39fe47ea81d Mon Sep 17 00:00:00 2001 +From: Carlos +Date: Sat, 3 Apr 2021 14:38:14 +0000 +Subject: [PATCH] Fix GRO_DROP deprecation kernel 5.12 + +--- + os_dep/linux/recv_linux.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/os_dep/linux/recv_linux.c b/os_dep/linux/recv_linux.c +index 2f7b3e37..7fecc843 100644 +--- a/os_dep/linux/recv_linux.c ++++ b/os_dep/linux/recv_linux.c +@@ -355,8 +355,12 @@ static int napi_recv(_adapter *padapter, int budget) + + #ifdef CONFIG_RTW_GRO + if (pregistrypriv->en_gro) { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) + if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP) + rx_ok = _TRUE; ++#else ++ rx_ok = _TRUE; ++#endif + goto next; + } + #endif /* CONFIG_RTW_GRO */