diff options
Diffstat (limited to 'drivers/ipoe')
-rw-r--r-- | drivers/ipoe/ipoe.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index fa7dec3f..14b6416a 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -702,7 +702,11 @@ nl_err: if (!list_empty(&ipoe_list2_u)) mod_timer(&ipoe_timer_u, jiffies + IPOE_TIMEOUT_U * HZ); else +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,2,0) del_timer(&ipoe_timer_u); +#else + timer_delete(&ipoe_timer_u); +#endif } static struct ipoe_session *ipoe_lookup(__be32 addr) @@ -1105,7 +1109,13 @@ static void ipoe_netdev_setup(struct net_device *dev) dev->iflink = 0; #endif dev->addr_len = ETH_ALEN; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0) + dev->netns_immutable = true; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0) + dev->netns_local = true; +#else dev->features |= NETIF_F_NETNS_LOCAL; +#endif dev->features &= ~(NETIF_F_HW_VLAN_FILTER | NETIF_F_LRO); dev->header_ops = &ipoe_hard_header_ops; dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; @@ -1984,8 +1994,11 @@ static void __exit ipoe_fini(void) flush_work(&ipoe_queue_work); skb_queue_purge(&ipoe_queue); - +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,2,0) del_timer(&ipoe_timer_u); +#else + timer_delete(&ipoe_timer_u); +#endif for (i = 0; i <= IPOE_HASH_BITS; i++) rcu_assign_pointer(ipoe_list[i].next, &ipoe_list[i]); |