aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/if_usb.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-06 07:51:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:09 -0500
commit04c80f1ab1333f21aa4e92f3554e83365da449a0 (patch)
tree0422d240b31c3cf88daf9b92e821fc41f5f23c0a /drivers/net/wireless/libertas/if_usb.c
parent09d4fad6e8972061fbb0e2e5ae9e686d84f57af6 (diff)
libertas: Use lbs_cmd() for setting Boot2 version
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_usb.c')
-rw-r--r--drivers/net/wireless/libertas/if_usb.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index f8589283d7bc..4d89fd0f53ea 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -101,6 +101,21 @@ static void if_usb_free(struct usb_card_rec *cardp)
101 lbs_deb_leave(LBS_DEB_USB); 101 lbs_deb_leave(LBS_DEB_USB);
102} 102}
103 103
104static void if_usb_set_boot2_ver(struct lbs_private *priv)
105{
106 struct cmd_ds_set_boot2_ver b2_cmd;
107 int rsp_len = sizeof(b2_cmd);
108
109 b2_cmd.action = 0;
110 b2_cmd.version = cpu_to_le16(priv->boot2_version);
111
112 if (lbs_cmd(priv, CMD_SET_BOOT2_VER, &b2_cmd, sizeof(b2_cmd),
113 &b2_cmd, &rsp_len)) {
114 lbs_deb_usb("Setting boot2 version failed\n");
115 }
116}
117
118
104/** 119/**
105 * @brief sets the configuration values 120 * @brief sets the configuration values
106 * @param ifnum interface number 121 * @param ifnum interface number
@@ -222,10 +237,7 @@ static int if_usb_probe(struct usb_interface *intf,
222 if (lbs_start_card(priv)) 237 if (lbs_start_card(priv))
223 goto err_start_card; 238 goto err_start_card;
224 239
225 /* Set the boot2 version in firmware, ignoring errors. */ 240 if_usb_set_boot2_ver(priv);
226 (void)lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
227 0, CMD_OPTION_WAITFORRSP, 0, NULL);
228
229 241
230 usb_get_dev(udev); 242 usb_get_dev(udev);
231 usb_set_intfdata(intf, cardp); 243 usb_set_intfdata(intf, cardp);