aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-09-10 09:04:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:19 -0400
commitf8e77caefea8940ee1fb09c9ebb0107ca2eadb72 (patch)
tree123bfa14c6513cb02f3fb97cb7685be44e6052f4 /drivers/net/wireless/libertas
parente83a1070a1167eac1bf8844b9f08df5e9ea1b5bc (diff)
libertas: remove unused generic RESET command
The generic reset command is unused. Each interface type needs to handle the reset command differently since after reset, the firmware is dead and interface-specific mechanisms must be used to reinitialize the card. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/cmd.c18
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c1
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h5
-rw-r--r--drivers/net/wireless/libertas/if_usb.c5
4 files changed, 2 insertions, 27 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 5fef05f3cd00..b57625a38021 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -480,20 +480,6 @@ int lbs_cmd_802_11_key_material(struct lbs_private *priv, uint16_t cmd_action,
480 return ret; 480 return ret;
481} 481}
482 482
483static int lbs_cmd_802_11_reset(struct cmd_ds_command *cmd, int cmd_action)
484{
485 struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
486
487 lbs_deb_enter(LBS_DEB_CMD);
488
489 cmd->command = cpu_to_le16(CMD_802_11_RESET);
490 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_reset) + S_DS_GEN);
491 reset->action = cpu_to_le16(cmd_action);
492
493 lbs_deb_leave(LBS_DEB_CMD);
494 return 0;
495}
496
497static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv, 483static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv,
498 struct cmd_ds_command *cmd, 484 struct cmd_ds_command *cmd,
499 int cmd_action, 485 int cmd_action,
@@ -1419,10 +1405,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1419 ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf); 1405 ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
1420 break; 1406 break;
1421 1407
1422 case CMD_802_11_RESET:
1423 ret = lbs_cmd_802_11_reset(cmdptr, cmd_action);
1424 break;
1425
1426 case CMD_802_11_AUTHENTICATE: 1408 case CMD_802_11_AUTHENTICATE:
1427 ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf); 1409 ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
1428 break; 1410 break;
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 0371c83f5661..f305b049b586 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -271,7 +271,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
271 271
272 break; 272 break;
273 273
274 case CMD_RET(CMD_802_11_RESET):
275 case CMD_RET(CMD_802_11_AUTHENTICATE): 274 case CMD_RET(CMD_802_11_AUTHENTICATE):
276 case CMD_RET(CMD_802_11_BEACON_STOP): 275 case CMD_RET(CMD_802_11_BEACON_STOP):
277 break; 276 break;
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index 630b79967560..f2f92e237c4a 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -151,10 +151,6 @@ struct cmd_ds_get_hw_spec {
151 __le32 fwcapinfo; 151 __le32 fwcapinfo;
152} __attribute__ ((packed)); 152} __attribute__ ((packed));
153 153
154struct cmd_ds_802_11_reset {
155 __le16 action;
156};
157
158struct cmd_ds_802_11_subscribe_event { 154struct cmd_ds_802_11_subscribe_event {
159 struct cmd_header hdr; 155 struct cmd_header hdr;
160 156
@@ -717,7 +713,6 @@ struct cmd_ds_command {
717 union { 713 union {
718 struct cmd_ds_802_11_ps_mode psmode; 714 struct cmd_ds_802_11_ps_mode psmode;
719 struct cmd_ds_802_11_associate associate; 715 struct cmd_ds_802_11_associate associate;
720 struct cmd_ds_802_11_reset reset;
721 struct cmd_ds_802_11_authenticate auth; 716 struct cmd_ds_802_11_authenticate auth;
722 struct cmd_ds_802_11_get_stat gstat; 717 struct cmd_ds_802_11_get_stat gstat;
723 struct cmd_ds_802_3_get_stat gstat_8023; 718 struct cmd_ds_802_3_get_stat gstat_8023;
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 7b02d612b076..cafbccb74143 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -439,11 +439,10 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
439 *(__le32 *)cardp->ep_out_buf = cpu_to_le32(CMD_TYPE_REQUEST); 439 *(__le32 *)cardp->ep_out_buf = cpu_to_le32(CMD_TYPE_REQUEST);
440 440
441 cmd->command = cpu_to_le16(CMD_802_11_RESET); 441 cmd->command = cpu_to_le16(CMD_802_11_RESET);
442 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_reset) + S_DS_GEN); 442 cmd->size = cpu_to_le16(sizeof(struct cmd_header));
443 cmd->result = cpu_to_le16(0); 443 cmd->result = cpu_to_le16(0);
444 cmd->seqnum = cpu_to_le16(0x5a5a); 444 cmd->seqnum = cpu_to_le16(0x5a5a);
445 cmd->params.reset.action = cpu_to_le16(CMD_ACT_HALT); 445 usb_tx_block(cardp, cardp->ep_out_buf, 4 + sizeof(struct cmd_header));
446 usb_tx_block(cardp, cardp->ep_out_buf, 4 + S_DS_GEN + sizeof(struct cmd_ds_802_11_reset));
447 446
448 msleep(100); 447 msleep(100);
449 ret = usb_reset_device(cardp->udev); 448 ret = usb_reset_device(cardp->udev);