diff options
author | Dmitriy Eshenko <dmitriy.eshenko@accel-ppp.org> | 2023-09-23 13:35:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 13:35:11 +0300 |
commit | 7cd28573799f469053dd12e758e8f07408556c59 (patch) | |
tree | 054fd53d7d591b783f132856920a1311c48771fa | |
parent | eafba38b3220d488ed86ebdbc1728f42238a4952 (diff) | |
parent | 30bde382bed321e6bc24ce8918c3693ee3c74943 (diff) | |
download | accel-ppp-7cd28573799f469053dd12e758e8f07408556c59.tar.gz accel-ppp-7cd28573799f469053dd12e758e8f07408556c59.zip |
Merge pull request #108 from DmitriyEshenko/ipoe-6.4-compat
ipoe:vlan_mon: add support for kernels 6.4+
-rw-r--r-- | drivers/ipoe/ipoe.c | 4 | ||||
-rw-r--r-- | drivers/vlan_mon/vlan_mon.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 0b8e2cbf..2008e08b 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; diff --git a/drivers/vlan_mon/vlan_mon.c b/drivers/vlan_mon/vlan_mon.c index ce56dfe1..e37fd365 100644 --- a/drivers/vlan_mon/vlan_mon.c +++ b/drivers/vlan_mon/vlan_mon.c @@ -79,7 +79,11 @@ static struct genl_family vlan_mon_nl_family; static struct genl_multicast_group vlan_mon_nl_mcg; #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) static DEFINE_SEMAPHORE(vlan_mon_lock); +#else +static DEFINE_SEMAPHORE(vlan_mon_lock,1); +#endif static inline int vlan_mon_proto(int proto) { |