From d4a3d37441a3a17064eeebada09c30c264b44b23 Mon Sep 17 00:00:00 2001 From: Mikhail Pogorelov <43519305+artemyto@users.noreply.github.com> Date: Tue, 18 May 2021 12:22:39 +0300 Subject: [PATCH] Linux 5.12 compat: GRO_DROP --- 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 7b62215..e3099ae 100644 --- a/os_dep/linux/recv_linux.c +++ b/os_dep/linux/recv_linux.c @@ -355,7 +355,11 @@ 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_MERGED_FREE) +#else if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP) +#endif rx_ok = _TRUE; goto next; }