aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-11 15:23:59 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:46 -0500
commit301eacbf30e33f461701df91cb250d3fc24c5fe5 (patch)
tree287a89838a0e5a36f390fba615e60bdc75baa037 /drivers/net/wireless/libertas/cmd.c
parentad9d7a7f3cc73a6288920cc17c807f56bd8327fc (diff)
libertas: convert CMD_MESH_ACCESS to a direct command
Signed-off-by: David Woodhouse <dwmw2@infradead.org> 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.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index eeb09e05903c..9d621fe7f08a 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -976,27 +976,25 @@ static int lbs_cmd_fwt_access(struct lbs_private *priv,
976 return 0; 976 return 0;
977} 977}
978 978
979static int lbs_cmd_mesh_access(struct lbs_private *priv, 979int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
980 struct cmd_ds_command *cmd, 980 struct cmd_ds_mesh_access *cmd)
981 u16 cmd_action, void *pdata_buf)
982{ 981{
983 struct cmd_ds_mesh_access *mesh_access = &cmd->params.mesh; 982 int ret;
983
984 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); 984 lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action);
985 985
986 cmd->command = cpu_to_le16(CMD_MESH_ACCESS); 986 cmd->hdr.command = cpu_to_le16(CMD_MESH_ACCESS);
987 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN); 987 cmd->hdr.size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN);
988 cmd->result = 0; 988 cmd->hdr.result = 0;
989 989
990 if (pdata_buf) 990 cmd->action = cpu_to_le16(cmd_action);
991 memcpy(mesh_access, pdata_buf, sizeof(*mesh_access));
992 else
993 memset(mesh_access, 0, sizeof(*mesh_access));
994 991
995 mesh_access->action = cpu_to_le16(cmd_action); 992 ret = lbs_cmd_with_response(priv, CMD_MESH_ACCESS, (*cmd));
996 993
997 lbs_deb_leave(LBS_DEB_CMD); 994 lbs_deb_leave(LBS_DEB_CMD);
998 return 0; 995 return ret;
999} 996}
997EXPORT_SYMBOL_GPL(lbs_mesh_access);
1000 998
1001static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, 999static int lbs_cmd_bcn_ctrl(struct lbs_private * priv,
1002 struct cmd_ds_command *cmd, 1000 struct cmd_ds_command *cmd,
@@ -1486,10 +1484,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1486 ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf); 1484 ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
1487 break; 1485 break;
1488 1486
1489 case CMD_MESH_ACCESS:
1490 ret = lbs_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
1491 break;
1492
1493 case CMD_GET_TSF: 1487 case CMD_GET_TSF:
1494 cmdptr->command = cpu_to_le16(CMD_GET_TSF); 1488 cmdptr->command = cpu_to_le16(CMD_GET_TSF);
1495 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) + 1489 cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) +