Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfb3e5dd authored by Richard Alpe's avatar Richard Alpe Committed by David S. Miller
Browse files

tipc: move and rename the legacy nl api to "nl compat"



The new netlink API is no longer "v2" but rather the standard API and
the legacy API is now "nl compat". We split them into separate
start/stop and put them in different files in order to further
distinguish them.

Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8ac18f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ obj-$(CONFIG_TIPC) := tipc.o
tipc-y	+= addr.o bcast.o bearer.o config.o \
	   core.o link.o discover.o msg.o  \
	   name_distr.o  subscr.o name_table.o net.o  \
	   netlink.o node.o socket.o log.o eth_media.o \
	   server.o
	   netlink.o netlink_compat.o node.o socket.o log.o eth_media.o \
	   server.o socket.o

tipc-$(CONFIG_TIPC_MEDIA_IB)	+= ib_media.o
tipc-$(CONFIG_SYSCTL)		+= sysctl.o
+1 −1
Original line number Diff line number Diff line
@@ -810,7 +810,7 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)

	tipc_bclink_lock(net);

	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_v2_family,
	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
			  NLM_F_MULTI, TIPC_NL_LINK_GET);
	if (!hdr)
		return -EMSGSIZE;
+2 −2
Original line number Diff line number Diff line
@@ -658,7 +658,7 @@ static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg,
	struct nlattr *attrs;
	struct nlattr *prop;

	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_v2_family,
	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
			  NLM_F_MULTI, TIPC_NL_BEARER_GET);
	if (!hdr)
		return -EMSGSIZE;
@@ -924,7 +924,7 @@ static int __tipc_nl_add_media(struct tipc_nl_msg *msg,
	struct nlattr *attrs;
	struct nlattr *prop;

	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_v2_family,
	hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
			  NLM_F_MULTI, TIPC_NL_MEDIA_GET);
	if (!hdr)
		return -EMSGSIZE;
+7 −0
Original line number Diff line number Diff line
@@ -111,6 +111,10 @@ static int __init tipc_init(void)
	if (err)
		goto out_netlink;

	err = tipc_netlink_compat_start();
	if (err)
		goto out_netlink_compat;

	err = tipc_socket_init();
	if (err)
		goto out_socket;
@@ -136,6 +140,8 @@ static int __init tipc_init(void)
out_sysctl:
	tipc_socket_stop();
out_socket:
	tipc_netlink_compat_stop();
out_netlink_compat:
	tipc_netlink_stop();
out_netlink:
	pr_err("Unable to start in single node mode\n");
@@ -146,6 +152,7 @@ static void __exit tipc_exit(void)
{
	tipc_bearer_cleanup();
	tipc_netlink_stop();
	tipc_netlink_compat_stop();
	tipc_socket_stop();
	tipc_unregister_sysctl();
	unregister_pernet_subsys(&tipc_net_ops);
+0 −1
Original line number Diff line number Diff line
@@ -115,5 +115,4 @@ void tipc_unregister_sysctl(void);
#define tipc_register_sysctl() 0
#define tipc_unregister_sysctl()
#endif

#endif
Loading