The handlers for ethtool get/set msg level are missing from netvsc. This patch adds them.
Unified · Split
| @@ -1618,8 +1618,24 @@ static int netvsc_set_ringparam(struct net_device *ndev, · 1617 unmodified lines | |||
| 1618 | return ret; | 1618 | return ret; |
| 1619 | } | 1619 | } |
| 1620 | 1620 | ||
| 1621 | static u32 netvsc_get_msglevel(struct net_device *ndev) | ||
| 1622 | { | ||
| 1623 | struct net_device_context *ndev_ctx = netdev_priv(ndev); | ||
| 1624 | |||
| 1625 | return ndev_ctx->msg_enable; | ||
| 1626 | } | ||
| 1627 | |||
| 1628 | static void netvsc_set_msglevel(struct net_device *ndev, u32 val) | ||
| 1629 | { | ||
| 1630 | struct net_device_context *ndev_ctx = netdev_priv(ndev); | ||
| 1631 | |||
| 1632 | ndev_ctx->msg_enable = val; | ||
| 1633 | } | ||
| 1634 | |||
| 1621 | static const struct ethtool_ops ethtool_ops = { | 1635 | static const struct ethtool_ops ethtool_ops = { |
| 1622 | .get_drvinfo = netvsc_get_drvinfo, | 1636 | .get_drvinfo = netvsc_get_drvinfo, |
| 1637 | .get_msglevel = netvsc_get_msglevel, | ||
| 1638 | .set_msglevel = netvsc_set_msglevel, | ||
| 1623 | .get_link = ethtool_op_get_link, | 1639 | .get_link = ethtool_op_get_link, |
| 1624 | .get_ethtool_stats = netvsc_get_ethtool_stats, | 1640 | .get_ethtool_stats = netvsc_get_ethtool_stats, |
| 1625 | .get_sset_count = netvsc_get_sset_count, | 1641 | .get_sset_count = netvsc_get_sset_count, |