-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lan743x: Add support for ethtool get_drvinfo
Implement ethtool get_drvinfo 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>
- Loading branch information
Bryan Whitehead
authored and
David S. Miller
committed
Jul 23, 2018
1 parent
8760c4d
commit 0cf6322
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* SPDX-License-Identifier: GPL-2.0+ */ | ||
/* Copyright (C) 2018 Microchip Technology Inc. */ | ||
|
||
#include <linux/netdevice.h> | ||
#include "lan743x_main.h" | ||
#include "lan743x_ethtool.h" | ||
#include <linux/pci.h> | ||
|
||
static void lan743x_ethtool_get_drvinfo(struct net_device *netdev, | ||
struct ethtool_drvinfo *info) | ||
{ | ||
struct lan743x_adapter *adapter = netdev_priv(netdev); | ||
|
||
strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver)); | ||
strlcpy(info->bus_info, | ||
pci_name(adapter->pdev), sizeof(info->bus_info)); | ||
} | ||
|
||
const struct ethtool_ops lan743x_ethtool_ops = { | ||
.get_drvinfo = lan743x_ethtool_get_drvinfo, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: GPL-2.0+ */ | ||
/* Copyright (C) 2018 Microchip Technology Inc. */ | ||
|
||
#ifndef _LAN743X_ETHTOOL_H | ||
#define _LAN743X_ETHTOOL_H | ||
|
||
#include "linux/ethtool.h" | ||
|
||
extern const struct ethtool_ops lan743x_ethtool_ops; | ||
|
||
#endif /* _LAN743X_ETHTOOL_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters