rt2x00: Fix rmmod hang of rt2800pci
authorGertjan van Wingerde <gwingerde@gmail.com>
Sat, 7 May 2011 15:27:46 +0000 (17:27 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 May 2011 19:54:48 +0000 (15:54 -0400)
txstatus_timer should only be deleted for USB devices, as it is only
initialized for USB devices.

Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 2eb5196..c018d67 100644 (file)
@@ -1159,9 +1159,9 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
        /*
         * Stop all work.
         */
-       del_timer_sync(&rt2x00dev->txstatus_timer);
        cancel_work_sync(&rt2x00dev->intf_work);
        if (rt2x00_is_usb(rt2x00dev)) {
+               del_timer_sync(&rt2x00dev->txstatus_timer);
                cancel_work_sync(&rt2x00dev->rxdone_work);
                cancel_work_sync(&rt2x00dev->txdone_work);
        }