All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ath9k: few stable interrupt fixes
@ 2010-03-11 21:55 Luis R. Rodriguez
  2010-03-11 21:55 ` [PATCH 1/2] ath9k: Enable TIM timer interrupt only when needed Luis R. Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2010-03-11 21:55 UTC (permalink / raw)
  To: stable; +Cc: linville, linux-wireless, Luis R. Rodriguez

Here's a few stable IRQ fixes for ath9k which have already
been merged upstream. We forgot to add the stable tag on them
so sending these out manually.

The patches in this series apply to the latest 2.6.33.y but for
your convenience I have also backported the patches to the latest
2.6.32.y kernel.

The 2.6.33.y patches can be found here:

http://kernel.org/pub/linux/kernel/people/mcgrof/patches/ath9k/2010-03/33-fixes/01-ath9k-irq/

The 2.6.32.y patches can be found here:

http://kernel.org/pub/linux/kernel/people/mcgrof/patches/ath9k/2010-03/32-fixes/01-ath9k-irq/

Senthil Balasubramanian (2):
  ath9k: Enable TIM timer interrupt only when needed.
  ath9k: configure the beacon only if the STA is associated

 drivers/net/wireless/ath/ath9k/ath9k.h  |    1 +
 drivers/net/wireless/ath/ath9k/beacon.c |    7 +++++++
 drivers/net/wireless/ath/ath9k/main.c   |   24 ++++++++++++++----------
 drivers/net/wireless/ath/ath9k/xmit.c   |    7 +++----
 4 files changed, 25 insertions(+), 14 deletions(-)


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

* [PATCH 1/2] ath9k: Enable TIM timer interrupt only when needed.
  2010-03-11 21:55 [PATCH 0/2] ath9k: few stable interrupt fixes Luis R. Rodriguez
@ 2010-03-11 21:55 ` Luis R. Rodriguez
  2010-03-11 21:55 ` [PATCH 2/2] ath9k: configure the beacon only if the STA is associated Luis R. Rodriguez
  2010-03-29 22:55 ` [stable] [PATCH 0/2] ath9k: few stable interrupt fixes Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2010-03-11 21:55 UTC (permalink / raw)
  To: stable
  Cc: linville, linux-wireless, Senthil Balasubramanian, Luis R. Rodriguez

From: Senthil Balasubramanian <senthilkumar@atheros.com>

commit 3f7c5c10e9dc6bf90179eb9f7c06151d508fb324 upstream.

The TIM timer interrupt is enabled even before the ACK of nullqos
is received which is unnecessary.

Also clean up the CONF_PS part of config callback properly for
better readability.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ath9k.h |    1 +
 drivers/net/wireless/ath/ath9k/main.c  |   24 ++++++++++++++----------
 drivers/net/wireless/ath/ath9k/xmit.c  |    7 +++----
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 1597a42..2bad712 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -267,6 +267,7 @@ void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
 		       u16 tid, u16 *ssn);
 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
 void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
+void ath9k_enable_ps(struct ath_softc *sc);
 
 /********/
 /* VIFs */
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index fda25b5..806c9ce 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2677,6 +2677,19 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
 	mutex_unlock(&sc->mutex);
 }
 
