Skip to contentSkip to conversation

Bug in rt2x00 rt73usb driver in latest git kernel

DISCUSSION Paul Eddington 5 participants 8 messages Sep 24, 2008 – Sep 26, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hi,

While running the latest git kernel (linus' tree) and using a usb wifi card, I got this error in dmesg:;

phy2 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
Please file bug report to http://rt2x00.serialmonkey.com.

This is not reproducible easily, but it has occurred on two occasions both while connected to a WEP encrypted AP with a 40-bit key and performing many file samba transfers at full speed 54mbits.

I tried to report the bug there but was unable to register and edit the bug reports wiki page.
If there is any more information or help required to debug this, please let me know.

Regards,
Paul

#1 lore raw
Quoted 13 lines · Paul Eddington

Hi,

While running the latest git kernel (linus' tree) and using a usb wifi card, I got this error in dmesg:;

phy2 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
Please file bug report to http://rt2x00.serialmonkey.com.

This is not reproducible easily, but it has occurred on two occasions both while connected to a WEP encrypted AP with a 40-bit key and performing many file samba transfers at full speed 54mbits.

Quoted 8 lines

I tried to report the bug there but was unable to register and edit the bug reports wiki page.
If there is any more information or help required to debug this, please let me know.

Regards,
Paul
--

Hi Paul,

the rt2x00 drivers are currently a very fast moving target. You may want to experiment with the rt2x00 kernel tree instead - it gets the patches (and the bugs) earlier. ;-)

http://git.kernel.org/?p=linux/kernel/git/ivd/rt2x00.git;a=summary

I added the rt2x00 mailing list to CC.

Kind regards,

Iwo

#2 lore raw
Quoted 25 lines · Iwo Mergler
Quoted 13 lines · Paul Eddington

Hi,

While running the latest git kernel (linus' tree) and using a usb wifi card, I got this error in dmesg:;

phy2 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
Please file bug report to http://rt2x00.serialmonkey.com.

This is not reproducible easily, but it has occurred on two occasions both while connected to a WEP encrypted AP with a 40-bit key and performing many file samba transfers at full speed 54mbits.

Quoted 8 lines

I tried to report the bug there but was unable to register and edit the bug reports wiki page.
If there is any more information or help required to debug this, please let me know.

Regards,
Paul
--

Hi Paul,

Quoted 7 lines

the rt2x00 drivers are currently a very fast moving target. You may want to experiment with the rt2x00 kernel tree instead - it gets the patches (and the bugs) earlier. ;-)

http://git.kernel.org/?p=linux/kernel/git/ivd/rt2x00.git;a=summary

I added the rt2x00 mailing list to CC.

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Thanks,
Rafael

#3 lore raw
Quoted 30 lines · Rafael J. Wysocki
Quoted 29 lines · Iwo Mergler
Quoted 13 lines · Paul Eddington

Hi,

While running the latest git kernel (linus' tree) and using a usb wifi card, I got this error in dmesg:;

phy2 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
Please file bug report to http://rt2x00.serialmonkey.com.

This is not reproducible easily, but it has occurred on two occasions both while connected to a WEP encrypted AP with a 40-bit key and performing many file samba transfers at full speed 54mbits.

Quoted 8 lines

I tried to report the bug there but was unable to register and edit the bug reports wiki page.
If there is any more information or help required to debug this, please let me know.

Regards,
Paul
--

Hi Paul,

the rt2x00 drivers are currently a very fast moving target. You may want to experiment with the rt2x00 kernel tree instead - it gets the patches (and the bugs) earlier. ;-)

Quoted 7 lines
Quoted 3 lines

http://git.kernel.org/?p=linux/kernel/git/ivd/rt2x00.git;a=summary

I added the rt2x00 mailing list to CC.

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Seriously, this error message is the most annoying rt2x00 error message _ever_. It should have been fixed 3 kernels ago, but it keeps popping up again and again.

Paul, what is the git commit id with which you encountered this bug?

Ivo

#4 lore raw
Quoted 35 lines · Ivo van Doorn
Quoted 34 lines · Rafael J. Wysocki
Quoted 32 lines · Iwo Mergler
Quoted 13 lines · Paul Eddington

Hi,

While running the latest git kernel (linus' tree) and using a usb wifi card, I got this error in dmesg:;

phy2 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
Please file bug report to http://rt2x00.serialmonkey.com.

This is not reproducible easily, but it has occurred on two occasions both while connected to a WEP encrypted AP with a 40-bit key and performing many file samba transfers at full speed 54mbits.

Quoted 8 lines

I tried to report the bug there but was unable to register and edit the bug reports wiki page.
If there is any more information or help required to debug this, please let me know.

Regards,
Paul
--

Hi Paul,

the rt2x00 drivers are currently a very fast moving target. You may want to experiment with the rt2x00 kernel tree instead - it gets the patches (and the bugs) earlier. ;-)

http://git.kernel.org/?p=linux/kernel/git/ivd/rt2x00.git;a=summary

I added the rt2x00 mailing list to CC.

Quoted 8 lines
Quoted 3 lines

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Seriously, this error message is the most annoying rt2x00 error message _ever_. It should have been fixed 3 kernels ago, but it keeps popping up again and again.

Paul, what is the git commit id with which you encountered this bug?

Oh and please test rt2x00.git as well, since some patches which should fix this issue are in there (and in wireless-testing.git) but not in Linus' tree since they are scheduled for 2.6.28.

Ivo

#5 lore raw
Quoted 7 lines · Ivo van Doorn
Quoted 6 lines · Ivo van Doorn
Quoted 3 lines · Rafael J. Wysocki

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Quoted 8 lines
Quoted 4 lines

Seriously, this error message is the most annoying rt2x00 error message _ever_. It should have been fixed 3 kernels ago, but it keeps popping up again and again.

Paul, what is the git commit id with which you encountered this bug?

Oh and please test rt2x00.git as well, since some patches which should fix this issue are in there (and in wireless-testing.git) but not in Linus' tree since they are scheduled for 2.6.28.

Can you identify which fixes those are likely to be?

John

P.S. Of course, as you pointed out this isn't a new bug. Since it existed in 2.6.26, then technically it isn't a regression under current merging practices as I understand them.

Signature · 2 lines
John W. Linville		Linux should be at the core
[email protected]			of your literate lifestyle.
#6 lore raw
Quoted 11 lines · John W. Linville
Quoted 10 lines · Ivo van Doorn
Quoted 9 lines · Ivo van Doorn
Quoted 3 lines · Rafael J. Wysocki

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Seriously, this error message is the most annoying rt2x00 error message _ever_. It should have been fixed 3 kernels ago, but it keeps popping up again and again.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Paul, what is the git commit id with which you encountered this bug?

Oh and please test rt2x00.git as well, since some patches which should fix this issue are in there (and in wireless-testing.git) but not in Linus' tree since they are scheduled for 2.6.28.

Can you identify which fixes those are likely to be?

It is at least this one, I need to double check if there are any others as well.

rt2x00: Fix race conditions in flag handling
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=9fe32736d2cf27dfbf25cb7536c4358cd0dab6de

Quoted 5 lines

John

P.S. Of course, as you pointed out this isn't a new bug. Since it existed in 2.6.26, then technically it isn't a regression under current merging practices as I understand them.

Exactly, the bug has been there since rt2x00 arrived in 2.6.24 but because it is a race condition which occurs on rare occasions only it isn't reported that often. In 2.6.26 were some fixes which made the occurence rate even smaller, but they were still there for some users.

Ivo

#7 lore raw
Quoted 27 lines · Ivo van Doorn
Quoted 11 lines · John W. Linville
Quoted 10 lines · Ivo van Doorn
Quoted 9 lines · Ivo van Doorn
Quoted 3 lines · Rafael J. Wysocki

Well, according to the information I've received from Paul this particular problem is a regression from 2.6.26, so it's been added to the list of recent regressions.

Seriously, this error message is the most annoying rt2x00 error message _ever_. It should have been fixed 3 kernels ago, but it keeps popping up again and again.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Paul, what is the git commit id with which you encountered this bug?

Oh and please test rt2x00.git as well, since some patches which should fix this issue are in there (and in wireless-testing.git) but not in Linus' tree since they are scheduled for 2.6.28.

Can you identify which fixes those are likely to be?

It is at least this one, I need to double check if there are any others as well.

rt2x00: Fix race conditions in flag handling
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=9fe32736d2cf27dfbf25cb7536c4358cd0dab6de

Quoted 2 lines

John

Quoted 8 lines
Quoted 3 lines

P.S. Of course, as you pointed out this isn't a new bug. Since it existed in 2.6.26, then technically it isn't a regression under current merging practices as I understand them.

Exactly, the bug has been there since rt2x00 arrived in 2.6.24 but because it is a race condition which occurs on rare occasions only it isn't reported that often. In 2.6.26 were some fixes which made the occurence rate even smaller, but they were still there for some users.

From: Ivo van Doorn <[email protected]>
Subject: [PATCH] rt2x00: Fix race conditions in flag handling

Some of the flags should be accessed atomically to prevent race conditions. The flags that are most important are those that can change often and indicate the actual state of the device, queue or queue entry.

The big flag rename was done to move all state flags to the same naming type as the other rt2x00dev flags and made sure all places where the flags were used were changed. ;)

