linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Randolf <br1@einfach.org>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, bob@bobcopeland.com,
	ath5k-devel@lists.ath5k.org, lrodriguez@atheros.com,
	mickflemm@gmail.com
Subject: [PATCH 01/10] ath5k: remove static calibration interval variable
Date: Thu, 25 Mar 2010 14:49:03 +0900	[thread overview]
Message-ID: <20100325054903.10697.14362.stgit@tt-desk> (raw)
In-Reply-To: <20100325054603.10697.48915.stgit@tt-desk>

Remove static variable ath5k_calinterval which was used as a constant. Use a
#define instead. Also we don't need ah_cal_intval.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/ath5k.h |    4 +---
 drivers/net/wireless/ath/ath5k/base.c  |    4 ----
 drivers/net/wireless/ath/ath5k/phy.c   |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 1d7491c..a3019ee 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -202,6 +202,7 @@
 #define AR5K_TUNE_MAX_TXPOWER			63
 #define AR5K_TUNE_DEFAULT_TXPOWER		25
 #define AR5K_TUNE_TPC_TXPOWER			false
+#define ATH5K_TUNE_CALIBRATION_INTERVAL_FULL    10000   /* 10 sec */
 
 #define AR5K_INIT_CARR_SENSE_EN			1
 
@@ -1101,9 +1102,6 @@ struct ath5k_hw {
 	/* Calibration timestamp */
 	unsigned long		ah_cal_tstamp;
 
-	/* Calibration interval (secs) */
-	u8			ah_cal_intval;
-
 	/* Software interrupt mask */
 	u8			ah_swi_mask;
 
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index b142a78..39d5800 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -59,7 +59,6 @@
 #include "reg.h"
 #include "debug.h"
 
-static u8 ath5k_calinterval = 10; /* Calibrate PHY every 10 secs (TODO: Fixme) */
 static int modparam_nohwcrypt;
 module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
@@ -2497,9 +2496,6 @@ ath5k_init(struct ath5k_softc *sc)
 	 */
 	ath5k_stop_locked(sc);
 
-	/* Set PHY calibration interval */
-	ah->ah_cal_intval = ath5k_calinterval;
-
 	/*
 	 * The basic interface to setting the hardware in a good
 	 * state is ``reset''.  On return the hardware is known to
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 47f3679..07f59b1 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1108,7 +1108,7 @@ ath5k_hw_calibration_poll(struct ath5k_hw *ah)
 	/* Calibration interval in jiffies */
 	unsigned long cal_intval;
 
-	cal_intval = msecs_to_jiffies(ah->ah_cal_intval * 1000);
+	cal_intval = msecs_to_jiffies(ATH5K_TUNE_CALIBRATION_INTERVAL_FULL);
 
 	/* Initialize timestamp if needed */
 	if (!ah->ah_cal_tstamp)


  reply	other threads:[~2010-03-25  5:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25  5:48 [PATCH 00/10] ANI for ath5k Bruno Randolf
2010-03-25  5:49 ` Bruno Randolf [this message]
2010-03-25  5:49 ` [PATCH 02/10] ath5k: remove the use of SWI interrupt Bruno Randolf
2010-03-25  5:49 ` [PATCH 03/10] ath5k: optimize ath5k_hw_calibration_poll Bruno Randolf
2010-03-25  5:49 ` [PATCH 04/10] ath5k: move ath5k_hw_calibration_poll to base.c Bruno Randolf
2010-03-25  5:49 ` [PATCH 05/10] ath5k: keep beacon RSSI average Bruno Randolf
2010-03-25  5:49 ` [PATCH 06/10] ath5k: initialize default noise floor Bruno Randolf
2010-03-25  5:49 ` [PATCH 07/10] ath5k: simplify MIB counters Bruno Randolf
2010-03-25  5:49 ` [PATCH 08/10] ath5k: update phy errors codes Bruno Randolf
2010-03-25  5:49 ` [PATCH 09/10] ath5k: add capability flag for phyerror counters Bruno Randolf
2010-03-25  5:49 ` [PATCH 10/10] ath5k: Adaptive Noise Immunity (ANI) Implementation Bruno Randolf
2010-03-25 10:59   ` Joerg Pommnitz
2010-03-26  0:18     ` Bruno Randolf
2010-03-29  2:02   ` [ath5k-devel] " Bob Copeland
2010-03-29  2:26     ` Bruno Randolf
2010-03-25 21:10 ` [ath5k-devel] [PATCH 00/10] ANI for ath5k Derek Smithies
2010-03-25 21:13   ` Luis R. Rodriguez
2010-03-26  0:27     ` Bruno Randolf
2010-03-26  0:44       ` Luis R. Rodriguez
2010-03-26  0:53         ` Bruno Randolf
2010-03-26  1:06           ` Luis R. Rodriguez
2010-03-26  1:21       ` Derek Smithies
2010-03-26  1:32         ` Luis R. Rodriguez
2010-03-26  1:46         ` Bruno Randolf
2010-03-26 20:34           ` Derek Smithies
2010-03-27  5:18             ` Bruno Randolf

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=20100325054903.10697.14362.stgit@tt-desk \
    --to=br1@einfach.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=bob@bobcopeland.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=mickflemm@gmail.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 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).