libertas: switch to a waitqueue and timer for handling USB firmware load

No need to busy-wait, even if we did have a 100ms delay in the loop.
This makes it easier to support the new 'firmware ready' event which is
in the new firmware, too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Woodhouse
2007-12-11 00:07:58 -05:00
committed by David S. Miller
parent c8ba39d060
commit 4f82f5c853
2 changed files with 31 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
#ifndef _LBS_IF_USB_H
#define _LBS_IF_USB_H
#include <linux/wait.h>
#include <linux/timer.h>
/**
* This file contains definition for USB interface.
*/
@@ -56,6 +59,8 @@ struct usb_card_rec {
u8 bulk_out_endpointAddr;
const struct firmware *fw;
struct timer_list fw_timeout;
wait_queue_head_t fw_wq;
u8 CRC_OK;
u32 fwseqnum;
u32 lastseqnum;