Thanks to Stephen for most of the queue flags updates, which fixes some of the most obvious consequences of the race conditions. Among those the notorious:

rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0. rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0. rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.

(Already in net-next-2.6, this version is adapted to 2.6.27-rc7. -- JWL)

---
 drivers/net/wireless/rt2x00/rt2400pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2x00.h       |   16 ++++----
 drivers/net/wireless/rt2x00/rt2x00config.c |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   58 ++++++++++++++-------------
 drivers/net/wireless/rt2x00/rt2x00mac.c    |   26 ++++++------
 drivers/net/wireless/rt2x00/rt2x00queue.c  |    6 +-
 drivers/net/wireless/rt2x00/rt2x00rfkill.c |    6 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   10 ++--
 drivers/net/wireless/rt2x00/rt61pci.c      |    2 +-
 11 files changed, 68 insertions(+), 66 deletions(-)
drivers/net/wireless/rt2x00/rt2400pci.c +1 -1
index 4c0538d..4bcb065 100644
@@ -1241,7 +1241,7 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
 	if (!reg)
 		return IRQ_NONE;
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		return IRQ_HANDLED;
 
 	/*
drivers/net/wireless/rt2x00/rt2500pci.c +1 -1
index 181a146..c1156e3 100644
@@ -1377,7 +1377,7 @@ static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance)
 	if (!reg)
 		return IRQ_NONE;
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		return IRQ_HANDLED;
 
 	/*
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
index cd5af65..a055687 100644
@@ -1297,7 +1297,7 @@ static void rt2500usb_beacondone(struct urb *urb)
 	struct queue_entry *entry = (struct queue_entry *)urb->context;
 	struct queue_entry_priv_usb_bcn *bcn_priv = entry->priv_data;
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &entry->queue->rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &entry->queue->rt2x00dev->flags))
 		return;
 
 	/*
drivers/net/wireless/rt2x00/rt2x00.h +8 -8
index 8b10ea4..21b08ea 100644
@@ -599,14 +599,14 @@ enum rt2x00_flags {
 	/*
 	 * Device state flags
 	 */
