linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: Correctly enable the radio
@ 2007-04-01 14:01 Ivo van Doorn
  0 siblings, 0 replies; only message in thread
From: Ivo van Doorn @ 2007-04-01 14:01 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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;
 
 	/*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-01 14:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-01 14:01 [PATCH] rt2x00: Correctly enable the radio Ivo van Doorn

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).