From patchwork Mon May 15 11:45:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Erez X-Patchwork-Id: 9726751 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 DA45F60380 for ; Mon, 15 May 2017 11:46:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8E5828972 for ; Mon, 15 May 2017 11:46:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD17528989; Mon, 15 May 2017 11:46:15 +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 6F59F28972 for ; Mon, 15 May 2017 11:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756965AbdEOLqO (ORCPT ); Mon, 15 May 2017 07:46:14 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:45044 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756867AbdEOLqJ (ORCPT ); Mon, 15 May 2017 07:46:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1494848769; x=1526384769; h=cc:from:to:subject:date:message-id:in-reply-to: references; bh=/fcfVODkWEFQU/BBPME4Z+0oailXAA4eThdO9F8qzbQ=; b=l/tlVJzjdid9EolQjwpJNVbQs2/QiL0zPCmahMYVqXTaXoqBW0wE10LR DBRIeTGQaCddteoxHP0LSj7Xy8sOMw9G/v3RK4l9tX1UFUCjH0em0Sqr4 sodeF/YjQ55J/qUnkQjytw1lY4dPnRAFpfvmM07vX+YgWukIWdrQfu1tj 4=; X-IronPort-AV: E=Sophos;i="5.38,344,1491289200"; d="scan'208";a="286072166" Received: from unknown (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by wolverine01.qualcomm.com with ESMTP; 15 May 2017 04:46:09 -0700 Cc: Hamad Kadmany , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Maya Erez X-IronPort-AV: E=McAfee;i="5800,7501,8529"; a="1348764081" X-MGA-submission: =?us-ascii?q?MDHeZg+L+esXpFzMEkKPkJkiJyP4l+9TNOHuj3?= =?us-ascii?q?Z8QVhGnhNbgKxFF0uI08aQy46r1vmjxltYqyBIS+WgojqtFdiellsMEZ?= =?us-ascii?q?rzwyjCxqsddVDiFyqBmUohRJV1hAINipdR9/oNS7cxiUweaoV9F4/zMC?= =?us-ascii?q?KI?= Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by Ironmsg04-L.qualcomm.com with ESMTP; 15 May 2017 04:46:07 -0700 From: Maya Erez To: Kalle Valo Subject: [PATCH v2 3/5] wil6210: Improve AP stop handling Date: Mon, 15 May 2017 14:45:57 +0300 Message-Id: <1494848759-3651-4-git-send-email-qca_merez@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494848759-3651-1-git-send-email-qca_merez@qca.qualcomm.com> References: <1494848759-3651-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 Set resetting flag early when stopping AP to avoid disconnect events as a result of disconnect command sent during AP stop procedure. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index aa9ce30..567fe43 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -1446,6 +1446,8 @@ static int wil_cfg80211_stop_ap(struct wiphy *wiphy, wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS); wil_set_recovery_state(wil, fw_recovery_idle); + set_bit(wil_status_resetting, wil->status); + mutex_lock(&wil->mutex); wmi_pcp_stop(wil);