mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
net: ethtool: Make helpers public
Make some helpers for building ethtool netlink messages available outside the compilation unit, so they can be used for building messages which are not simple get/set. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b28efb930b
commit
0df960f14e
2 changed files with 4 additions and 2 deletions
|
@ -181,13 +181,13 @@ err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *ethnl_bcastmsg_put(struct sk_buff *skb, u8 cmd)
|
void *ethnl_bcastmsg_put(struct sk_buff *skb, u8 cmd)
|
||||||
{
|
{
|
||||||
return genlmsg_put(skb, 0, ++ethnl_bcast_seq, ðtool_genl_family, 0,
|
return genlmsg_put(skb, 0, ++ethnl_bcast_seq, ðtool_genl_family, 0,
|
||||||
cmd);
|
cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ethnl_multicast(struct sk_buff *skb, struct net_device *dev)
|
int ethnl_multicast(struct sk_buff *skb, struct net_device *dev)
|
||||||
{
|
{
|
||||||
return genlmsg_multicast_netns(ðtool_genl_family, dev_net(dev), skb,
|
return genlmsg_multicast_netns(ðtool_genl_family, dev_net(dev), skb,
|
||||||
0, ETHNL_MCGRP_MONITOR, GFP_KERNEL);
|
0, ETHNL_MCGRP_MONITOR, GFP_KERNEL);
|
||||||
|
|
|
@ -19,6 +19,8 @@ int ethnl_fill_reply_header(struct sk_buff *skb, struct net_device *dev,
|
||||||
struct sk_buff *ethnl_reply_init(size_t payload, struct net_device *dev, u8 cmd,
|
struct sk_buff *ethnl_reply_init(size_t payload, struct net_device *dev, u8 cmd,
|
||||||
u16 hdr_attrtype, struct genl_info *info,
|
u16 hdr_attrtype, struct genl_info *info,
|
||||||
void **ehdrp);
|
void **ehdrp);
|
||||||
|
void *ethnl_bcastmsg_put(struct sk_buff *skb, u8 cmd);
|
||||||
|
int ethnl_multicast(struct sk_buff *skb, struct net_device *dev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ethnl_strz_size() - calculate attribute length for fixed size string
|
* ethnl_strz_size() - calculate attribute length for fixed size string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue