summaryrefslogtreecommitdiff
path: root/net/ethtool/netlink.c
blob: 59e1ebde2f15ac98444664f6b042755f7e735415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: GPL-2.0-only

#include <linux/ethtool_netlink.h>
#include "netlink.h"

/* genetlink setup */

static const struct genl_ops ethtool_genl_ops[] = {
};

static struct genl_family ethtool_genl_family = {
	.name		= ETHTOOL_GENL_NAME,
	.version	= ETHTOOL_GENL_VERSION,
	.netnsok	= true,
	.parallel_ops	= true,
	.ops		= ethtool_genl_ops,
	.n_ops		= ARRAY_SIZE(ethtool_genl_ops),
};

/* module setup */

static int __init ethnl_init(void)
{
	int ret;

	ret = genl_register_family(&ethtool_genl_family);
	if (WARN(ret < 0, "ethtool: genetlink family registration failed"))
		return ret;

	return 0;
}

subsys_initcall(ethnl_init);