summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch')
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
new file mode 100644
index 000000000000..568a405fd69c
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
@@ -0,0 +1,80 @@
+--- ./drivers/ipoe/ipoe.c.orig 2016-11-28 14:28:33.000000000 +0300
++++ ./drivers/ipoe/ipoe.c 2017-05-17 11:27:42.030000000 +0300
+@@ -52,6 +52,27 @@
+ #define DEFINE_SEMAPHORE(name) struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct ipoe_stats {
+ struct u64_stats_sync sync;
+ u64 packets;
+@@ -1668,7 +1689,9 @@
+ };
+
+ static struct genl_family ipoe_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = IPOE_GENL_NAME,
+ .version = IPOE_GENL_VERSION,
+ .hdrsize = 0,
+--- ./drivers/vlan_mon/vlan_mon.c.orig 2017-05-17 11:28:23.320000000 +0300
++++ ./drivers/vlan_mon/vlan_mon.c 2017-05-17 11:29:41.660000000 +0300
+@@ -39,6 +39,27 @@
+ #define vlan_tx_tag_present(skb) skb_vlan_tag_present(skb)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct vlan_dev {
+ unsigned int magic;
+ int ifindex;
+@@ -660,7 +681,9 @@
+ };
+
+ static struct genl_family vlan_mon_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = VLAN_MON_GENL_NAME,
+ .version = VLAN_MON_GENL_VERSION,
+ .hdrsize = 0,