ethtool: move implementation of ethnl_ops_begin/complete to netlink.c
In preparation of subsequent extensions to both functions move the
implementations from netlink.h to netlink.c.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index 73e0f5b..ac720d6 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -29,6 +29,20 @@ const struct nla_policy ethnl_header_policy_stats[] = {
ETHTOOL_FLAGS_STATS),
};
+int ethnl_ops_begin(struct net_device *dev)
+{
+ if (dev && dev->ethtool_ops->begin)
+ return dev->ethtool_ops->begin(dev);
+ else
+ return 0;
+}
+
+void ethnl_ops_complete(struct net_device *dev)
+{
+ if (dev && dev->ethtool_ops->complete)
+ dev->ethtool_ops->complete(dev);
+}
+
/**
* ethnl_parse_header_dev_get() - parse request header
* @req_info: structure to put results into