Skip to contentSkip to conversation

mwifiex: fix the incorrect WARN_ON during suspend

PATCH Applied Vishal Thanki 2 participants 2 messages Apr 7, 2016 – Apr 14, 2016 Marvell mwifiex wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwifiex: fix the incorrect WARN_ON during suspend

During system suspend, there is a kernel WARNING issued if there is a pending command present. By marking the wait queue disabled after calling the command completion routine fixes it.

---
 drivers/net/wireless/marvell/mwifiex/cmdevt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/marvell/mwifiex/cmdevt.c +1 -1
index a12adee..6f047064 100644
@@ -1009,9 +1009,9 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
 	spin_lock_irqsave(&adapter->mwifiex_cmd_lock, cmd_flags);
 	/* Cancel current cmd */
 	if ((adapter->curr_cmd) && (adapter->curr_cmd->wait_q_enabled)) {
-		adapter->curr_cmd->wait_q_enabled = false;
 		adapter->cmd_wait_q.status = -1;
 		mwifiex_complete_cmd(adapter, adapter->curr_cmd);
+		adapter->curr_cmd->wait_q_enabled = false;
 		/* no recycle probably wait for response */
 	}
 	/* Cancel all pending command */
Signature · 1 line
2.4.11
Applied
#1 lore raw
Quoted 6 lines

During system suspend, there is a kernel WARNING issued if there is a pending command present. By marking the wait queue disabled after calling the command completion routine fixes it.

Thanks, applied to wireless-drivers-next.git.

Kalle Valo