lan743x_ethtool.c 597 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* Copyright (C) 2018 Microchip Technology Inc. */
  3. #include <linux/netdevice.h>
  4. #include "lan743x_main.h"
  5. #include "lan743x_ethtool.h"
  6. #include <linux/pci.h>
  7. static void lan743x_ethtool_get_drvinfo(struct net_device *netdev,
  8. struct ethtool_drvinfo *info)
  9. {
  10. struct lan743x_adapter *adapter = netdev_priv(netdev);
  11. strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
  12. strlcpy(info->bus_info,
  13. pci_name(adapter->pdev), sizeof(info->bus_info));
  14. }
  15. const struct ethtool_ops lan743x_ethtool_ops = {
  16. .get_drvinfo = lan743x_ethtool_get_drvinfo,
  17. };