aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2008-02-09 01:20:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-15 13:44:19 -0500
commit6fff1c64ffd899e0b70fbb0201c6603f078ea942 (patch)
tree1aca847da571ec6f7adda22a64088a14d6a0a198
parent943dbef4b84b9cee3501e45b654e38335900570b (diff)
b43legacy: Add driver load messages
This adds printk messages with basic information about the driver being loaded. This information includes a summary of the compiled-in features, which simplifies bug-reporting and debugging a lot. Also a firmware ID is printed. This is a unique identifier blob for a specific version of the firmware. This ID is attached to a specific version of the firmware blob in b43-fwcutter (see fwcutter git). This helps users to select the right firmware for their device. This also makes it possible to use automated scripts to fetch and extract the right firmware for the driver. (The script will grep the .ko for the "Firmware-ID: xxx" string.) While the driver might still support other versions of the firmware for backward compatibility, this will always print out the officially supported version, which people _should_ use. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h4
-rw-r--r--drivers/net/wireless/b43legacy/main.c30
2 files changed, 33 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index c80edd2b9044..93d45b71799a 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -23,6 +23,10 @@
23#include "phy.h" 23#include "phy.h"
24 24
25 25
26/* The unique identifier of the firmware that's officially supported by this
27 * driver version. */
28#define B43legacy_SUPPORTED_FIRMWARE_ID "FW10"
29
26#define B43legacy_IRQWAIT_MAX_RETRIES 20 30#define B43legacy_IRQWAIT_MAX_RETRIES 20
27 31
28#define B43legacy_RX_MAX_SSI 60 /* best guess at max ssi */ 32#define B43legacy_RX_MAX_SSI 60 /* best guess at max ssi */
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 794c2fa44b90..c39de422e220 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3,7 +3,7 @@
3 * Broadcom B43legacy wireless driver 3 * Broadcom B43legacy wireless driver
4 * 4 *
5 * Copyright (c) 2005 Martin Langer <martin-langer@gmx.de> 5 * Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>
6 * Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 6 * Copyright (c) 2005-2008 Stefano Brivio <stefano.brivio@polimi.it>
7 * Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de> 7 * Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de>
8 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
9 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
@@ -3809,6 +3809,32 @@ static struct ssb_driver b43legacy_ssb_driver = {
3809 .resume = b43legacy_resume, 3809 .resume = b43legacy_resume,
3810}; 3810};
3811 3811
3812static void b43legacy_print_driverinfo(void)
3813{
3814 const char *feat_pci = "", *feat_leds = "", *feat_rfkill = "",
3815 *feat_pio = "", *feat_dma = "";
3816
3817#ifdef CONFIG_B43LEGACY_PCI_AUTOSELECT
3818 feat_pci = "P";
3819#endif
3820#ifdef CONFIG_B43LEGACY_LEDS
3821 feat_leds = "L";
3822#endif
3823#ifdef CONFIG_B43LEGACY_RFKILL
3824 feat_rfkill = "R";
3825#endif
3826#ifdef CONFIG_B43LEGACY_PIO
3827 feat_pio = "I";
3828#endif
3829#ifdef CONFIG_B43LEGACY_DMA
3830 feat_dma = "D";
3831#endif
3832 printk(KERN_INFO "Broadcom 43xx driver loaded "
3833 "[ Features: %s%s%s%s%s, Firmware-ID: "
3834 B43legacy_SUPPORTED_FIRMWARE_ID " ]\n",
3835 feat_pci, feat_leds, feat_rfkill, feat_pio, feat_dma);
3836}
3837
3812static int __init b43legacy_init(void) 3838static int __init b43legacy_init(void)
3813{ 3839{
3814 int err; 3840 int err;
@@ -3819,6 +3845,8 @@ static int __init b43legacy_init(void)
3819 if (err) 3845 if (err)
3820 goto err_dfs_exit; 3846 goto err_dfs_exit;
3821 3847
3848 b43legacy_print_driverinfo();
3849
3822 return err; 3850 return err;
3823 3851
3824err_dfs_exit: 3852err_dfs_exit: