patches for kernels 5.12 and 5.15

This commit is contained in:
morrownr 2021-11-07 15:52:30 -06:00
parent 003e0d4043
commit 7e1c933b11
2 changed files with 13 additions and 264 deletions

File diff suppressed because it is too large Load Diff

View File

@ -405,7 +405,11 @@ static int napi_recv(_adapter *padapter, int budget)
So, we should prevent cloned SKB go into napi_gro_receive. So, we should prevent cloned SKB go into napi_gro_receive.
*/ */
if (pregistrypriv->en_gro && !skb_cloned(pskb)) { if (pregistrypriv->en_gro && !skb_cloned(pskb)) {
#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) if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
#endif
rx_ok = _TRUE; rx_ok = _TRUE;
goto next; goto next;
} }