linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] rt2x00: Correctly enable the radio
Date: Sun, 1 Apr 2007 16:01:58 +0200	[thread overview]
Message-ID: <200704011601.58115.IvDoorn@gmail.com> (raw)

The DEVICE_ENABLED_RADIO_HW flag was accidently added,
this flag is only used (and set correctly) with the rfkill patch
applied to it.
WIthout the rfkill patch this will only prevent the radio to be
enabled for PCI devices.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>

---

diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c b/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
index f8a9867..f296fda 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
@@ -1228,8 +1228,7 @@ static int rt2400pci_enable_radio(struct rt2x00_dev *rt2x00dev)
 	 * Don't enable the radio twice.
 	 * or if the hardware button has been disabled.
 	 */
-	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO) ||
-	    !GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO_HW))
+	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO))
 		return 0;
 
 	/*
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c b/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
index bddbbf9..4fff8db 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
@@ -1354,8 +1354,7 @@ static int rt2500pci_enable_radio(struct rt2x00_dev *rt2x00dev)
 	 * Don't enable the radio twice,
 	 * or if the hardware button has been disabled.
 	 */
-	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO) ||
-	    !GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO_HW))
+	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO))
 		return 0;
 
 	/*
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2x00.h b/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
index cea6bb1..38fae66 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
@@ -777,7 +777,7 @@ struct rt2x00_dev {
 	 */
 	unsigned int flags;
 #define DEVICE_ENABLED_RADIO		0x00000001
-#define DEVICE_ENABLED_RADIO_HW		0x00000002
+
 #define DEVICE_INITIALIZED		0x00000004
 #define DEVICE_INITIALIZED_HW		0x00000008
 
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt61pci.c b/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
index 9cee93f..92a7c71 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
@@ -1635,8 +1635,7 @@ static int rt61pci_enable_radio(struct rt2x00_dev *rt2x00dev)
 	 * Don't enable the radio twice.
 	 * or if the hardware button has been disabled.
 	 */
-	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO) ||
-	    !GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO_HW))
+	if (GET_FLAG(rt2x00dev, DEVICE_ENABLED_RADIO))
 		return 0;
 
 	/*

                 reply	other threads:[~2007-04-01 14:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200704011601.58115.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).