Skip to contentSkip to conversation

rt2x00: Correctly enable the radio

PATCH New Ivo van Doorn 1 participant 1 message Apr 1, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: Correctly enable the radio

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.

---

drivers/net/wireless/mac80211/rt2x00/rt2400pci.c +1 -2
index f8a9867..f296fda 100644
@@ -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;
 
 	/*
drivers/net/wireless/mac80211/rt2x00/rt2500pci.c +1 -2
index bddbbf9..4fff8db 100644
@@ -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;
 
 	/*
drivers/net/wireless/mac80211/rt2x00/rt2x00.h +1 -1
index cea6bb1..38fae66 100644
@@ -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
 
drivers/net/wireless/mac80211/rt2x00/rt61pci.c +1 -2
index 9cee93f..92a7c71 100644
@@ -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;
 
 	/*