- usb_unlink_urb(kaweth->irq_urb);
- usb_unlink_urb(kaweth->rx_urb);
-
- /* we need to wait for the urb to be cancelled, if it is active */
- spin_lock(&kaweth->device_lock);
- if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) {
- spin_unlock(&kaweth->device_lock);
- wait_event(kaweth->term_wait, kaweth->end);
- } else {
- spin_unlock(&kaweth->device_lock);
- }
-
- if(kaweth->net) {
- if(kaweth->net->flags & IFF_UP) {
- kaweth_dbg("Closing net device");
- dev_close(kaweth->net);
- }
+ usb_kill_urb(kaweth->irq_urb);
+ usb_kill_urb(kaweth->rx_urb);
+ usb_kill_urb(kaweth->tx_urb);