bcm43xx_ethtool.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. Broadcom BCM43xx wireless driver
  3. ethtool support
  4. Copyright (c) 2006 Jason Lunz <lunz@falooley.org>
  5. Some code in this file is derived from the 8139too.c driver
  6. Copyright (C) 2002 Jeff Garzik
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; see the file COPYING. If not, write to
  17. the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  18. Boston, MA 02110-1301, USA.
  19. */
  20. #include "bcm43xx.h"
  21. #include "bcm43xx_ethtool.h"
  22. #include <linux/netdevice.h>
  23. #include <linux/pci.h>
  24. #include <linux/string.h>
  25. #include <linux/version.h>
  26. static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
  27. {
  28. struct bcm43xx_private *bcm = bcm43xx_priv(dev);
  29. strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
  30. strncpy(info->version, UTS_RELEASE, sizeof(info->version));
  31. strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
  32. }
  33. struct ethtool_ops bcm43xx_ethtool_ops = {
  34. .get_drvinfo = bcm43xx_get_drvinfo,
  35. .get_link = ethtool_op_get_link,
  36. };