* [PATCH] b43: Output message at startup if hardware switch for radio is off
@ 2007-11-09 22:47 Larry Finger
2007-11-10 15:24 ` Michael Buesch
0 siblings, 1 reply; 4+ messages in thread
From: Larry Finger @ 2007-11-09 22:47 UTC (permalink / raw)
To: John Linville, Michael Buesch; +Cc: Bcm43xx-dev, linux-wireless
Now that the radio is controlled by rfkill, there is a potential
difficulty in helping a new user get started, as it is unlikely
that they will have setup rfkill. This patch prints a message if
the interface is started with the hardware switch off.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
John,
This patch is intended for the everything branch of wireless-2.6.
Larry
main.c | 10 +++++++---
main.h | 2 ++
rfkill.c | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
Index: wireless-2.6/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43/main.c
+++ wireless-2.6/drivers/net/wireless/b43/main.c
@@ -3181,11 +3181,15 @@ static void setup_struct_phy_for_init(st
static void setup_struct_wldev_for_init(struct b43_wldev *dev)
{
+ struct b43_wl *wl = dev->wl;
+
/* Flags */
dev->reg124_set_0x4 = 0;
- /* Assume the radio is enabled. If it's not enabled, the state will
- * immediately get fixed on the first periodic work run. */
- dev->radio_hw_enable = 1;
+ dev->radio_hw_enable = b43_is_hw_radio_enabled(dev);
+ if (!dev->radio_hw_enable)
+ b43info(wl, "***** The hardware switch for your radio switch"
+ " is off.\n ***** Until it is switched on,"
+ " your device will not work.\n");
/* Stats */
memset(&dev->stats, 0, sizeof(dev->stats));
Index: wireless-2.6/drivers/net/wireless/b43/main.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43/main.h
+++ wireless-2.6/drivers/net/wireless/b43/main.h
@@ -116,6 +116,8 @@ void b43_mac_enable(struct b43_wldev *de
void b43_controller_restart(struct b43_wldev *dev, const char *reason);
+bool b43_is_hw_radio_enabled(struct b43_wldev *dev);
+
#define B43_PS_ENABLED (1 << 0) /* Force enable hardware power saving */
#define B43_PS_DISABLED (1 << 1) /* Force disable hardware power saving */
#define B43_PS_AWAKE (1 << 2) /* Force device awake */
Index: wireless-2.6/drivers/net/wireless/b43/rfkill.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43/rfkill.c
+++ wireless-2.6/drivers/net/wireless/b43/rfkill.c
@@ -27,7 +27,7 @@
/* Returns TRUE, if the radio is enabled in hardware. */
-static bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
+bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
{
if (dev->phy.rev >= 3) {
if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] b43: Output message at startup if hardware switch for radio is off
2007-11-09 22:47 [PATCH] b43: Output message at startup if hardware switch for radio is off Larry Finger
@ 2007-11-10 15:24 ` Michael Buesch
2007-11-12 12:36 ` Holger Schurig
0 siblings, 1 reply; 4+ messages in thread
From: Michael Buesch @ 2007-11-10 15:24 UTC (permalink / raw)
To: Larry Finger; +Cc: John Linville, Bcm43xx-dev, linux-wireless
On Friday 09 November 2007 23:47:37 Larry Finger wrote:
> Now that the radio is controlled by rfkill, there is a potential
> difficulty in helping a new user get started, as it is unlikely
> that they will have setup rfkill. This patch prints a message if
> the interface is started with the hardware switch off.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> John,
>
> This patch is intended for the everything branch of wireless-2.6.
>
> Larry
Well... Pressing the rfkill button is the _FIRST_ thing that I would
do, if the device does not work. I'm wondering why people have a problem
with that. On other operating systems it's the very same. On Windows there
is no dmesg.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] b43: Output message at startup if hardware switch for radio is off
2007-11-10 15:24 ` Michael Buesch
@ 2007-11-12 12:36 ` Holger Schurig
2007-11-13 15:22 ` Dan Williams
0 siblings, 1 reply; 4+ messages in thread
From: Holger Schurig @ 2007-11-12 12:36 UTC (permalink / raw)
To: linux-wireless; +Cc: Michael Buesch, Larry Finger, John Linville, Bcm43xx-dev
> Well... Pressing the rfkill button is the _FIRST_ thing that I
> would do, if the device does not work. I'm wondering why
> people have a problem with that. On other operating systems
> it's the very same. On Windows there is no dmesg.
On Windows, the "Wireless Network Connection" wizard displays
-----------------------------------------------------
No wireless networks were found in range
Make sure the wireless switch on your computer is on.
To see an updated list, click "Refresh network list".
-----------------------------------------------------
The Linux =E4quivalent would be NetworkManager or the KDE tools for=20
this job.
That's at least displayed on the WinXP Embedded device that I=20
just created :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] b43: Output message at startup if hardware switch for radio is off
2007-11-12 12:36 ` Holger Schurig
@ 2007-11-13 15:22 ` Dan Williams
0 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2007-11-13 15:22 UTC (permalink / raw)
To: Holger Schurig
Cc: linux-wireless, Michael Buesch, Larry Finger, John Linville,
Bcm43xx-dev
On Mon, 2007-11-12 at 13:36 +0100, Holger Schurig wrote:
> > Well... Pressing the rfkill button is the _FIRST_ thing that I
> > would do, if the device does not work. I'm wondering why
> > people have a problem with that. On other operating systems
> > it's the very same. On Windows there is no dmesg.
>=20
> On Windows, the "Wireless Network Connection" wizard displays
>=20
> -----------------------------------------------------
> No wireless networks were found in range
>=20
> Make sure the wireless switch on your computer is on.
> To see an updated list, click "Refresh network list".
> -----------------------------------------------------
>=20
> The Linux =C3=A4quivalent would be NetworkManager or the KDE tools fo=
r=20
> this job.
>=20
>=20
> That's at least displayed on the WinXP Embedded device that I=20
> just created :-)
Good thought; NM should probably replace the "You're disconnected"
notification dialog at startup with text that reads similar to remind
the user that the killswitch is on.
Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-13 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 22:47 [PATCH] b43: Output message at startup if hardware switch for radio is off Larry Finger
2007-11-10 15:24 ` Michael Buesch
2007-11-12 12:36 ` Holger Schurig
2007-11-13 15:22 ` Dan Williams
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).