From: Greg Kroah-Hartman Date: Mon, 29 Mar 2010 22:57:24 +0000 (-0700) Subject: .33 patches X-Git-Tag: v2.6.27.46~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f833e0d6dbee0bef86292ea4dabbb028636337e;p=thirdparty%2Fkernel%2Fstable-queue.git .33 patches --- diff --git a/queue-2.6.33/ath9k-configure-the-beacon-only-if-the-sta-is-associated.patch b/queue-2.6.33/ath9k-configure-the-beacon-only-if-the-sta-is-associated.patch new file mode 100644 index 00000000000..5ea50e05d33 --- /dev/null +++ b/queue-2.6.33/ath9k-configure-the-beacon-only-if-the-sta-is-associated.patch @@ -0,0 +1,36 @@ +From b338c33a9ac0ecd10495bff5998efd8f63608ec0 Mon Sep 17 00:00:00 2001 +From: Senthil Balasubramanian +Date: Wed, 3 Feb 2010 22:50:18 +0530 +Subject: ath9k: configure the beacon only if the STA is associated + +From: Senthil Balasubramanian + +commit 1a20034a73a40b8056731f9db0c535cec2961eb7 upstream. + +beacons configuration SHOULD be done only if the STA is associated. + +Signed-off-by: Senthil Balasubramanian +Signed-off-by: John W. Linville +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/beacon.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/wireless/ath/ath9k/beacon.c ++++ b/drivers/net/wireless/ath/ath9k/beacon.c +@@ -573,6 +573,13 @@ static void ath_beacon_config_sta(struct + 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; + diff --git a/queue-2.6.33/ath9k-enable-tim-timer-interrupt-only-when-needed.patch b/queue-2.6.33/ath9k-enable-tim-timer-interrupt-only-when-needed.patch new file mode 100644 index 00000000000..d0a511f28f6 --- /dev/null +++ b/queue-2.6.33/ath9k-enable-tim-timer-interrupt-only-when-needed.patch @@ -0,0 +1,98 @@ +From 66024478ac9ed5a373ab6abfa055a46b156906ff Mon Sep 17 00:00:00 2001 +From: Senthil Balasubramanian +Date: Thu, 11 Mar 2010 12:10:12 -0800 +Subject: ath9k: Enable TIM timer interrupt only when needed. + +From: Senthil Balasubramanian + +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 +Signed-off-by: John W. Linville +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman + +--- + 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(-) + +--- 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 + 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 */ +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -2681,6 +2681,19 @@ static void ath9k_remove_interface(struc + 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; +@@ -2734,22 +2747,13 @@ static int ath9k_config(struct ieee80211 + 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; +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -2034,10 +2034,9 @@ static void ath_tx_processq(struct ath_s + */ + 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; + } + diff --git a/queue-2.6.33/series b/queue-2.6.33/series index ce51961a988..c95d446ec80 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -105,3 +105,5 @@ hwmon-coretemp-add-missing-newline-to-dev_warn-message.patch alsa-hda-use-lpib-for-ga-ma770-ud3-board.patch alsa-ac97-add-toshiba-p500-to-ac97-jack-sense-blacklist.patch alsa-ac97-add-ibm-thinkpad-r40e-to-headphone-line-jack-sense-blacklist.patch +ath9k-enable-tim-timer-interrupt-only-when-needed.patch +ath9k-configure-the-beacon-only-if-the-sta-is-associated.patch