All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mwifiex: stop command path in suspend handler
@ 2015-03-23 14:20 Avinash Patil
  2015-03-23 14:20 ` [PATCH 2/2] mwifiex: recover from skb allocation failures during RX Avinash Patil
  2015-03-30  8:36 ` [1/2] mwifiex: stop command path in suspend handler Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Avinash Patil @ 2015-03-23 14:20 UTC (permalink / raw)
  To: linux-wireless; +Cc: akarwar, cluo, liuzy, Avinash Patil

Cancel all pending commands including scan commands and stop CAC
during cfg80211 suspend handler.

Signed-off-by: Avinash Patil <patila@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index fc3bbe7..eab110b 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -2942,15 +2942,23 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
 {
 	struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
 	struct mwifiex_ds_hs_cfg hs_cfg;
-	int ret = 0;
-	struct mwifiex_private *priv =
-			mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
+	int i, ret = 0;
+	struct mwifiex_private *priv;
+
+	for (i = 0; i < adapter->priv_num; i++) {
+		priv = adapter->priv[i];
+		mwifiex_abort_cac(priv);
+	}
+
+	mwifiex_cancel_all_pending_cmd(adapter);
 
 	if (!wowlan) {
 		dev_warn(adapter->dev, "None of the WOWLAN triggers enabled\n");
 		return 0;
 	}
 
+	priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
+
 	if (!priv->media_connected) {
 		dev_warn(adapter->dev,
 			 "Can not configure WOWLAN in disconnected state\n");
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-30  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-23 14:20 [PATCH 1/2] mwifiex: stop command path in suspend handler Avinash Patil
2015-03-23 14:20 ` [PATCH 2/2] mwifiex: recover from skb allocation failures during RX Avinash Patil
2015-03-23 11:11   ` James Cameron
2015-03-30  8:52     ` Avinash Patil
2015-03-30  8:36 ` [1/2] mwifiex: stop command path in suspend handler Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.