linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ath9k: Fix MCI cleanup
@ 2012-07-06 14:39 Mohammed Shafi Shajakhan
  2012-07-08 23:27 ` Julian Calaby
  0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-07-06 14:39 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel, Rajkumar Manoharan,
	Bala Shanmugam, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

We are doing MCI cleanup eventhough BTCOEX is not enabled
via module parameter. This means we do ath_mci_cleanup
though we skipped calling ath_mci_setup. Yet it does not
causes any issues now  as we free the DMA buffer allocated
only when it is allocated during ath_mci_setup.

Reviewed-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/gpio.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 5eac4d1..43557c2 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
 
 void ath9k_deinit_btcoex(struct ath_softc *sc)
 {
+	struct ath_hw *ah = sc->sc_ah;
+
         if ((sc->btcoex.no_stomp_timer) &&
 	    ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
 		ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
 
-	if (AR_SREV_9462(sc->sc_ah))
+	if (ath9k_hw_mci_is_enabled(ah))
 		ath_mci_cleanup(sc);
 }
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] ath9k: Fix MCI cleanup
  2012-07-06 14:39 [PATCH v2 1/2] ath9k: Fix MCI cleanup Mohammed Shafi Shajakhan
@ 2012-07-08 23:27 ` Julian Calaby
  2012-07-09  4:45   ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 3+ messages in thread
From: Julian Calaby @ 2012-07-08 23:27 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: John W. Linville, linux-wireless, Rodriguez Luis, ath9k-devel,
	Rajkumar Manoharan, Bala Shanmugam

Hi Mohammed,

On Sat, Jul 7, 2012 at 12:39 AM, Mohammed Shafi Shajakhan
<mohammed@qca.qualcomm.com> wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>
> We are doing MCI cleanup eventhough BTCOEX is not enabled
> via module parameter. This means we do ath_mci_cleanup
> though we skipped calling ath_mci_setup. Yet it does not
> causes any issues now  as we free the DMA buffer allocated
> only when it is allocated during ath_mci_setup.
>
> Reviewed-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/gpio.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
> index 5eac4d1..43557c2 100644
> --- a/drivers/net/wireless/ath/ath9k/gpio.c
> +++ b/drivers/net/wireless/ath/ath9k/gpio.c
> @@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
>
>  void ath9k_deinit_btcoex(struct ath_softc *sc)
>  {
> +       struct ath_hw *ah = sc->sc_ah;
> +

Why introduce a new variable if you only use it once?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] ath9k: Fix MCI cleanup
  2012-07-08 23:27 ` Julian Calaby
@ 2012-07-09  4:45   ` Mohammed Shafi Shajakhan
  0 siblings, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-07-09  4:45 UTC (permalink / raw)
  To: Julian Calaby
  Cc: John W. Linville, linux-wireless, Rodriguez Luis, ath9k-devel,
	Rajkumar Manoharan, Bala Shanmugam

Hi Julian,

On Monday 09 July 2012 04:57 AM, Julian Calaby wrote:
> Hi Mohammed,
>
> On Sat, Jul 7, 2012 at 12:39 AM, Mohammed Shafi Shajakhan
> <mohammed@qca.qualcomm.com> wrote:
>> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>>
>> We are doing MCI cleanup eventhough BTCOEX is not enabled
>> via module parameter. This means we do ath_mci_cleanup
>> though we skipped calling ath_mci_setup. Yet it does not
>> causes any issues now  as we free the DMA buffer allocated
>> only when it is allocated during ath_mci_setup.
>>
>> Reviewed-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
>> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>> ---
>>   drivers/net/wireless/ath/ath9k/gpio.c |    4 +++-
>>   1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
>> index 5eac4d1..43557c2 100644
>> --- a/drivers/net/wireless/ath/ath9k/gpio.c
>> +++ b/drivers/net/wireless/ath/ath9k/gpio.c
>> @@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
>>
>>   void ath9k_deinit_btcoex(struct ath_softc *sc)
>>   {
>> +       struct ath_hw *ah = sc->sc_ah;
>> +
>
> Why introduce a new variable if you only use it once?
>

oh yeah, could have avoided that (or) could have make use of it instead 
of sc->sc_ah in 2 places of the same function!

if ((sc->btcoex.no_stomp_timer) &&
             ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
                 ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);

thanks for your review, John had already merged with patch.
We could cleanup this in some future cleanups.


-- 
thanks,
shafi



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-09  4:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 14:39 [PATCH v2 1/2] ath9k: Fix MCI cleanup Mohammed Shafi Shajakhan
2012-07-08 23:27 ` Julian Calaby
2012-07-09  4:45   ` Mohammed Shafi Shajakhan

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