libertas: Use lbs_cmd() for setting Boot2 version
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 6 Dec 2007 12:51:00 +0000 (12:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:06:09 +0000 (15:06 -0800)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_usb.c

index f8589283d7bcc6c5e688a038c2d129d438e4466e..4d89fd0f53ea0e13b065b46d2de8c9e5ff37c86f 100644 (file)
@@ -101,6 +101,21 @@ static void if_usb_free(struct usb_card_rec *cardp)
        lbs_deb_leave(LBS_DEB_USB);
 }
 
+static void if_usb_set_boot2_ver(struct lbs_private *priv)
+{
+       struct cmd_ds_set_boot2_ver b2_cmd;
+       int rsp_len = sizeof(b2_cmd);
+
+       b2_cmd.action = 0;
+       b2_cmd.version = cpu_to_le16(priv->boot2_version);
+
+       if (lbs_cmd(priv, CMD_SET_BOOT2_VER, &b2_cmd, sizeof(b2_cmd),
+                   &b2_cmd, &rsp_len)) {
+               lbs_deb_usb("Setting boot2 version failed\n");
+       }
+}
+
+
 /**
  *  @brief sets the configuration values
  *  @param ifnum       interface number
@@ -222,10 +237,7 @@ static int if_usb_probe(struct usb_interface *intf,
        if (lbs_start_card(priv))
                goto err_start_card;
 
-       /* Set the boot2 version in firmware, ignoring errors. */
-       (void)lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
-                                          0, CMD_OPTION_WAITFORRSP, 0, NULL);
-
+       if_usb_set_boot2_ver(priv);
 
        usb_get_dev(udev);
        usb_set_intfdata(intf, cardp);