aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorLuis Carlos Cobo <luisca@cozybit.com>2007-08-02 13:19:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:15 -0400
commit63f0023bc34073bea8452a4770540c954f98208f (patch)
treea38556a66eb9ca81a2bac770ba32e3c6fe5f234a /drivers/net/wireless/libertas/cmd.c
parent2afc0c5d71a3dec6d35f3a234ed986d635ef41ad (diff)
[PATCH] libertas: pass boot2 version to firmware
Boot2 version used to be hardcoded in the uploaded firmware, this patch preserves the boot2 version before uploading firmware and sends it to the firmware again on resume. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 72e8e27a6fb7..98092b995352 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -901,6 +901,17 @@ static int wlan_cmd_mesh_access(wlan_private * priv,
901 return 0; 901 return 0;
902} 902}
903 903
904static int wlan_cmd_set_boot2_ver(wlan_private * priv,
905 struct cmd_ds_command *cmd,
906 u16 cmd_action, void *pdata_buf)
907{
908 struct cmd_ds_set_boot2_ver *boot2_ver = &cmd->params.boot2_ver;
909 cmd->command = cpu_to_le16(CMD_SET_BOOT2_VER);
910 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_set_boot2_ver) + S_DS_GEN);
911 boot2_ver->version = priv->boot2_version;
912 return 0;
913}
914
904void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) 915void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
905{ 916{
906 unsigned long flags; 917 unsigned long flags;
@@ -1372,6 +1383,10 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1372 ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf); 1383 ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
1373 break; 1384 break;
1374 1385
1386 case CMD_SET_BOOT2_VER:
1387 ret = wlan_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
1388 break;
1389
1375 case CMD_GET_TSF: 1390 case CMD_GET_TSF:
1376 cmdptr->command = cpu_to_le16(CMD_GET_TSF); 1391 cmdptr->command = cpu_to_le16(CMD_GET_TSF);
1377 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) + 1392 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) +