Skip to content

Commit

Permalink
amd-xgbe: Add ethtool support for setting the msglevel
Browse files Browse the repository at this point in the history
Provide the ethtool functions to support getting and setting the
msglevel for the driver.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lendacky, Thomas authored and David S. Miller committed Oct 5, 2015
1 parent 47f2e6c commit 349fb2d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,20 @@ static void xgbe_get_drvinfo(struct net_device *netdev,
drvinfo->n_stats = XGBE_STATS_COUNT;
}

static u32 xgbe_get_msglevel(struct net_device *netdev)
{
struct xgbe_prv_data *pdata = netdev_priv(netdev);

return pdata->msg_enable;
}

static void xgbe_set_msglevel(struct net_device *netdev, u32 msglevel)
{
struct xgbe_prv_data *pdata = netdev_priv(netdev);

pdata->msg_enable = msglevel;
}

static int xgbe_get_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec)
{
Expand Down Expand Up @@ -594,6 +608,8 @@ static const struct ethtool_ops xgbe_ethtool_ops = {
.get_settings = xgbe_get_settings,
.set_settings = xgbe_set_settings,
.get_drvinfo = xgbe_get_drvinfo,
.get_msglevel = xgbe_get_msglevel,
.set_msglevel = xgbe_set_msglevel,
.get_link = ethtool_op_get_link,
.get_coalesce = xgbe_get_coalesce,
.set_coalesce = xgbe_set_coalesce,
Expand Down

0 comments on commit 349fb2d

Please sign in to comment.