From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 2/2] ath9k: Kick start paprd calibration whenever operating channel changes
Date: Mon, 20 Sep 2010 22:54:47 -0700 [thread overview]
Message-ID: <1285048487-16795-2-git-send-email-vasanth@atheros.com> (raw)
In-Reply-To: <1285048487-16795-1-git-send-email-vasanth@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index df47f79..c1b4962 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -645,6 +645,7 @@ struct ath_hw {
struct ath9k_hw_capabilities caps;
struct ath9k_channel channels[38];
struct ath9k_channel *curchan;
+ struct ath9k_channel prev_paprd_chan;
union {
struct ar5416_eeprom_def def;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index a133878..9150788 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -266,6 +266,20 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
return r;
}
+static bool is_paprd_done(struct ath_hw *ah)
+{
+ struct ath9k_channel *curchan, *paprd_chan;
+
+ curchan = ah->curchan;
+ paprd_chan = &ah->prev_paprd_chan;
+
+ if ((paprd_chan->channel == curchan->channel) &&
+ paprd_chan->chanmode == curchan->chanmode)
+ return true;
+
+ return false;
+}
+
static void ath_paprd_activate(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
@@ -375,6 +389,8 @@ void ath_paprd_calibrate(struct work_struct *work)
if (chain_ok) {
caldata->paprd_done = true;
+ memcpy(&ah->prev_paprd_chan, ah->curchan,
+ sizeof(struct ath9k_channel));
ath_paprd_activate(sc);
}
@@ -489,7 +505,7 @@ set_timer:
mod_timer(&common->ani.timer, jiffies + msecs_to_jiffies(cal_interval));
if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) && ah->caldata) {
- if (!ah->caldata->paprd_done)
+ if (!is_paprd_done(ah))
ieee80211_queue_work(sc->hw, &sc->paprd_work);
else
ath_paprd_activate(sc);
--
1.7.0.4
next prev parent reply other threads:[~2010-09-21 5:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 5:54 [PATCH 1/2] ath9k: Fix tx struck state with paprd Vasanthakumar Thiagarajan
2010-09-21 5:54 ` Vasanthakumar Thiagarajan [this message]
2010-09-21 10:06 ` [PATCH 2/2] ath9k: Kick start paprd calibration whenever operating channel changes Felix Fietkau
2010-09-21 10:17 ` Vasanthakumar Thiagarajan
2010-09-21 10:25 ` Felix Fietkau
2010-09-21 10:32 ` Vasanthakumar Thiagarajan
2010-09-21 10:42 ` Vasanthakumar Thiagarajan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285048487-16795-2-git-send-email-vasanth@atheros.com \
--to=vasanth@atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.