Skip to content

Commit

Permalink
fix netif_napi_add Linux 6.1/6.3 execution issue (#321)
Browse files Browse the repository at this point in the history
* fix netif_napi_add Linux 6.1/6.3 compile issue
  • Loading branch information
troydm authored Jun 13, 2023
1 parent 528ae31 commit f2fc8af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions os_dep/linux/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1673,9 +1673,10 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);

#ifdef CONFIG_RTW_NAPI
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
, RTL_NAPI_WEIGHT
#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
#endif
);
#endif /* CONFIG_RTW_NAPI */
Expand Down

0 comments on commit f2fc8af

Please sign in to comment.