diff options
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 4dc6bbe5f110..4ffb84a403b3 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1166,8 +1166,8 @@ void lbs_queue_cmd(struct lbs_private *priv, | |||
1166 | 1166 | ||
1167 | lbs_deb_enter(LBS_DEB_HOST); | 1167 | lbs_deb_enter(LBS_DEB_HOST); |
1168 | 1168 | ||
1169 | if (!cmdnode || !cmdnode->cmdbuf) { | 1169 | if (!cmdnode) { |
1170 | lbs_deb_host("QUEUE_CMD: cmdnode or cmdbuf is NULL\n"); | 1170 | lbs_deb_host("QUEUE_CMD: cmdnode is NULL\n"); |
1171 | goto done; | 1171 | goto done; |
1172 | } | 1172 | } |
1173 | if (!cmdnode->cmdbuf->size) { | 1173 | if (!cmdnode->cmdbuf->size) { |
@@ -1195,7 +1195,7 @@ void lbs_queue_cmd(struct lbs_private *priv, | |||
1195 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1195 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1196 | 1196 | ||
1197 | lbs_deb_host("QUEUE_CMD: inserted command 0x%04x into cmdpendingq\n", | 1197 | lbs_deb_host("QUEUE_CMD: inserted command 0x%04x into cmdpendingq\n", |
1198 | le16_to_cpu(cmdnode->cmdbuf->command)); | 1198 | le16_to_cpu(cmdnode->cmdbuf->command)); |
1199 | 1199 | ||
1200 | done: | 1200 | done: |
1201 | lbs_deb_leave(LBS_DEB_HOST); | 1201 | lbs_deb_leave(LBS_DEB_HOST); |
@@ -1380,13 +1380,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1380 | 1380 | ||
1381 | lbs_deb_host("PREP_CMD: command 0x%04x\n", cmd_no); | 1381 | lbs_deb_host("PREP_CMD: command 0x%04x\n", cmd_no); |
1382 | 1382 | ||
1383 | if (!cmdptr) { | ||
1384 | lbs_deb_host("PREP_CMD: cmdptr is NULL\n"); | ||
1385 | lbs_cleanup_and_insert_cmd(priv, cmdnode); | ||
1386 | ret = -1; | ||
1387 | goto done; | ||
1388 | } | ||
1389 | |||
1390 | /* Set sequence number, command and INT option */ | 1383 | /* Set sequence number, command and INT option */ |
1391 | priv->seqnum++; | 1384 | priv->seqnum++; |
1392 | cmdptr->seqnum = cpu_to_le16(priv->seqnum); | 1385 | cmdptr->seqnum = cpu_to_le16(priv->seqnum); |
@@ -1786,8 +1779,7 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *cmdnode) | |||
1786 | cmdnode->callback = NULL; | 1779 | cmdnode->callback = NULL; |
1787 | cmdnode->callback_arg = 0; | 1780 | cmdnode->callback_arg = 0; |
1788 | 1781 | ||
1789 | if (cmdnode->cmdbuf != NULL) | 1782 | memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE); |
1790 | memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE); | ||
1791 | 1783 | ||
1792 | lbs_deb_leave(LBS_DEB_HOST); | 1784 | lbs_deb_leave(LBS_DEB_HOST); |
1793 | } | 1785 | } |