libertas: move cardspecific data to driver
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Wed, 16 Jan 2008 14:52:58 +0000 (15:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:10:05 +0000 (15:10 -0800)
boot2_version is purely USB specific, so move it to struct if_usb_card.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/if_usb.c
drivers/net/wireless/libertas/if_usb.h

index 362975189e928c7f5d4c7ad420f94a02b6566978..c1c9733c5f9e48760a2bcbc50c2a923b056e1a32 100644 (file)
@@ -102,7 +102,6 @@ struct lbs_private {
        int mesh_open;
        int infra_open;
        int mesh_autostart_enabled;
-       __le16 boot2_version;
 
        char name[DEV_NAME_LEN];
 
index 7db8e6c35dc28b56f62d95278cdbc2a5d9d333cc..75aed9d0736702007725e6fab0ee94b6b39dfeea 100644 (file)
@@ -104,12 +104,13 @@ static void if_usb_free(struct if_usb_card *cardp)
 
 static void if_usb_setup_firmware(struct lbs_private *priv)
 {
+       struct if_usb_card *cardp = priv->card;
        struct cmd_ds_set_boot2_ver b2_cmd;
        struct cmd_ds_802_11_fw_wake_method wake_method;
 
        b2_cmd.hdr.size = cpu_to_le16(sizeof(b2_cmd));
        b2_cmd.action = 0;
-       b2_cmd.version = priv->boot2_version;
+       b2_cmd.version = cardp->boot2_version;
 
        if (lbs_cmd_with_response(priv, CMD_SET_BOOT2_VER, &b2_cmd))
                lbs_deb_usb("Setting boot2 version failed\n");
@@ -234,7 +235,7 @@ static int if_usb_probe(struct usb_interface *intf,
        priv->hw_host_to_card = if_usb_host_to_card;
        priv->hw_get_int_status = if_usb_get_int_status;
        priv->hw_read_event_cause = if_usb_read_event_cause;
-       priv->boot2_version = udev->descriptor.bcdDevice;
+       cardp->boot2_version = udev->descriptor.bcdDevice;
 
        if_usb_submit_rx_urb(cardp);
 
index 77066911230b88280bb459211480ae1b7397b239..e4829a391eb9be7ed39688eb1cc5e04eadd14168 100644 (file)
@@ -70,6 +70,7 @@ struct if_usb_card {
        uint8_t fwfinalblk;
        uint8_t surprise_removed;
 
+       __le16 boot2_version;
 };
 
 /** fwheader */