-	DEVICE_PRESENT,
-	DEVICE_REGISTERED_HW,
-	DEVICE_INITIALIZED,
-	DEVICE_STARTED,
-	DEVICE_STARTED_SUSPEND,
-	DEVICE_ENABLED_RADIO,
-	DEVICE_DISABLED_RADIO_HW,
-	DEVICE_DIRTY_CONFIG,
+	DEVICE_STATE_PRESENT,
+	DEVICE_STATE_REGISTERED_HW,
+	DEVICE_STATE_INITIALIZED,
+	DEVICE_STATE_STARTED,
+	DEVICE_STATE_STARTED_SUSPEND,
+	DEVICE_STATE_ENABLED_RADIO,
+	DEVICE_STATE_DISABLED_RADIO_HW,
+	DEVICE_STATE_DIRTY_CONFIG,
 
 	/*
 	 * Driver features
drivers/net/wireless/rt2x00/rt2x00config.c +2 -2
index d134c3b..0153fb6 100644
@@ -121,7 +121,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	 * Antenna setup changes require the RX to be disabled,
 	 * else the changes will be ignored by the device.
 	 */
-	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK);
 
 	/*
@@ -136,7 +136,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	rt2x00dev->link.ant.active.rx = libconf.ant.rx;
 	rt2x00dev->link.ant.active.tx = libconf.ant.tx;
 
-	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
 }
 
drivers/net/wireless/rt2x00/rt2x00dev.c +30 -28

207 lines not on this page · raw message

drivers/net/wireless/rt2x00/rt2x00mac.c +13 -13
index d065073..d4ce351 100644
@@ -106,7 +106,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	 * Note that we can only stop the TX queues inside the TX path
 	 * due to possible race conditions in mac80211.
 	 */
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) {
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) {
 		ieee80211_stop_queues(hw);
 		dev_kfree_skb_any(skb);
 		return NETDEV_TX_OK;
@@ -168,7 +168,7 @@ int rt2x00mac_start(struct ieee80211_hw *hw)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
 		return 0;
 
 	return rt2x00lib_start(rt2x00dev);
@@ -179,7 +179,7 @@ void rt2x00mac_stop(struct ieee80211_hw *hw)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
 		return;
 
 	rt2x00lib_stop(rt2x00dev);
@@ -199,8 +199,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 	 * Don't allow interfaces to be added
 	 * the device has disappeared.
 	 */
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags) ||
-	    !test_bit(DEVICE_STARTED, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
+	    !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags))
 		return -ENODEV;
 
 	switch (conf->type) {
@@ -249,7 +249,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 	 */
 	for (i = 0; i < queue->limit; i++) {
 		entry = &queue->entries[i];
-		if (!__test_and_set_bit(ENTRY_BCN_ASSIGNED, &entry->flags))
+		if (!test_and_set_bit(ENTRY_BCN_ASSIGNED, &entry->flags))
 			break;
 	}
 
@@ -303,7 +303,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 	 * either the device has disappeared or when
 	 * no interface is present.
 	 */
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags) ||
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
 	    (conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) ||
 	    (conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count))
 		return;
