From 30bde382bed321e6bc24ce8918c3693ee3c74943 Mon Sep 17 00:00:00 2001 From: Dmitriy Eshenko Date: Sat, 23 Sep 2023 12:35:42 +0300 Subject: ipoe:vlan_mon: add support for kernels 6.4+ --- drivers/ipoe/ipoe.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/ipoe/ipoe.c') diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 0b8e2cb..2008e08 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -135,7 +135,11 @@ static struct list_head ipoe_list1_u[IPOE_HASH_BITS + 1]; static struct list_head ipoe_excl_list[IPOE_HASH_BITS + 1]; static LIST_HEAD(ipoe_list2); static LIST_HEAD(ipoe_list2_u); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) static DEFINE_SEMAPHORE(ipoe_wlock); +#else +static DEFINE_SEMAPHORE(ipoe_wlock,1); +#endif static LIST_HEAD(ipoe_interfaces); static LIST_HEAD(ipoe_networks); static struct work_struct ipoe_queue_work; -- cgit v1.2.3