Skip to content

Commit

Permalink
libertas: improve reliability of firmware reloading on USB
Browse files Browse the repository at this point in the history
Increase the delay between issuing the RESET command and the usb reset,
and be prepared to discard more than one 'normal' packet from it before
it resets.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 8552855 commit c8ba39d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
cmd->params.reset.action = cpu_to_le16(CMD_ACT_HALT);
usb_tx_block(cardp, cardp->bulk_out_buffer, 4 + S_DS_GEN + sizeof(struct cmd_ds_802_11_reset));

msleep(10);
msleep(100);
ret = usb_reset_device(cardp->udev);
msleep(10);
msleep(100);

lbs_deb_leave_args(LBS_DEB_USB, "ret %d", ret);

Expand Down Expand Up @@ -500,7 +500,7 @@ static void if_usb_receive_fwload(struct urb *urb)
return;
}

if (cardp->bootcmdresp == 0) {
if (cardp->bootcmdresp <= 0) {
memcpy (&bootcmdresp, skb->data + IPFIELD_ALIGN_OFFSET,
sizeof(bootcmdresp));
if (le16_to_cpu(cardp->udev->descriptor.bcdDevice) < 0x3106) {
Expand Down

0 comments on commit c8ba39d

Please sign in to comment.