summaryrefslogtreecommitdiff
path: root/drivers/ipoe/ipoe.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2013-08-28 14:05:49 +0400
committerKozlov Dmitry <xeb@mail.ru>2013-08-28 14:05:49 +0400
commitba2ab4f3ad48405c36b2985969083f4905b34d31 (patch)
tree9b3ccacc8524fffa7faaea271c62925a335c90ef /drivers/ipoe/ipoe.c
parent4ba1e612c56df1a103bd2d0de67f52ceda04765e (diff)
downloadaccel-ppp-xebd-ba2ab4f3ad48405c36b2985969083f4905b34d31.tar.gz
accel-ppp-xebd-ba2ab4f3ad48405c36b2985969083f4905b34d31.zip
ipoe: fix driver compilation for newer kernels
Diffstat (limited to 'drivers/ipoe/ipoe.c')
-rw-r--r--drivers/ipoe/ipoe.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c
index 98ea7ff..80d03f0 100644
--- a/drivers/ipoe/ipoe.c
+++ b/drivers/ipoe/ipoe.c
@@ -1034,7 +1034,11 @@ static int ipoe_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
goto out;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq,
+#else
+ hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq,
+#endif
&ipoe_nl_family, 0, IPOE_CMD_NOOP);
if (IS_ERR(hdr)) {
ret = PTR_ERR(hdr);
@@ -1045,8 +1049,10 @@ static int ipoe_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
return genlmsg_unicast(msg, info->snd_pid);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
return genlmsg_unicast(genl_info_net(info), msg, info->snd_pid);
+#else
+ return genlmsg_unicast(genl_info_net(info), msg, info->snd_portid);
#endif
err_out:
@@ -1095,7 +1101,11 @@ static int ipoe_nl_cmd_create(struct sk_buff *skb, struct genl_info *info)
goto out;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq,
+#else
+ hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq,
+#endif
&ipoe_nl_family, 0, IPOE_CMD_CREATE);
if (IS_ERR(hdr)) {
ret = PTR_ERR(hdr);
@@ -1116,8 +1126,10 @@ static int ipoe_nl_cmd_create(struct sk_buff *skb, struct genl_info *info)
genlmsg_end(msg, hdr);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
return genlmsg_unicast(msg, info->snd_pid);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
return genlmsg_unicast(genl_info_net(info), msg, info->snd_pid);
+#else
+ return genlmsg_unicast(genl_info_net(info), msg, info->snd_portid);
#endif
err_out:
@@ -1334,7 +1346,11 @@ static int ipoe_nl_cmd_dump_sessions(struct sk_buff *skb, struct netlink_callbac
if (idx++ < start_idx)
continue;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
if (fill_info(skb, ses, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) < 0)
+#else
+ if (fill_info(skb, ses, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq) < 0)
+#endif
break;
}