From patchwork Tue Nov 14 13:25:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Erez X-Patchwork-Id: 10057631 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 66A64601D3 for ; Tue, 14 Nov 2017 13:26:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C1E728F92 for ; Tue, 14 Nov 2017 13:26:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5136D29033; Tue, 14 Nov 2017 13:26:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06D0628FA1 for ; Tue, 14 Nov 2017 13:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755362AbdKNNZ6 (ORCPT ); Tue, 14 Nov 2017 08:25:58 -0500 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:54358 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755314AbdKNNZz (ORCPT ); Tue, 14 Nov 2017 08:25:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1510665955; x=1542201955; h=cc:from:to:subject:date:message-id:in-reply-to: references; bh=5onGUQmgU7PyS/Ap8ArvpVCW15hCJcgzJTXQWBqInFQ=; b=WVKnqf1uMafvW6yaU9Q28+CCgrUqRyTjvPlPBo6HPnC0808VWgur3jGE YpiyJtmrnxkvZs2igqh2nJ5yDMi5p+Iyxq19GRLzH8SCrMbE0sryFDuP3 zQr+IhFbzi8mQ5ec31cJQJ0dwlEBJeylNl6pf2mlmxi80hL94Ac0Hntcd Q=; X-IronPort-AV: E=Sophos;i="5.44,393,1505804400"; d="scan'208";a="116748180" Received: from unknown (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by sabertooth01.qualcomm.com with ESMTP; 14 Nov 2017 05:25:54 -0800 Cc: Hamad Kadmany , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Maya Erez X-IronPort-AV: E=McAfee;i="5900,7806,8714"; a="1464221480" X-MGA-submission: =?us-ascii?q?MDHIoFeGrsVXfIctpKkBRM2DG4K4BySPxuLt3f?= =?us-ascii?q?9spEpY5g27uH1LHWLaV0SrMgX73EEM3lB2JAtNkeULVnmla6NaIwWfwl?= =?us-ascii?q?bx/JcoJ+6I7dUsDJnLvnOFhUOYVY6dmlfncSf1CuKtZ8fdxeNoRzewtH?= =?us-ascii?q?uG?= Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by Ironmsg04-L.qualcomm.com with ESMTP; 14 Nov 2017 05:25:53 -0800 From: Maya Erez To: Kalle Valo Subject: [PATCH v3 04/12] wil6210: abort properly in cfg suspend Date: Tue, 14 Nov 2017 15:25:36 +0200 Message-Id: <1510665944-30198-5-git-send-email-qca_merez@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1510665944-30198-1-git-send-email-qca_merez@qca.qualcomm.com> References: <1510665944-30198-1-git-send-email-qca_merez@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hamad Kadmany On-going operations were not aborted properly and required locks were not taken. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/cfg80211.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 85d5c04..c3d3c0c 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -1727,9 +1727,12 @@ static int wil_cfg80211_suspend(struct wiphy *wiphy, wil_dbg_pm(wil, "suspending\n"); - wil_p2p_stop_discovery(wil); - + mutex_lock(&wil->mutex); + mutex_lock(&wil->p2p_wdev_mutex); + wil_p2p_stop_radio_operations(wil); wil_abort_scan(wil, true); + mutex_unlock(&wil->p2p_wdev_mutex); + mutex_unlock(&wil->mutex); out: return rc;