aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-11-04 15:41:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:26:07 -0500
commit070192dd2975c0e97bbdeac7623b755235c6db7d (patch)
treee7720e75b93f08fe5f3c37a87b26f75b483ca97b /drivers/net/wireless/rt2x00/rt2x00usb.c
parent303c7d6abfd0430e39e84a43361492b4a8c890b6 (diff)
rt2x00: Fix crash on USB unplug
By not scheduling the TX/RX completion worker threads when Radio is disabled, or hardware has been unplugged, the queues cannot be completely cleaned. This causes crashes when the hardware has been unplugged while the radio is still enabled. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 6dd96192dd91..9ac14598e2a0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -226,9 +226,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
226 * Schedule the delayed work for reading the TX status 226 * Schedule the delayed work for reading the TX status
227 * from the device. 227 * from the device.
228 */ 228 */
229 if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) && 229 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->txdone_work);
230 test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
231 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->txdone_work);
232} 230}
233 231
234static void rt2x00usb_kick_tx_entry(struct queue_entry *entry) 232static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
@@ -409,9 +407,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
409 * Schedule the delayed work for reading the RX status 407 * Schedule the delayed work for reading the RX status
410 * from the device. 408 * from the device.
411 */ 409 */
412 if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) && 410 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->rxdone_work);
413 test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
414 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->rxdone_work);
415} 411}
416 412
417/* 413/*