kernel/drivers/net/wireless/ath/ar5523/ar5523.c
.. .. @@ -241,6 +241,11 @@ 241 241 } 242 242 } 243 243 244 +static void ar5523_cancel_tx_cmd(struct ar5523 *ar)245 +{246 + usb_kill_urb(ar->tx_cmd.urb_tx);247 +}248 +244 249 static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata, 245 250 int ilen, void *odata, int olen, int flags) 246 251 { .. .. @@ -280,6 +285,7 @@ 280 285 } 281 286 282 287 if (!wait_for_completion_timeout(&cmd->done, 2 * HZ)) { 288 + ar5523_cancel_tx_cmd(ar);283 289 cmd->odata = NULL; 284 290 ar5523_err(ar, "timeout waiting for command %02x reply\n", 285 291 code);