aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-12 11:05:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:45 -0400
commit835d3ac5e8cbe1fec2c02c7fc662586b30b1f5a8 (patch)
treebd01d0e641347cbcf2a6dd64fd5b2d69001dd192 /drivers/net/wireless
parent06802a819a0a2d31c952c0624cea6cd00e4e50da (diff)
libertas: convert CMD_MAC_CONTROL to a direct command
convert CMD_MAC_CONTROL to a direct command Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas/cmd.c31
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c1
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h4
3 files changed, 8 insertions, 28 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 445c6dc09786..84dde09bfbc3 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1200,24 +1200,6 @@ static void lbs_submit_command(struct lbs_private *priv,
1200 lbs_deb_leave(LBS_DEB_HOST); 1200 lbs_deb_leave(LBS_DEB_HOST);
1201} 1201}
1202 1202
1203static int lbs_cmd_mac_control(struct lbs_private *priv,
1204 struct cmd_ds_command *cmd)
1205{
1206 struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
1207
1208 lbs_deb_enter(LBS_DEB_CMD);
1209
1210 cmd->command = cpu_to_le16(CMD_MAC_CONTROL);
1211 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN);
1212 mac->action = cpu_to_le16(priv->currentpacketfilter);
1213
1214 lbs_deb_cmd("MAC_CONTROL: action 0x%04x, size %d\n",
1215 le16_to_cpu(mac->action), le16_to_cpu(cmd->size));
1216
1217 lbs_deb_leave(LBS_DEB_CMD);
1218 return 0;
1219}
1220
1221/** 1203/**
1222 * This function inserts command node to cmdfreeq 1204 * This function inserts command node to cmdfreeq
1223 * after cleans it. Requires priv->driver_lock held. 1205 * after cleans it. Requires priv->driver_lock held.
@@ -1307,12 +1289,15 @@ int lbs_set_radio_control(struct lbs_private *priv)
1307int lbs_set_mac_packet_filter(struct lbs_private *priv) 1289int lbs_set_mac_packet_filter(struct lbs_private *priv)
1308{ 1290{
1309 int ret = 0; 1291 int ret = 0;
1292 struct cmd_ds_mac_control cmd;
1310 1293
1311 lbs_deb_enter(LBS_DEB_CMD); 1294 lbs_deb_enter(LBS_DEB_CMD);
1312 1295
1313 /* Send MAC control command to station */ 1296 cmd.hdr.size = cpu_to_le16(sizeof(cmd));
1314 ret = lbs_prepare_and_send_command(priv, 1297 cmd.action = cpu_to_le16(priv->currentpacketfilter);
1315 CMD_MAC_CONTROL, 0, 0, 0, NULL); 1298 cmd.reserved = 0;
1299
1300 ret = lbs_cmd_with_response(priv, CMD_MAC_CONTROL, &cmd);
1316 1301
1317 lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); 1302 lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
1318 return ret; 1303 return ret;
@@ -1382,10 +1367,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1382 ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action); 1367 ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
1383 break; 1368 break;
1384 1369
1385 case CMD_MAC_CONTROL:
1386 ret = lbs_cmd_mac_control(priv, cmdptr);
1387 break;
1388
1389 case CMD_802_11_ASSOCIATE: 1370 case CMD_802_11_ASSOCIATE:
1390 case CMD_802_11_REASSOCIATE: 1371 case CMD_802_11_REASSOCIATE:
1391 ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf); 1372 ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 63aa884b18f2..5534a7b859da 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -394,7 +394,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
394 break; 394 break;
395 395
396 case CMD_RET(CMD_MAC_MULTICAST_ADR): 396 case CMD_RET(CMD_MAC_MULTICAST_ADR):
397 case CMD_RET(CMD_MAC_CONTROL):
398 case CMD_RET(CMD_802_11_RESET): 397 case CMD_RET(CMD_802_11_RESET):
399 case CMD_RET(CMD_802_11_AUTHENTICATE): 398 case CMD_RET(CMD_802_11_AUTHENTICATE):
400 case CMD_RET(CMD_802_11_BEACON_STOP): 399 case CMD_RET(CMD_802_11_BEACON_STOP):
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index 56bc1aa2bb00..b5361b3393d9 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -211,8 +211,9 @@ struct cmd_ds_802_11_get_log {
211}; 211};
212 212
213struct cmd_ds_mac_control { 213struct cmd_ds_mac_control {
214 struct cmd_header hdr;
214 __le16 action; 215 __le16 action;
215 __le16 reserved; 216 u16 reserved;
216}; 217};
217 218
218struct cmd_ds_mac_multicast_adr { 219struct cmd_ds_mac_multicast_adr {
@@ -695,7 +696,6 @@ struct cmd_ds_command {
695 /* command Body */ 696 /* command Body */
696 union { 697 union {
697 struct cmd_ds_802_11_ps_mode psmode; 698 struct cmd_ds_802_11_ps_mode psmode;
698 struct cmd_ds_mac_control macctrl;
699 struct cmd_ds_802_11_associate associate; 699 struct cmd_ds_802_11_associate associate;
700 struct cmd_ds_802_11_deauthenticate deauth; 700 struct cmd_ds_802_11_deauthenticate deauth;
701 struct cmd_ds_802_11_ad_hoc_start ads; 701 struct cmd_ds_802_11_ad_hoc_start ads;