diff --git a/drivers/net/can/mttcan/native/m_ttcan_linux.c b/drivers/net/can/mttcan/native/m_ttcan_linux.c index 47f2e4a4..dbb5b806 100644 --- a/drivers/net/can/mttcan/native/m_ttcan_linux.c +++ b/drivers/net/can/mttcan/native/m_ttcan_linux.c @@ -1186,7 +1186,11 @@ static struct net_device *alloc_mttcan_dev(void) CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO | CAN_CTRLMODE_BERR_REPORTING | CAN_CTRLMODE_ONE_SHOT; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + netif_napi_add_weight(dev, &priv->napi, mttcan_poll_ir, MTT_CAN_NAPI_WEIGHT); +#else netif_napi_add(dev, &priv->napi, mttcan_poll_ir, MTT_CAN_NAPI_WEIGHT); +#endif return dev; } diff --git a/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c b/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c index fb9cf68d..4ffd561b 100644 --- a/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c +++ b/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c @@ -9,6 +9,7 @@ #include #include #include +#include struct tvnet_priv { struct net_device *ndev; @@ -792,7 +793,11 @@ static int tvnet_host_probe(struct pci_dev *pdev, /* Setup BAR0 meta data */ tvnet_host_setup_bar0_md(tvnet); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + netif_napi_add_weight(ndev, &tvnet->napi, tvnet_host_poll, TVNET_NAPI_WEIGHT); +#else netif_napi_add(ndev, &tvnet->napi, tvnet_host_poll, TVNET_NAPI_WEIGHT); +#endif ndev->mtu = TVNET_DEFAULT_MTU; diff --git a/drivers/net/tegra_hv_net.c b/drivers/net/tegra_hv_net.c index c7ccb074..d2a933cb 100644 --- a/drivers/net/tegra_hv_net.c +++ b/drivers/net/tegra_hv_net.c @@ -742,7 +742,11 @@ static int tegra_hv_net_probe(struct platform_device *pdev) goto out_unreserve; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + netif_napi_add_weight(ndev, &hvn->napi, tegra_hv_net_poll, 64); +#else netif_napi_add(ndev, &hvn->napi, tegra_hv_net_poll, 64); +#endif ret = register_netdev(ndev); if (ret) { dev_err(dev, "Failed to register netdev\n");