diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2018-05-22 11:29:34 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-23 14:55:00 -0400 |
commit | 273de02ae7d828d72d66eb5fce181e1f3f96d0cd (patch) | |
tree | e518af2ff3a6320b551896e8f1de900b3b3bce5d /drivers/net/hyperv | |
parent | 7c6f97475da04ba3e80c62ca8cd271e34290a76e (diff) | |
download | lwn-273de02ae7d828d72d66eb5fce181e1f3f96d0cd.tar.gz lwn-273de02ae7d828d72d66eb5fce181e1f3f96d0cd.zip |
hv_netvsc: Add handlers for ethtool get/set msg level
The handlers for ethtool get/set msg level are missing from netvsc.
This patch adds them.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index da07ccdf84bf..60a5769ef5a1 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1618,8 +1618,24 @@ static int netvsc_set_ringparam(struct net_device *ndev, return ret; } +static u32 netvsc_get_msglevel(struct net_device *ndev) +{ + struct net_device_context *ndev_ctx = netdev_priv(ndev); + + return ndev_ctx->msg_enable; +} + +static void netvsc_set_msglevel(struct net_device *ndev, u32 val) +{ + struct net_device_context *ndev_ctx = netdev_priv(ndev); + + ndev_ctx->msg_enable = val; +} + static const struct ethtool_ops ethtool_ops = { .get_drvinfo = netvsc_get_drvinfo, + .get_msglevel = netvsc_get_msglevel, + .set_msglevel = netvsc_set_msglevel, .get_link = ethtool_op_get_link, .get_ethtool_stats = netvsc_get_ethtool_stats, .get_sset_count = netvsc_get_sset_count, |