aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-10-22 09:30:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:39 -0400
commit8ec97cc803e1d52022e916074415acaec276288c (patch)
tree911a0c21873162726e23942a175d1cc2f990e5d9 /drivers/net/wireless/libertas/cmd.c
parentb856f73b39ca6b619e6e8d088141aec3ff62852c (diff)
libertas: remove "struct cmd_ds_gen"
It was only used as a source for S_DS_GEN, but the size of this struct is equal to the size of "struct cmd_header". Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> 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.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index b7b562445cf1..5326483b50d2 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -239,7 +239,7 @@ static int lbs_cmd_802_11_ps_mode(struct cmd_ds_command *cmd,
239 239
240 cmd->command = cpu_to_le16(CMD_802_11_PS_MODE); 240 cmd->command = cpu_to_le16(CMD_802_11_PS_MODE);
241 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_ps_mode) + 241 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_ps_mode) +
242 S_DS_GEN); 242 sizeof(struct cmd_header));
243 psm->action = cpu_to_le16(cmd_action); 243 psm->action = cpu_to_le16(cmd_action);
244 psm->multipledtim = 0; 244 psm->multipledtim = 0;
245 switch (cmd_action) { 245 switch (cmd_action) {
@@ -534,7 +534,7 @@ static int lbs_cmd_802_11_monitor_mode(struct cmd_ds_command *cmd,
534 cmd->command = cpu_to_le16(CMD_802_11_MONITOR_MODE); 534 cmd->command = cpu_to_le16(CMD_802_11_MONITOR_MODE);
535 cmd->size = 535 cmd->size =
536 cpu_to_le16(sizeof(struct cmd_ds_802_11_monitor_mode) + 536 cpu_to_le16(sizeof(struct cmd_ds_802_11_monitor_mode) +
537 S_DS_GEN); 537 sizeof(struct cmd_header));
538 538
539 monitor->action = cpu_to_le16(cmd_action); 539 monitor->action = cpu_to_le16(cmd_action);
540 if (cmd_action == CMD_ACT_SET) { 540 if (cmd_action == CMD_ACT_SET) {
@@ -643,7 +643,7 @@ static int lbs_cmd_reg_access(struct cmd_ds_command *cmdptr,
643 643
644 cmdptr->size = 644 cmdptr->size =
645 cpu_to_le16(sizeof (struct cmd_ds_mac_reg_access) 645 cpu_to_le16(sizeof (struct cmd_ds_mac_reg_access)
646 + S_DS_GEN); 646 + sizeof(struct cmd_header));
647 macreg = 647 macreg =
648 (struct cmd_ds_mac_reg_access *)&cmdptr->params. 648 (struct cmd_ds_mac_reg_access *)&cmdptr->params.
649 macreg; 649 macreg;
@@ -662,7 +662,7 @@ static int lbs_cmd_reg_access(struct cmd_ds_command *cmdptr,
662 cmdptr->size = 662 cmdptr->size =
663 cpu_to_le16(sizeof 663 cpu_to_le16(sizeof
664 (struct cmd_ds_bbp_reg_access) 664 (struct cmd_ds_bbp_reg_access)
665 + S_DS_GEN); 665 + sizeof(struct cmd_header));
666 bbpreg = 666 bbpreg =
667 (struct cmd_ds_bbp_reg_access *)&cmdptr->params. 667 (struct cmd_ds_bbp_reg_access *)&cmdptr->params.
668 bbpreg; 668 bbpreg;
@@ -681,7 +681,7 @@ static int lbs_cmd_reg_access(struct cmd_ds_command *cmdptr,
681 cmdptr->size = 681 cmdptr->size =
682 cpu_to_le16(sizeof 682 cpu_to_le16(sizeof
683 (struct cmd_ds_rf_reg_access) + 683 (struct cmd_ds_rf_reg_access) +
684 S_DS_GEN); 684 sizeof(struct cmd_header));
685 rfreg = 685 rfreg =
686 (struct cmd_ds_rf_reg_access *)&cmdptr->params. 686 (struct cmd_ds_rf_reg_access *)&cmdptr->params.
687 rfreg; 687 rfreg;
@@ -708,7 +708,8 @@ static int lbs_cmd_bt_access(struct cmd_ds_command *cmd,
708 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); 708 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action);
709 709
710 cmd->command = cpu_to_le16(CMD_BT_ACCESS); 710 cmd->command = cpu_to_le16(CMD_BT_ACCESS);
711 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_bt_access) + S_DS_GEN); 711 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_bt_access) +
712 sizeof(struct cmd_header));
712 cmd->result = 0; 713 cmd->result = 0;
713 bt_access->action = cpu_to_le16(cmd_action); 714 bt_access->action = cpu_to_le16(cmd_action);
714 715
@@ -745,7 +746,8 @@ static int lbs_cmd_fwt_access(struct cmd_ds_command *cmd,
745 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); 746 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action);
746 747
747 cmd->command = cpu_to_le16(CMD_FWT_ACCESS); 748 cmd->command = cpu_to_le16(CMD_FWT_ACCESS);
748 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_fwt_access) + S_DS_GEN); 749 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_fwt_access) +
750 sizeof(struct cmd_header));
749 cmd->result = 0; 751 cmd->result = 0;
750 752
751 if (pdata_buf) 753 if (pdata_buf)
@@ -1161,7 +1163,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1161 1163
1162 cmdptr->command = cpu_to_le16(cmd_no); 1164 cmdptr->command = cpu_to_le16(cmd_no);
1163 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_afc) + 1165 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_afc) +
1164 S_DS_GEN); 1166 sizeof(struct cmd_header));
1165 1167
1166 memmove(&cmdptr->params.afc, 1168 memmove(&cmdptr->params.afc,
1167 pdata_buf, sizeof(struct cmd_ds_802_11_afc)); 1169 pdata_buf, sizeof(struct cmd_ds_802_11_afc));
@@ -1173,7 +1175,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1173 cmdptr->command = cpu_to_le16(CMD_802_11_TPC_CFG); 1175 cmdptr->command = cpu_to_le16(CMD_802_11_TPC_CFG);
1174 cmdptr->size = 1176 cmdptr->size =
1175 cpu_to_le16(sizeof(struct cmd_ds_802_11_tpc_cfg) + 1177 cpu_to_le16(sizeof(struct cmd_ds_802_11_tpc_cfg) +
1176 S_DS_GEN); 1178 sizeof(struct cmd_header));
1177 1179
1178 memmove(&cmdptr->params.tpccfg, 1180 memmove(&cmdptr->params.tpccfg,
1179 pdata_buf, sizeof(struct cmd_ds_802_11_tpc_cfg)); 1181 pdata_buf, sizeof(struct cmd_ds_802_11_tpc_cfg));
@@ -1194,7 +1196,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1194 break; 1196 break;
1195 case CMD_802_11_DEEP_SLEEP: 1197 case CMD_802_11_DEEP_SLEEP:
1196 cmdptr->command = cpu_to_le16(CMD_802_11_DEEP_SLEEP); 1198 cmdptr->command = cpu_to_le16(CMD_802_11_DEEP_SLEEP);
1197 cmdptr->size = cpu_to_le16(S_DS_GEN); 1199 cmdptr->size = cpu_to_le16(sizeof(struct cmd_header));
1198 break; 1200 break;
1199 default: 1201 default:
1200 lbs_pr_err("PREP_CMD: unknown command 0x%04x\n", cmd_no); 1202 lbs_pr_err("PREP_CMD: unknown command 0x%04x\n", cmd_no);