aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-18 00:47:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:50 -0500
commit4f59abf190b15350167bec5382dda205030ac9d0 (patch)
treecf9b66dfceafa12202b9db1d5d426b922d107d9c /drivers/net/wireless/libertas/cmd.c
parentf70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020 (diff)
libertas: convert ENABLE_RSN 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.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 05e25cef5fe3..5d2c928fdd36 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -300,30 +300,31 @@ done:
300 return ret; 300 return ret;
301} 301}
302 302
303static int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, 303int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, uint16_t cmd_action,
304 struct cmd_ds_command *cmd, 304 uint16_t *enable)
305 u16 cmd_action,
306 void * pdata_buf)
307{ 305{
308 struct cmd_ds_802_11_enable_rsn *penableRSN = &cmd->params.enbrsn; 306 struct cmd_ds_802_11_enable_rsn cmd;
309 u32 * enable = pdata_buf; 307 int ret;
310 308
311 lbs_deb_enter(LBS_DEB_CMD); 309 lbs_deb_enter(LBS_DEB_CMD);
312 310
313 cmd->command = cpu_to_le16(CMD_802_11_ENABLE_RSN); 311 cmd.hdr.size = cpu_to_le16(sizeof(cmd));
314 cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN); 312 cmd.action = cpu_to_le16(cmd_action);
315 penableRSN->action = cpu_to_le16(cmd_action);
316 313
317 if (cmd_action == CMD_ACT_SET) { 314 if (cmd_action == CMD_ACT_SET) {
318 if (*enable) 315 if (*enable)
319 penableRSN->enable = cpu_to_le16(CMD_ENABLE_RSN); 316 cmd.enable = cpu_to_le16(CMD_ENABLE_RSN);
320 else 317 else
321 penableRSN->enable = cpu_to_le16(CMD_DISABLE_RSN); 318 cmd.enable = cpu_to_le16(CMD_DISABLE_RSN);
322 lbs_deb_cmd("ENABLE_RSN: %d\n", *enable); 319 lbs_deb_cmd("ENABLE_RSN: %d\n", *enable);
323 } 320 }
324 321
325 lbs_deb_leave(LBS_DEB_CMD); 322 ret = lbs_cmd_with_response(priv, CMD_802_11_ENABLE_RSN, &cmd);
326 return 0; 323 if (!ret && cmd_action == CMD_ACT_GET)
324 *enable = le16_to_cpu(cmd.enable);
325
326 lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
327 return ret;
327} 328}
328 329
329 330
@@ -1473,11 +1474,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1473 ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr); 1474 ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr);
1474 break; 1475 break;
1475 1476
1476 case CMD_802_11_ENABLE_RSN:
1477 ret = lbs_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
1478 pdata_buf);
1479 break;
1480
1481 case CMD_802_11_KEY_MATERIAL: 1477 case CMD_802_11_KEY_MATERIAL:
1482 ret = lbs_cmd_802_11_key_material(priv, cmdptr, cmd_action, 1478 ret = lbs_cmd_802_11_key_material(priv, cmdptr, cmd_action,
1483 cmd_oid, pdata_buf); 1479 cmd_oid, pdata_buf);