@@ -317,7 +317,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 	 * Release beacon entry so it is available for
 	 * new interfaces again.
 	 */
-	__clear_bit(ENTRY_BCN_ASSIGNED, &intf->beacon->flags);
+	clear_bit(ENTRY_BCN_ASSIGNED, &intf->beacon->flags);
 
 	/*
 	 * Make sure the bssid and mac address registers
@@ -337,14 +337,14 @@ int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
 	 * Mac80211 might be calling this function while we are trying
 	 * to remove the device or perhaps suspending it.
 	 */
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
 		return 0;
 
 	/*
 	 * Check if we need to disable the radio,
 	 * if this is not the case, at least the RX must be disabled.
 	 */
-	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) {
+	if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) {
 		if (!conf->radio_enabled)
 			rt2x00lib_disable_radio(rt2x00dev);
 		else
@@ -359,14 +359,14 @@ int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
 	 * initialized.
 	 */
 	force_reconfig =
-	    __test_and_clear_bit(DEVICE_DIRTY_CONFIG, &rt2x00dev->flags);
+	    test_and_clear_bit(DEVICE_STATE_DIRTY_CONFIG, &rt2x00dev->flags);
 
 	rt2x00lib_config(rt2x00dev, conf, force_reconfig);
 
 	/*
 	 * Reenable RX only if the radio should be on.
 	 */
-	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
 	else if (conf->radio_enabled)
 		return rt2x00lib_enable_radio(rt2x00dev);
@@ -388,7 +388,7 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw,
 	 * Mac80211 might be calling this function while we are trying
 	 * to remove the device or perhaps suspending it.
 	 */
-	if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
 		return 0;
 
 	spin_lock(&intf->lock);
drivers/net/wireless/rt2x00/rt2x00queue.c +3 -3
index 898cdd7..794d950 100644
@@ -309,7 +309,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
 	if (unlikely(rt2x00queue_full(queue)))
 		return -EINVAL;
 
-	if (__test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) {
+	if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) {
 		ERROR(queue->rt2x00dev,
 		      "Arrived at non-free entry in the non-full queue %d.\n"
 		      "Please file bug report to %s.\n",
@@ -333,14 +333,14 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
 	skbdesc->entry = entry;
 
 	if (unlikely(queue->rt2x00dev->ops->lib->write_tx_data(entry))) {
-		__clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
+		clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
 		return -EIO;
 	}
 
 	if (test_bit(DRIVER_REQUIRE_DMA, &queue->rt2x00dev->flags))
 		rt2x00queue_map_txskb(queue->rt2x00dev, skb);
 
-	__set_bit(ENTRY_DATA_PENDING, &entry->flags);
+	set_bit(ENTRY_DATA_PENDING, &entry->flags);
 
 	rt2x00queue_index_inc(queue, Q_INDEX);
 	rt2x00queue_write_tx_descriptor(entry, &txdesc);
drivers/net/wireless/rt2x00/rt2x00rfkill.c +3 -3
index 04b2971..8a2fefb 100644
@@ -41,16 +41,16 @@ static int rt2x00rfkill_toggle_radio(void *data, enum rfkill_state state)
 	/*
 	 * Only continue if there are enabled interfaces.
 	 */
-	if (!test_bit(DEVICE_STARTED, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags))
 		return 0;
 
 	if (state == RFKILL_STATE_UNBLOCKED) {
 		INFO(rt2x00dev, "Hardware button pressed, enabling radio.\n");
-		__clear_bit(DEVICE_DISABLED_RADIO_HW, &rt2x00dev->flags);
+		clear_bit(DEVICE_STATE_DISABLED_RADIO_HW, &rt2x00dev->flags);
 		retval = rt2x00lib_enable_radio(rt2x00dev);
 	} else if (state == RFKILL_STATE_SOFT_BLOCKED) {
 		INFO(rt2x00dev, "Hardware button pressed, disabling radio.\n");
-		__set_bit(DEVICE_DISABLED_RADIO_HW, &rt2x00dev->flags);
+		set_bit(DEVICE_STATE_DISABLED_RADIO_HW, &rt2x00dev->flags);
 		rt2x00lib_disable_radio(rt2x00dev);
 	} else {
 		WARNING(rt2x00dev, "Received unexpected rfkill state %d.\n",
drivers/net/wireless/rt2x00/rt2x00usb.c +5 -5
index 2050227..2dd7c83 100644
@@ -163,7 +163,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
 	struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
 	struct txdone_entry_desc txdesc;
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) ||
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
 	    !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
 		return;
 
@@ -232,7 +232,7 @@ static inline void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
 {
 	struct queue_entry_priv_usb *entry_priv = entry->priv_data;
 
-	if (__test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
+	if (test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
 		usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
 }
 
@@ -283,7 +283,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
 	struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
 	u8 rxd[32];
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) ||
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
 	    !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
 		return;
 
@@ -293,7 +293,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
 	 * a problem.
 	 */
 	if (urb->actual_length < entry->queue->desc_size || urb->status) {
-		__set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
+		set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
 		usb_submit_urb(urb, GFP_ATOMIC);
 		return;
 	}
@@ -361,7 +361,7 @@ void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev,
 			  entry->skb->data, entry->skb->len,
 			  rt2x00usb_interrupt_rxdone, entry);
 
-	__set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
+	set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
 	usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
 }
 EXPORT_SYMBOL_GPL(rt2x00usb_init_rxentry);
drivers/net/wireless/rt2x00/rt61pci.c +1 -1
index 087e90b..d0be02e 100644
@@ -1860,7 +1860,7 @@ static irqreturn_t rt61pci_interrupt(int irq, void *dev_instance)
 	if (!reg && !reg_mcu)
 		return IRQ_NONE;
 
-	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+	if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
 		return IRQ_HANDLED;
 
 	/*
Signature · 5 lines
1.5.4.3

-- 
John W. Linville		Linux should be at the core
[email protected]			of your literate lifestyle.