summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2015-09-30 16:52:51 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-05 13:23:23 +0300
commit349fb2d7008caa752919e394fb202545b5f72c67 (patch)
tree56ef017b7e1696c2c3e60f918732756628bdc1f3 /drivers/net/ethernet/amd
parent47f2e6c27553d9a164bb0067f4c1f9bbba388c2e (diff)
downloadlinux-349fb2d7008caa752919e394fb202545b5f72c67.tar.xz
amd-xgbe: Add ethtool support for setting the msglevel
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>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index 59e090e95c0e..29db64b08d52 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -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)
{
@@ -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,