+void ath9k_enable_ps(struct ath_softc *sc)
+{
+	sc->ps_enabled = true;
+	if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
+		if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
+			sc->imask |= ATH9K_INT_TIM_TIMER;
+			ath9k_hw_set_interrupts(sc->sc_ah,
+					sc->imask);
+		}
+	}
+	ath9k_hw_setrxabort(sc->sc_ah, 1);
+}
+
 static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 {
 	struct ath_wiphy *aphy = hw->priv;
@@ -2730,22 +2743,13 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 	if (changed & IEEE80211_CONF_CHANGE_PS) {
 		if (conf->flags & IEEE80211_CONF_PS) {
 			sc->sc_flags |= SC_OP_PS_ENABLED;
-			if (!(ah->caps.hw_caps &
-			      ATH9K_HW_CAP_AUTOSLEEP)) {
-				if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
-					sc->imask |= ATH9K_INT_TIM_TIMER;
-					ath9k_hw_set_interrupts(sc->sc_ah,
-							sc->imask);
-				}
-			}
 			/*
 			 * At this point we know hardware has received an ACK
 			 * of a previously sent null data frame.
 			 */
 			if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) {
 				sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED;
-				sc->ps_enabled = true;
-				ath9k_hw_setrxabort(sc->sc_ah, 1);
+				ath9k_enable_ps(sc);
                         }
 		} else {
 			sc->ps_enabled = false;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 29bf336..736a04d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2053,10 +2053,9 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
 		 */
 		if (bf->bf_isnullfunc &&
 		    (ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) {
-			if ((sc->sc_flags & SC_OP_PS_ENABLED)) {
-				sc->ps_enabled = true;
-				ath9k_hw_setrxabort(sc->sc_ah, 1);
-			} else
+			if ((sc->sc_flags & SC_OP_PS_ENABLED))
+				ath9k_enable_ps(sc);
+			else
 				sc->sc_flags |= SC_OP_NULLFUNC_COMPLETED;
 		}
 
-- 
1.6.3.3


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

* [PATCH 2/2] ath9k: configure the beacon only if the STA is associated
  2010-03-11 21:55 [PATCH 0/2] ath9k: few stable interrupt fixes Luis R. Rodriguez
  2010-03-11 21:55 ` [PATCH 1/2] ath9k: Enable TIM timer interrupt only when needed Luis R. Rodriguez
@ 2010-03-11 21:55 ` Luis R. Rodriguez
  2010-03-29 22:55 ` [stable] [PATCH 0/2] ath9k: few stable interrupt fixes Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2010-03-11 21:55 UTC (permalink / raw)
  To: stable
  Cc: linville, linux-wireless, Senthil Balasubramanian, Luis R. Rodriguez

From: Senthil Balasubramanian <senthilkumar@atheros.com>

commit 1a20034a73a40b8056731f9db0c535cec2961eb7 upstream.

beacons configuration SHOULD be done only if the STA is associated.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath9k/beacon.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 1660ef1..9b73282 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -576,6 +576,13 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
 	u64 tsf;
 	int num_beacons, offset, dtim_dec_count, cfp_dec_count;
 
+	/* No need to configure beacon if we are not associated */
+	if (!common->curaid) {
+		ath_print(common, ATH_DBG_BEACON,
+			 "STA is not yet associated..skipping beacon config\n");
+		return;
+	}
+
 	memset(&bs, 0, sizeof(bs));
 	intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
 
-- 
1.6.3.3


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

* Re: [stable] [PATCH 0/2] ath9k: few stable interrupt fixes
  2010-03-11 21:55 [PATCH 0/2] ath9k: few stable interrupt fixes Luis R. Rodriguez
  2010-03-11 21:55 ` [PATCH 1/2] ath9k: Enable TIM timer interrupt only when needed Luis R. Rodriguez
  2010-03-11 21:55 ` [PATCH 2/2] ath9k: configure the beacon only if the STA is associated Luis R. Rodriguez
@ 2010-03-29 22:55 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2010-03-29 22:55 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: stable, linux-wireless, linville

On Thu, Mar 11, 2010 at 04:55:56PM -0500, Luis R. Rodriguez wrote:
> Here's a few stable IRQ fixes for ath9k which have already
> been merged upstream. We forgot to add the stable tag on them
> so sending these out manually.
> 
> The patches in this series apply to the latest 2.6.33.y but for
> your convenience I have also backported the patches to the latest
> 2.6.32.y kernel.
> 
> The 2.6.33.y patches can be found here:
> 
> http://kernel.org/pub/linux/kernel/people/mcgrof/patches/ath9k/2010-03/33-fixes/01-ath9k-irq/
> 
> The 2.6.32.y patches can be found here:
> 
> http://kernel.org/pub/linux/kernel/people/mcgrof/patches/ath9k/2010-03/32-fixes/01-ath9k-irq/

Thanks, both sets are now queued up.

greg k-h

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

end of thread, other threads:[~2010-03-29 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 21:55 [PATCH 0/2] ath9k: few stable interrupt fixes Luis R. Rodriguez
2010-03-11 21:55 ` [PATCH 1/2] ath9k: Enable TIM timer interrupt only when needed Luis R. Rodriguez
2010-03-11 21:55 ` [PATCH 2/2] ath9k: configure the beacon only if the STA is associated Luis R. Rodriguez
2010-03-29 22:55 ` [stable] [PATCH 0/2] ath9k: few stable interrupt fixes Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.