linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Eugene Krasnikov <k.eugene.e@gmail.com>,
	Kalle Valo <kvalo@codeaurora.org>
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 <andy.gross@linaro.org>
Subject: [PATCH v5 5/5] wcn36xx: Don't use the destroyed hal_mutex
Date: Mon, 14 Nov 2016 22:06:54 -0800	[thread overview]
Message-ID: <1479190014-11297-5-git-send-email-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <1479190014-11297-1-git-send-email-bjorn.andersson@linaro.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 <bjorn.andersson@linaro.org>
---

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(-)

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;
-- 
2.5.0

  parent reply	other threads:[~2016-11-15  6:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  6:06 [PATCH v5 1/5] soc: qcom: smem_state: Fix include for ERR_PTR() Bjorn Andersson
2016-11-15  6:06 ` [PATCH v5 2/5] wcn36xx: Transition driver to SMD client Bjorn Andersson
     [not found] ` <1479190014-11297-1-git-send-email-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-15  6:06   ` [PATCH v5 3/5] wcn36xx: Implement firmware assisted scan Bjorn Andersson
2016-11-15  6:06 ` [PATCH v5 4/5] wcn36xx: Implement print_reg indication Bjorn Andersson
2016-11-15  6:06 ` Bjorn Andersson [this message]
2016-11-16 18:49 ` [v5,1/5] soc: qcom: smem_state: Fix include for ERR_PTR() Kalle Valo
2016-11-16 18:54   ` Valo, Kalle
2016-11-18 18:35   ` Bjorn Andersson
2016-11-22 14:55     ` Valo, Kalle
2016-11-30 18:40       ` Valo, Kalle
2016-12-01  5:13         ` Valo, Kalle
2016-12-01 10:17           ` Valo, Kalle
     [not found]             ` <87r35srm0c.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-12-01 14:21               ` Andy Gross
2016-12-05 11:45                 ` Valo, Kalle
2017-01-12 10:47 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479190014-11297-5-git-send-email-bjorn.andersson@linaro.org \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=k.eugene.e@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).