Skip to content

Commit

Permalink
Merge pull request #218 from tomaspinho/fix-5.12
Browse files Browse the repository at this point in the history
Fix compilation for Linux 5.12
  • Loading branch information
tomaspinho authored Mar 21, 2021
2 parents 7a11dc9 + cac892e commit 897e7c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:latest AS build

ENV KVER=5.10.0-051000rc2-generic
ARG URL_LINUX_HEADERS=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc2/amd64/linux-headers-5.10.0-051000rc2_5.10.0-051000rc2.202011012330_all.deb
ARG URL_LINUX_HEADERS_GENERIC=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc2/amd64/linux-headers-5.10.0-051000rc2-generic_5.10.0-051000rc2.202011012330_amd64.deb
ARG URL_LINUX_MODULES=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc2/amd64/linux-modules-5.10.0-051000rc2-generic_5.10.0-051000rc2.202011012330_amd64.deb
ARG URL_LINUX_IMAGE=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc2/amd64/linux-image-unsigned-5.10.0-051000rc2-generic_5.10.0-051000rc2.202011012330_amd64.deb
ENV KVER=5.12.0-051200rc2-generic
ARG URL_LINUX_HEADERS=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc2/amd64/linux-headers-5.12.0-051200rc2_5.12.0-051200rc2.202103052202_all.deb
ARG URL_LINUX_HEADERS_GENERIC=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc2/amd64/linux-headers-5.12.0-051200rc2-generic_5.12.0-051200rc2.202103052202_amd64.deb
ARG URL_LINUX_MODULES=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc2/amd64/linux-modules-5.12.0-051200rc2-generic_5.12.0-051200rc2.202103052202_amd64.deb
ARG URL_LINUX_IMAGE=https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc2/amd64/linux-image-unsigned-5.12.0-051200rc2-generic_5.12.0-051200rc2.202103052202_amd64.deb

ENV WORKDIR /build/

Expand Down
6 changes: 3 additions & 3 deletions os_dep/linux/recv_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static int napi_recv(_adapter *padapter, int budget)

rx_ok = _FALSE;

#ifdef CONFIG_RTW_GRO
#if defined(CONFIG_RTW_GRO) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
if (pregistrypriv->en_gro) {
if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
rx_ok = _TRUE;
Expand Down Expand Up @@ -404,7 +404,7 @@ void dynamic_napi_th_chk (_adapter *adapter)
if (adapter->registrypriv.en_napi) {
struct dvobj_priv *dvobj;
struct registry_priv *registry;

dvobj = adapter_to_dvobj(adapter);
registry = &adapter->registrypriv;
if (dvobj->traffic_stat.cur_rx_tp > registry->napi_threshold)
Expand Down Expand Up @@ -515,7 +515,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
#ifdef CONFIG_RTW_NAPI
#ifdef CONFIG_RTW_NAPI_DYNAMIC
if (!skb_queue_empty(&precvpriv->rx_napi_skb_queue)
&& !adapter_to_dvobj(padapter)->en_napi_dynamic
&& !adapter_to_dvobj(padapter)->en_napi_dynamic
)
napi_recv(padapter, RTL_NAPI_WEIGHT);
#endif
Expand Down

0 comments on commit 897e7c4

Please sign in to comment.