-
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.
[PATCH] bcm43xx: basic ethtool support
This patch contains the beginnings of ethtool support for bcm43xx. It only implements get_drvinfo and get_link, but that's enough for ifplugd to use ethtool to know whether we're associated or not and then start or stop dhcp as necessary. Signed-off-by: Jason Lunz <lunz@falooley.org> Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
- Loading branch information
Michael Buesch
authored and
John W. Linville
committed
Mar 27, 2006
1 parent
9e4a375
commit 6465ce1
Showing
4 changed files
with
62 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,50 @@ | ||
/* | ||
Broadcom BCM43xx wireless driver | ||
ethtool support | ||
Copyright (c) 2006 Jason Lunz <lunz@falooley.org> | ||
Some code in this file is derived from the 8139too.c driver | ||
Copyright (C) 2002 Jeff Garzik | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; see the file COPYING. If not, write to | ||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, | ||
Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#include "bcm43xx.h" | ||
#include "bcm43xx_ethtool.h" | ||
|
||
#include <linux/netdevice.h> | ||
#include <linux/pci.h> | ||
#include <linux/string.h> | ||
#include <linux/version.h> | ||
|
||
|
||
static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | ||
{ | ||
struct bcm43xx_private *bcm = bcm43xx_priv(dev); | ||
|
||
strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); | ||
strncpy(info->version, UTS_RELEASE, sizeof(info->version)); | ||
strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN); | ||
} | ||
|
||
struct ethtool_ops bcm43xx_ethtool_ops = { | ||
.get_drvinfo = bcm43xx_get_drvinfo, | ||
.get_link = ethtool_op_get_link, | ||
}; |
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,8 @@ | ||
#ifndef BCM43xx_ETHTOOL_H_ | ||
#define BCM43xx_ETHTOOL_H_ | ||
|
||
#include <linux/ethtool.h> | ||
|
||
extern struct ethtool_ops bcm43xx_ethtool_ops; | ||
|
||
#endif /* BCM43xx_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