rt2x00: Correctly enable the radio
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.
Signed-off-by Ivo van Doorn <[email protected]>
---
drivers/net/wireless/mac80211/rt2x00/rt2400pci.c +1 -2
@@ -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
@@ -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
@@ -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
@@ -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 ;/*