From patchwork Tue Nov 15 06:06:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 82261 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1371063qge; Mon, 14 Nov 2016 22:07:27 -0800 (PST) X-Received: by 10.99.240.83 with SMTP id s19mr74636671pgj.175.1479190047572; Mon, 14 Nov 2016 22:07:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 133si25114259pgh.252.2016.11.14.22.07.26; Mon, 14 Nov 2016 22:07:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965849AbcKOGHH (ORCPT + 9 others); Tue, 15 Nov 2016 01:07:07 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33212 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966187AbcKOGHF (ORCPT ); Tue, 15 Nov 2016 01:07:05 -0500 Received: by mail-pf0-f174.google.com with SMTP id d2so34252058pfd.0 for ; Mon, 14 Nov 2016 22:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RuMh318y+c0q4OEALzRbLucfLt5TnTvo/Y/ZAkBbNyU=; b=CNPpJ9wZqlaXjGcIAdg+J+8awjpu9pRu9TXELMllqrC9cC5RNWqTpJ7RQ27SYhrkQK NLyi8VgpvsKlHGxVcJhsE6DeXDVdwS4jy0oCPAWEj3SLRMeWPUlgrVu0SrROxr5Daq8K bGF/vbVEAOij+xvvRlbyXooq9uLQaXOf3zTqI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RuMh318y+c0q4OEALzRbLucfLt5TnTvo/Y/ZAkBbNyU=; b=FkfB2Itwgn5L5AqyV/SLI8YeNaHRnbhnXxeg5fwIFh/YNhN2NcE+ql1X+UCm9ZC0dP Ey2++YG5GOrsLZ/0BiBRNZHh55zxgmRst1mIPeKhQx/T/hwybnUBVdvr/9+RWs855UaW cdWASYCqoyNDHl3hjnyjLxQUnp5tYV5GUZ6i7gmi+8vShP4nDuiCm/5MXsWWzBgsMHKz WNGwZcJ/6iFQzEdNvXjtoh6kMODAHlOgyUnTHi92n3iNUhNVYgMCD7tOADcRvoRpu2mq 1J6+EsgkigQVMkU8Mw+pZYVzUsCB5JEcVn7QHBVwZbHiERqtJRYipcsGDIfXpV8+HlWe RPQA== X-Gm-Message-State: ABUngvdKXZhBCiEwpA0YjUIUycoCd+nBeq1x0e0BjWS+uCfqlxIqiNkPNNF6okzEnsQ2JPGv X-Received: by 10.98.44.212 with SMTP id s203mr43729611pfs.84.1479190024559; Mon, 14 Nov 2016 22:07:04 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id zf9sm39563129pac.12.2016.11.14.22.07.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Nov 2016 22:07:03 -0800 (PST) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross Subject: [PATCH v5 5/5] wcn36xx: Don't use the destroyed hal_mutex Date: Mon, 14 Nov 2016 22:06:54 -0800 Message-Id: <1479190014-11297-5-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1479190014-11297-1-git-send-email-bjorn.andersson@linaro.org> References: <1479190014-11297-1-git-send-email-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org ieee80211_unregister_hw() might invoke operations to stop the interface, that uses the hal_mutex. So don't destroy it until after we're done using it. Signed-off-by: Bjorn Andersson --- With this patch I can successfully (although with a SMD send timeout in the shutdown path) start and stop the WCNSS PIL/remoteproc multiple times and the wlan0 interface will come and go accordingly. Will submit the necessary DT patches soon as well. Changes since v4: - New patch drivers/net/wireless/ath/wcn36xx/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 96a9584edcbb..0002190c9041 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1241,7 +1241,6 @@ static int wcn36xx_remove(struct platform_device *pdev) wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n"); release_firmware(wcn->nv); - mutex_destroy(&wcn->hal_mutex); ieee80211_unregister_hw(hw); @@ -1250,6 +1249,8 @@ static int wcn36xx_remove(struct platform_device *pdev) iounmap(wcn->dxe_base); iounmap(wcn->ccu_base); + + mutex_destroy(&wcn->hal_mutex); ieee80211_free_hw(hw); return 0;