Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:65073 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861Ab2FKR6D (ORCPT ); Mon, 11 Jun 2012 13:58:03 -0400 Date: Mon, 11 Jun 2012 23:29:18 +0530 From: Rajkumar Manoharan To: Sujith Manoharan CC: , Subject: Re: [PATCH 1/2] ath9k: defer btcoex scheme update Message-ID: <20120611175916.GA2821@vmraj-lnx.users.atheros.com> (sfid-20120611_195808_815501_1EC0A896) References: <1339418354-1843-1-git-send-email-rmanohar@qca.qualcomm.com> <20437.61328.931380.948942@gargle.gargle.HOWL> <20120611174018.GA2655@vmraj-lnx.users.atheros.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" In-Reply-To: <20120611174018.GA2655@vmraj-lnx.users.atheros.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, Jun 11, 2012 at 11:10:20PM +0530, Rajkumar Manoharan wrote: > On Mon, Jun 11, 2012 at 06:46:00PM +0530, Sujith Manoharan wrote: > > Rajkumar Manoharan wrote: > > > As btcoex scheme updation might sleep, remove the function call > > > from tasklet context and queue it up as a separate work. > > > > > > Signed-off-by: Rajkumar Manoharan > > > --- > > > --- a/drivers/net/wireless/ath/ath9k/main.c > > > +++ b/drivers/net/wireless/ath/ath9k/main.c > > > @@ -188,6 +188,9 @@ static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx, bool flush) > > > > > > ath9k_debug_samp_bb_mac(sc); > > > ath9k_hw_disable_interrupts(ah); > > > +#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT > > > + cancel_work_sync(&sc->mci_work); > > > +#endif > > > > I think this should go inside __ath_cancel_work(), otherwise there is a > > chance that this would not be cleaned up properly when stopping the > > interface or unloading the driver. > > > mci_work is queued up by the ath9k_tasklet that is triggered by interrupt > routine. So it is safer to cancel the mci_work after disabling interrupt. > Does it make sense? > Sujith, you are correct. I'll move it into ath_cancel_work. Rajkumar