summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorBryan Whitehead <Bryan.Whitehead@microchip.com>2018-07-23 16:16:29 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-23 14:09:18 -0700
commit2958337d686cdcc0940a3ab38cea2b3aaebea9da (patch)
treea7f92d8802eb77d74a58c96a8be9ab9462016696 /drivers/net/ethernet
parent8114e8a2f1dbad34804e0de6ab15728cf3566578 (diff)
downloadlinux-2958337d686cdcc0940a3ab38cea2b3aaebea9da.tar.bz2
lan743x: Add support for ethtool message level
Implement ethtool message level Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_ethtool.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c
index 9ed9711c7df0..bab1344106f1 100644
--- a/drivers/net/ethernet/microchip/lan743x_ethtool.c
+++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c
@@ -17,6 +17,21 @@ static void lan743x_ethtool_get_drvinfo(struct net_device *netdev,
pci_name(adapter->pdev), sizeof(info->bus_info));
}
+static u32 lan743x_ethtool_get_msglevel(struct net_device *netdev)
+{
+ struct lan743x_adapter *adapter = netdev_priv(netdev);
+
+ return adapter->msg_enable;
+}
+
+static void lan743x_ethtool_set_msglevel(struct net_device *netdev,
+ u32 msglevel)
+{
+ struct lan743x_adapter *adapter = netdev_priv(netdev);
+
+ adapter->msg_enable = msglevel;
+}
+
static const char lan743x_set0_hw_cnt_strings[][ETH_GSTRING_LEN] = {
"RX FCS Errors",
"RX Alignment Errors",
@@ -196,6 +211,8 @@ static int lan743x_ethtool_get_sset_count(struct net_device *netdev, int sset)
const struct ethtool_ops lan743x_ethtool_ops = {
.get_drvinfo = lan743x_ethtool_get_drvinfo,
+ .get_msglevel = lan743x_ethtool_get_msglevel,
+ .set_msglevel = lan743x_ethtool_set_msglevel,
.get_link = ethtool_op_get_link,
.get_strings = lan743x_ethtool_get_strings,