From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>
Subject: [PATCH v4 net-next 4/8] lan743x: Add support for ethtool message level
Date: Mon, 23 Jul 2018 16:16:29 -0400 [thread overview]
Message-ID: <1532376993-20765-5-git-send-email-Bryan.Whitehead@microchip.com> (raw)
In-Reply-To: <1532376993-20765-1-git-send-email-Bryan.Whitehead@microchip.com>
Implement ethtool message level
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/ethernet/microchip/lan743x_ethtool.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c
index 9ed9711..bab1344 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,
--
2.7.4
next prev parent reply other threads:[~2018-07-23 21:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 20:16 [PATCH v4 net-next 0/8] lan743x: Add features to lan743x driver Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 1/8] lan743x: Add support for ethtool get_drvinfo Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 2/8] lan743x: Add support for ethtool link settings Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 3/8] lan743x: Add support for ethtool statistics Bryan Whitehead
2018-07-23 20:16 ` Bryan Whitehead [this message]
2018-07-23 20:16 ` [PATCH v4 net-next 5/8] lan743x: Add support for ethtool eeprom access Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 6/8] lan743x: Add power management support Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 7/8] lan743x: Add EEE support Bryan Whitehead
2018-07-23 20:16 ` [PATCH v4 net-next 8/8] lan743x: Add RSS support Bryan Whitehead
2018-07-23 21:11 ` [PATCH v4 net-next 0/8] lan743x: Add features to lan743x driver David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532376993-20765-5-git-send-email-Bryan.Whitehead@microchip.com \
--to=bryan.whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).