From patchwork Mon Mar 23 14:20:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avinash Patil X-Patchwork-Id: 6071141 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 58F90BF90F for ; Mon, 23 Mar 2015 08:51:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BD3520121 for ; Mon, 23 Mar 2015 08:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6781F20107 for ; Mon, 23 Mar 2015 08:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752015AbbCWIv2 (ORCPT ); Mon, 23 Mar 2015 04:51:28 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:45255 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbbCWIv1 (ORCPT ); Mon, 23 Mar 2015 04:51:27 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.14.5/8.14.5) with SMTP id t2N8jTh0005430 for ; Mon, 23 Mar 2015 01:51:27 -0700 Received: from sc-owa04.marvell.com ([199.233.58.150]) by mx0b-0016f401.pphosted.com with ESMTP id 1ta9ymgr69-2 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Mon, 23 Mar 2015 01:51:26 -0700 Received: from maili.marvell.com (10.93.76.83) by SC-OWA04.marvell.com (10.93.76.33) with Microsoft SMTP Server id 8.3.327.1; Mon, 23 Mar 2015 01:51:25 -0700 Received: from pe-lt950 (unknown [10.31.130.218]) by maili.marvell.com (Postfix) with ESMTP id 618503F7040; Mon, 23 Mar 2015 01:51:23 -0700 (PDT) Received: from pe-lt950.marvell.com (localhost [127.0.0.1]) by pe-lt950 (8.14.7/8.14.7) with ESMTP id t2NELAdt006288; Mon, 23 Mar 2015 19:51:10 +0530 Received: (from root@localhost) by pe-lt950.marvell.com (8.14.7/8.14.7/Submit) id t2NEL2fU006281; Mon, 23 Mar 2015 19:51:02 +0530 From: Avinash Patil To: CC: , , , Avinash Patil Subject: [PATCH 1/2] mwifiex: stop command path in suspend handler Date: Mon, 23 Mar 2015 19:50:55 +0530 Message-ID: <1427120456-6247-1-git-send-email-patila@marvell.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-03-23_01:2015-03-20, 2015-03-22, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503230095 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cancel all pending commands including scan commands and stop CAC during cfg80211 suspend handler. Signed-off-by: Avinash Patil --- 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");