Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: correct ath9k_hw_set_interrupts
@ 2011-02-21 14:02 Stanislaw Gruszka
  2011-02-23 21:21 ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2011-02-21 14:02 UTC (permalink / raw
  To: Luis R. Rodriguez, ath9k-devel; +Cc: linux-wireless, Felix Fietkau

Commit 4df3071ebd92ef7115b409da64d0eb405d24a631 "ath9k_hw: optimize
interrupt mask changes", changed ath9k_hw_set_interrupts function to
enable interrupts regardless of function argument, what could possibly
be wrong. Correct that behaviour and check "ints" arguments before
enabling interrupts, also disable interrupts if ints do not have
ATH9K_INT_GLOBAL flag set.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ath/ath9k/mac.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index c75d40f..5efc869 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -891,7 +891,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
 	struct ath_common *common = ath9k_hw_common(ah);
 
 	if (!(ints & ATH9K_INT_GLOBAL))
-		ath9k_hw_enable_interrupts(ah);
+		ath9k_hw_disable_interrupts(ah);
 
 	ath_dbg(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
 
@@ -969,7 +969,8 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
 			REG_CLR_BIT(ah, AR_IMR_S5, AR_IMR_S5_TIM_TIMER);
 	}
 
-	ath9k_hw_enable_interrupts(ah);
+	if (ints & ATH9K_INT_GLOBAL)
+		ath9k_hw_enable_interrupts(ah);
 
 	return;
 }
-- 
1.7.1


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

* Re: [PATCH] ath9k: correct ath9k_hw_set_interrupts
  2011-02-21 14:02 [PATCH] ath9k: correct ath9k_hw_set_interrupts Stanislaw Gruszka
@ 2011-02-23 21:21 ` John W. Linville
  2011-02-24  9:39   ` Stanislaw Gruszka
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2011-02-23 21:21 UTC (permalink / raw
  To: Stanislaw Gruszka
  Cc: Luis R. Rodriguez, ath9k-devel, linux-wireless, Felix Fietkau

On Mon, Feb 21, 2011 at 03:02:41PM +0100, Stanislaw Gruszka wrote:
> Commit 4df3071ebd92ef7115b409da64d0eb405d24a631 "ath9k_hw: optimize
> interrupt mask changes", changed ath9k_hw_set_interrupts function to
> enable interrupts regardless of function argument, what could possibly
> be wrong. Correct that behaviour and check "ints" arguments before
> enabling interrupts, also disable interrupts if ints do not have
> ATH9K_INT_GLOBAL flag set.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Should this be Cc: stable@kernel.org?

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] ath9k: correct ath9k_hw_set_interrupts
  2011-02-23 21:21 ` John W. Linville
@ 2011-02-24  9:39   ` Stanislaw Gruszka
  0 siblings, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2011-02-24  9:39 UTC (permalink / raw
  To: John W. Linville
  Cc: Luis R. Rodriguez, ath9k-devel, linux-wireless, Felix Fietkau

On Wed, Feb 23, 2011 at 04:21:32PM -0500, John W. Linville wrote:
> On Mon, Feb 21, 2011 at 03:02:41PM +0100, Stanislaw Gruszka wrote:
> > Commit 4df3071ebd92ef7115b409da64d0eb405d24a631 "ath9k_hw: optimize
> > interrupt mask changes", changed ath9k_hw_set_interrupts function to
> > enable interrupts regardless of function argument, what could possibly
> > be wrong. Correct that behaviour and check "ints" arguments before
> > enabling interrupts, also disable interrupts if ints do not have
> > ATH9K_INT_GLOBAL flag set.
> > 
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> 
> Should this be Cc: stable@kernel.org?

I think no. 4df3071ebd92e is from .38-rc1 , this patch should 
go to 38 if possible. If not, I'm still not sure about stable.
It does not fix any pratical issues for me, my ath9k device
work good with and without patch.

Stanislaw

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

end of thread, other threads:[~2011-02-24  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 14:02 [PATCH] ath9k: correct ath9k_hw_set_interrupts Stanislaw Gruszka
2011-02-23 21:21 ` John W. Linville
2011-02-24  9:39   ` Stanislaw Gruszka

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 read-only IMAP folder(s) and NNTP newsgroup(s).