blob: 41222891438c20191e6fc00f1999d395553394f1 [file] [log] [blame]
This is required unless we add some macro wrappers for this
type of static work upstream but not sure if that is a good
idea yet.
--- a/net/ieee802154/reassembly.c
+++ b/net/ieee802154/reassembly.c
@@ -99,7 +99,11 @@ static void lowpan_frag_expire(unsigned
struct net *net;
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags);
+#else
+ net = &init_net;
+#endif
spin_lock(&fq->q.lock);
@@ -396,28 +400,44 @@ EXPORT_SYMBOL(lowpan_frag_rcv);
static struct ctl_table lowpan_frags_ns_ctl_table[] = {
{
.procname = "6lowpanfrag_high_thresh",
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
.data = &init_net.ieee802154_lowpan.frags.high_thresh,
+#else
+ .data = &ieee802154_lowpan.frags.high_thresh,
+#endif
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{
.procname = "6lowpanfrag_low_thresh",
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
.data = &init_net.ieee802154_lowpan.frags.low_thresh,
+#else
+ .data = &ieee802154_lowpan.frags.low_thresh,
+#endif
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{
.procname = "6lowpanfrag_time",
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
.data = &init_net.ieee802154_lowpan.frags.timeout,
+#else
+ .data = &ieee802154_lowpan.frags.timeout,
+#endif
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
{
.procname = "6lowpanfrag_max_datagram_size",
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
.data = &init_net.ieee802154_lowpan.max_dsize,
+#else
+ .data = &ieee802154_lowpan.max_dsize,
+#endif
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec