Commit c8ba39d0 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

libertas: improve reliability of firmware reloading on USB

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: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8552855f
...@@ -389,9 +389,9 @@ static int if_usb_reset_device(struct usb_card_rec *cardp) ...@@ -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); 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)); 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); ret = usb_reset_device(cardp->udev);
msleep(10); msleep(100);
lbs_deb_leave_args(LBS_DEB_USB, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_USB, "ret %d", ret);
...@@ -500,7 +500,7 @@ static void if_usb_receive_fwload(struct urb *urb) ...@@ -500,7 +500,7 @@ static void if_usb_receive_fwload(struct urb *urb)
return; return;
} }
if (cardp->bootcmdresp == 0) { if (cardp->bootcmdresp <= 0) {
memcpy (&bootcmdresp, skb->data + IPFIELD_ALIGN_OFFSET, memcpy (&bootcmdresp, skb->data + IPFIELD_ALIGN_OFFSET,
sizeof(bootcmdresp)); sizeof(bootcmdresp));
if (le16_to_cpu(cardp->udev->descriptor.bcdDevice) < 0x3106) { if (le16_to_cpu(cardp->udev->descriptor.bcdDevice) < 0x3106) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment