[PATCH] libertas: reorganize and simplify init sequence
This patch moves all firmware load responsibility into the interface-specific code and gets rid of the firmware pointer in the generic card structure. It also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev, and hw_prog_firmware. It also makes the init sequence from interface probe functions more logical, as there are paired add/remove and start/stop calls into generic libertas code. Because the USB driver code uses the same TX URB callback for both firmware upload (where the generic libertas structure isn't initialized yet) and for normal operation (where it is), some bits of USB code have to deal with 'priv' being NULL. All USB firmware upload bits have been changed to not require 'priv' at all, but simply the USB card structure. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
David S. Miller
parent
b1b1907dce
commit
954ee164f4
@@ -38,7 +38,7 @@ struct bootcmdrespStr
|
||||
|
||||
/* read callback private data */
|
||||
struct read_cb_info {
|
||||
wlan_private *priv;
|
||||
struct usb_card_rec *cardp;
|
||||
struct sk_buff *skb;
|
||||
};
|
||||
|
||||
@@ -58,6 +58,7 @@ struct usb_card_rec {
|
||||
int bulk_out_size;
|
||||
u8 bulk_out_endpointAddr;
|
||||
|
||||
const struct firmware *fw;
|
||||
u8 CRC_OK;
|
||||
u32 fwseqnum;
|
||||
u32 lastseqnum;
|
||||
@@ -65,6 +66,7 @@ struct usb_card_rec {
|
||||
u32 fwlastblksent;
|
||||
u8 fwdnldover;
|
||||
u8 fwfinalblk;
|
||||
u8 surprise_removed;
|
||||
|
||||
u32 usb_event_cause;
|
||||
u8 usb_int_cause;
|
||||
|
Reference in New Issue
Block a user