* [PATCH] bcm43xx: Add firmware version to ethtool output
@ 2007-03-04 18:55 Larry Finger
2007-03-04 19:02 ` Michael Buesch
0 siblings, 1 reply; 4+ messages in thread
From: Larry Finger @ 2007-03-04 18:55 UTC (permalink / raw)
To: John Linville; +Cc: Michael Buesch, Bcm43xx-dev, linux-wireless
As the removal of ethtool capability from bcm43xx has been NACKed,
some useful functionality should be added. This patch changes it
so that the firmware version is output.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
@@ -27,6 +27,7 @@
*/
#include "bcm43xx.h"
+#include "bcm43xx_main.h"
#include "bcm43xx_ethtool.h"
#include <linux/netdevice.h>
@@ -42,6 +43,8 @@ static void bcm43xx_get_drvinfo(struct n
strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
strncpy(info->version, utsname()->release, sizeof(info->version));
strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
+ snprintf(info->fw_version, sizeof(info->fw_version), "0x%x",
+ bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, BCM43xx_UCODE_REVISION));
}
const struct ethtool_ops bcm43xx_ethtool_ops = {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bcm43xx: Add firmware version to ethtool output
2007-03-04 18:55 [PATCH] bcm43xx: Add firmware version to ethtool output Larry Finger
@ 2007-03-04 19:02 ` Michael Buesch
2007-03-16 17:14 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Michael Buesch @ 2007-03-04 19:02 UTC (permalink / raw)
To: Larry Finger; +Cc: John Linville, Bcm43xx-dev, linux-wireless
On Sunday 04 March 2007 19:55, Larry Finger wrote:
> As the removal of ethtool capability from bcm43xx has been NACKed,
> some useful functionality should be added.
I cannot follow this logics, sorry. ;)
> This patch changes it
> so that the firmware version is output.
I don't see how this is useful.
I really want to avoid having more ethtool stuff, as it will
only create compatibility issues for the future.
This doesn't give information that's not available elsewhere.
> #include "bcm43xx.h"
> +#include "bcm43xx_main.h"
> #include "bcm43xx_ethtool.h"
>
> #include <linux/netdevice.h>
> @@ -42,6 +43,8 @@ static void bcm43xx_get_drvinfo(struct n
> strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> strncpy(info->version, utsname()->release, sizeof(info->version));
> strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
> + snprintf(info->fw_version, sizeof(info->fw_version), "0x%x",
> + bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, BCM43xx_UCODE_REVISION));
This will crash when the device is not up.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bcm43xx: Add firmware version to ethtool output
2007-03-04 19:02 ` Michael Buesch
@ 2007-03-16 17:14 ` John W. Linville
2007-03-16 18:13 ` Larry Finger
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2007-03-16 17:14 UTC (permalink / raw)
To: Michael Buesch; +Cc: Larry Finger, Bcm43xx-dev, linux-wireless
On Sun, Mar 04, 2007 at 08:02:39PM +0100, Michael Buesch wrote:
> On Sunday 04 March 2007 19:55, Larry Finger wrote:
> > @@ -42,6 +43,8 @@ static void bcm43xx_get_drvinfo(struct n
> > strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> > strncpy(info->version, utsname()->release, sizeof(info->version));
> > strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
> > + snprintf(info->fw_version, sizeof(info->fw_version), "0x%x",
> > + bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, BCM43xx_UCODE_REVISION));
>
> This will crash when the device is not up.
Larry, will you be doing a new version of this patch that accounts
for this comment?
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bcm43xx: Add firmware version to ethtool output
2007-03-16 17:14 ` John W. Linville
@ 2007-03-16 18:13 ` Larry Finger
0 siblings, 0 replies; 4+ messages in thread
From: Larry Finger @ 2007-03-16 18:13 UTC (permalink / raw)
To: John W. Linville; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev
John W. Linville wrote:
> On Sun, Mar 04, 2007 at 08:02:39PM +0100, Michael Buesch wrote:
>> On Sunday 04 March 2007 19:55, Larry Finger wrote:
>
>>> @@ -42,6 +43,8 @@ static void bcm43xx_get_drvinfo(struct n
>>> strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
>>> strncpy(info->version, utsname()->release, sizeof(info->version));
>>> strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
>>> + snprintf(info->fw_version, sizeof(info->fw_version), "0x%x",
>>> + bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, BCM43xx_UCODE_REVISION));
>> This will crash when the device is not up.
>
> Larry, will you be doing a new version of this patch that accounts
> for this comment?
No. Just drop that patch. It doesn't add enough functionality to bother with it.
Larry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-16 18:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 18:55 [PATCH] bcm43xx: Add firmware version to ethtool output Larry Finger
2007-03-04 19:02 ` Michael Buesch
2007-03-16 17:14 ` John W. Linville
2007-03-16 18:13 ` Larry Finger
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).