|
@@ -981,11 +981,10 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
|
|
|
struct mwifiex_private *priv;
|
|
|
int i;
|
|
|
|
|
|
+ spin_lock_irqsave(&adapter->mwifiex_cmd_lock, cmd_flags);
|
|
|
/* Cancel current cmd */
|
|
|
if ((adapter->curr_cmd) && (adapter->curr_cmd->wait_q_enabled)) {
|
|
|
- spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags);
|
|
|
adapter->curr_cmd->wait_q_enabled = false;
|
|
|
- spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
|
|
|
adapter->cmd_wait_q.status = -1;
|
|
|
mwifiex_complete_cmd(adapter, adapter->curr_cmd);
|
|
|
}
|
|
@@ -1005,6 +1004,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
|
|
|
spin_lock_irqsave(&adapter->cmd_pending_q_lock, flags);
|
|
|
}
|
|
|
spin_unlock_irqrestore(&adapter->cmd_pending_q_lock, flags);
|
|
|
+ spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
|
|
|
|
|
|
/* Cancel all pending scan command */
|
|
|
spin_lock_irqsave(&adapter->scan_pending_q_lock, flags);
|