linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340
@ 2011-11-28  0:22 Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  0:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  Currently in ath9k code there is an attempt which is meant to
disable ANI for ar9100 and ar9340. But it doesn't really achieve
this. All it does is disable ANI init and setup (i.e. calls to
ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
not called ah->config.ani_poll_interval is never initialized (i.e. it
is always zero) and ath_ani_calibrate always executes ANI procedures
(over uninitialized ANI parameters).
  Moreover, ath_ani_calibrate is being called each 1ms because
common->ani.timer is set to zero interval because
ah->config.ani_poll_interval==0 (and thus smallest value of all
intervals). Normally it should not be called this often.
  This patch changes the code so config.enable_ani is used to check if
ANI should be performed.
  Also, this pacthset enables ANI for ar9100 - ANI was always performed
for this chip, but this patch fixes the fact that it was performed
over uninitialized data.

  All comments and suggestions are appreciated.
  Thanks.

Nikolay Martynov (4):
  ath9k: trivial: cosmetic fix in calibration debug log
  ath9k: change calibration debug log to output all calibration types
  ath9k: use config.enable_ani to check if ani should be performed
  ath9k: enable ANI for ar9100 chips

 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
 drivers/net/wireless/ath/ath9k/hw.c           |   12 ++++++++----
 drivers/net/wireless/ath/ath9k/main.c         |   12 +++++++-----
 5 files changed, 19 insertions(+), 12 deletions(-)

-- 
1.7.4.1


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

* [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
@ 2011-11-28  0:22 ` Nikolay Martynov
  2011-11-28  2:52   ` Julian Calaby
  2011-11-28  0:22 ` [PATCH v2 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  0:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  Add missed space and change typo in calibration debugging log.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index 88279e3..157337f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -203,7 +203,7 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %d iq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 12a730d..4b3c70a 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -225,7 +225,7 @@ static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %diq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
-- 
1.7.4.1


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

* [PATCH v2 2/4] ath9k: change calibration debug log to output all calibration types
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
@ 2011-11-28  0:22 ` Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  0:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  To help debugging write a log entry when long calibration, short
calibration or ANI is performed.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e43c41c..9ce3dff 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -561,7 +561,6 @@ void ath_ani_calibrate(unsigned long data)
 	/* Long calibration runs independently of short calibration. */
 	if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
 		longcal = true;
-		ath_dbg(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
 		common->ani.longcal_timer = timestamp;
 	}
 
@@ -569,8 +568,6 @@ void ath_ani_calibrate(unsigned long data)
 	if (!common->ani.caldone) {
 		if ((timestamp - common->ani.shortcal_timer) >= short_cal_interval) {
 			shortcal = true;
-			ath_dbg(common, ATH_DBG_ANI,
-				"shortcal @%lu\n", jiffies);
 			common->ani.shortcal_timer = timestamp;
 			common->ani.resetcal_timer = timestamp;
 		}
@@ -605,6 +602,11 @@ void ath_ani_calibrate(unsigned long data)
 						ah->rxchainmask, longcal);
 	}
 
+        ath_dbg(common, ATH_DBG_ANI,
+                "Calibration @%lu finished: %s %s %s, caldone: %s\n", jiffies,
+                longcal ? "long" : "", shortcal ? "short" : "",
+                aniflag ? "ani" : "", common->ani.caldone ? "true" : "false");
+
 	ath9k_ps_restore(sc);
 
 set_timer:
-- 
1.7.4.1


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

* [PATCH v2 3/4] ath9k: use config.enable_ani to check if ani should be performed
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
@ 2011-11-28  0:22 ` Nikolay Martynov
  2011-11-28  0:22 ` [PATCH v2 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  0:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  Currently in ath9k code there is an attempt which is meant to
disable ANI for ar9100 and ar9340. But it doesn't really achieve
this. All it does is disable ANI init and setup (i.e. calls to
ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
not called ah->config.ani_poll_interval is never initialized (i.e. it
is always zero) and ath_ani_calibrate always executes ANI procedures
(over uninitialized ANI parameters).
  Moreover, ath_ani_calibrate is being called each 1ms because
common->ani.timer is set to zero interval because
ah->config.ani_poll_interval==0 (and thus smallest value of all
intervals). Normally it should not be called this often.
  This patch changes the code so config.enable_ani is used to check if
ANI should be performed.
  config.enable_ani is initialized to true by default. This patch sets
it to false for ar9100 and ar9340.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
 drivers/net/wireless/ath/ath9k/hw.c           |   12 ++++++++----
 drivers/net/wireless/ath/ath9k/main.c         |    4 ++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 0b9a0e8..0843565 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
 	}
 
 	/* Verify whether we must check ANI */
-	if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
+	if (sc->sc_ah->config.enable_ani &&
+            (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
 		aniflag = true;
 		common->ani.checkani_timer = timestamp;
 	}
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 662ab7e..e890104 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -504,10 +504,10 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
 		return ecode;
 	}
 
-	if (!AR_SREV_9100(ah) && !AR_SREV_9340(ah)) {
-		ath9k_hw_ani_setup(ah);
-		ath9k_hw_ani_init(ah);
-	}
+        if (ah->config.enable_ani) {
+                ath9k_hw_ani_setup(ah);
+                ath9k_hw_ani_init(ah);
+        }
 
 	return 0;
 }
@@ -610,6 +610,10 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	if (!AR_SREV_9300_20_OR_LATER(ah))
 		ah->ani_function &= ~ATH9K_ANI_MRC_CCK;
 
+        /* disable ANI for 9100 and 9340 */
+        if (AR_SREV_9100(ah) || AR_SREV_9340(ah))
+                ah->config.enable_ani = false;
+
 	ath9k_hw_init_mode_regs(ah);
 
 	if (!ah->is_pciexpress)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9ce3dff..880106b 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -581,8 +581,8 @@ void ath_ani_calibrate(unsigned long data)
 	}
 
 	/* Verify whether we must check ANI */
-	if ((timestamp - common->ani.checkani_timer) >=
-	     ah->config.ani_poll_interval) {
+	if (sc->sc_ah->config.enable_ani &&
+            (timestamp - common->ani.checkani_timer) >= ah->config.ani_poll_interval) {
 		aniflag = true;
 		common->ani.checkani_timer = timestamp;
 	}
-- 
1.7.4.1


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

* [PATCH v2 4/4] ath9k: enable ANI for ar9100 chips
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
                   ` (2 preceding siblings ...)
  2011-11-28  0:22 ` [PATCH v2 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
@ 2011-11-28  0:22 ` Nikolay Martynov
  2011-11-28  1:09 ` [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Adrian Chadd
  2011-11-30 20:10 ` John W. Linville
  5 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  0:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  Enable ANI for ar9100 since it seems to be working fine (and as a matter of fact ANI was always performed for ar9100 since code which was supposed to disable it didn't achieve this goal).
  This patch sets config.enable_ani to default (true) value for ar9100.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/hw.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e890104..32f946d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -610,8 +610,8 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	if (!AR_SREV_9300_20_OR_LATER(ah))
 		ah->ani_function &= ~ATH9K_ANI_MRC_CCK;
 
-        /* disable ANI for 9100 and 9340 */
-        if (AR_SREV_9100(ah) || AR_SREV_9340(ah))
+	/* disable ANI for 9340 */
+        if (AR_SREV_9340(ah))
                 ah->config.enable_ani = false;
 
 	ath9k_hw_init_mode_regs(ah);
-- 
1.7.4.1


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

* Re: [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
                   ` (3 preceding siblings ...)
  2011-11-28  0:22 ` [PATCH v2 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov
@ 2011-11-28  1:09 ` Adrian Chadd
  2011-11-28  1:18   ` Adrian Chadd
  2011-11-30 20:10 ` John W. Linville
  5 siblings, 1 reply; 20+ messages in thread
From: Adrian Chadd @ 2011-11-28  1:09 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linville, linux-wireless, ath9k-devel, rodrigue

Hi,

The reference HAL disables ANI for AR9130. I'm still waiting for an
answer as to why.

Thanks,


Adrian

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

* Re: [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340
  2011-11-28  1:09 ` [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Adrian Chadd
@ 2011-11-28  1:18   ` Adrian Chadd
  2011-11-28  2:35     ` Nikolay Martynov
  0 siblings, 1 reply; 20+ messages in thread
From: Adrian Chadd @ 2011-11-28  1:18 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linville, linux-wireless, ath9k-devel, rodrigue

.. thinking about it, can you please log some data with ANI disabled
and enabled, so we can see exactly what is going on?

Something missing (from both freebsd and linux) is visibility into
exactly what the ANI code is doing. You can turn on logging to see
when the parameters are twiddled, but there's no easy way to log and
graph what effect the ANI parameters are having.

FreeBSD is slightly ahead here - I can log the tx/rx frames, ofdm/cck
phy error rate and then when the parameters are changed; but the
driver/HAL doesn't (currently) export what those values are to the
athstats program.

I think we'd all be better off if we had some tools to graph/analyse
this kind of stuff; we could then figure out if it's having any kind
of effect.

Thanks for chasing this up! I'm currently hacking on my openwrt (sort
of) inspired build system for FreeBSD, targetting an AR913x device. So
this is quite relevant to me at the present moment. :)



Adrian

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

* Re: [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340
  2011-11-28  1:18   ` Adrian Chadd
@ 2011-11-28  2:35     ` Nikolay Martynov
  0 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  2:35 UTC (permalink / raw)
  To: Adrian Chadd; +Cc: linville, linux-wireless, ath9k-devel, rodrigue

Hi.

  I have a router with ar9102 and I did some logging on ANI before. It
does display some changing values overtime (an it is actually possible
to turn on this logging via debug sysfs file). Moreover, as I've
mentioned in comments to patch - ANI was always enabled for those
devices in ath9k driver, but it was not initialized properly during
card initialization. So I think my patch should not make things worse
then it was before for any hardware. And it might make them better for
some. I personally was running my router with this patch for more then
week now without any problems, so I do not think I can tell that ANI
part is missing from my hardware. Also, openwrt recently incorporated
similar thing as a separate patch for 9100 devices.
  I'll try to do a bit more extensive logging later.

2011/11/27 Adrian Chadd <adrian@freebsd.org>:
> .. thinking about it, can you please log some data with ANI disabled
> and enabled, so we can see exactly what is going on?
>
> Something missing (from both freebsd and linux) is visibility into
> exactly what the ANI code is doing. You can turn on logging to see
> when the parameters are twiddled, but there's no easy way to log and
> graph what effect the ANI parameters are having.
>
> FreeBSD is slightly ahead here - I can log the tx/rx frames, ofdm/cck
> phy error rate and then when the parameters are changed; but the
> driver/HAL doesn't (currently) export what those values are to the
> athstats program.
>
> I think we'd all be better off if we had some tools to graph/analyse
> this kind of stuff; we could then figure out if it's having any kind
> of effect.
>
> Thanks for chasing this up! I'm currently hacking on my openwrt (sort
> of) inspired build system for FreeBSD, targetting an AR913x device. So
> this is quite relevant to me at the present moment. :)
>
>
>
> Adrian
>



-- 
Truthfully yours,
Martynov Nikolay.
Email: mar.kolya@gmail.com

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

* Re: [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log
  2011-11-28  0:22 ` [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
@ 2011-11-28  2:52   ` Julian Calaby
  2011-11-28  3:49     ` Nikolay Martynov
  2011-11-28  3:51     ` [PATCH v3] " Nikolay Martynov
  0 siblings, 2 replies; 20+ messages in thread
From: Julian Calaby @ 2011-11-28  2:52 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linville, linux-wireless, ath9k-devel, rodrigue

Nikolay,

Minor nit:

On Mon, Nov 28, 2011 at 11:22, Nikolay Martynov <mar.kolya@gmail.com> wrote:
>  Add missed space and change typo in calibration debugging log.
>
> Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
> ---
>  drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
>  drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
> index 12a730d..4b3c70a 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
> @@ -225,7 +225,7 @@ static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
>                        i);
>
>                ath_dbg(common, ATH_DBG_CALIBRATE,
> -                       "Orignal: Chn %diq_corr_meas = 0x%08x\n",
> +                       "Original: Chn %diq_corr_meas = 0x%08x\n",

You haven't put a space after the %d like you did in the other file.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

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

* Re: [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log
  2011-11-28  2:52   ` Julian Calaby
@ 2011-11-28  3:49     ` Nikolay Martynov
  2011-11-28  3:51     ` [PATCH v3] " Nikolay Martynov
  1 sibling, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  3:49 UTC (permalink / raw)
  To: Julian Calaby; +Cc: linville, linux-wireless, ath9k-devel, rodrigue

Oh, sorry, shame on me... I'll resend this one. Other patches in this
set should not depend on this.

2011/11/27 Julian Calaby <julian.calaby@gmail.com>:
> Nikolay,
>
> Minor nit:
>
> On Mon, Nov 28, 2011 at 11:22, Nikolay Martynov <mar.kolya@gmail.com> wrote:
>>  Add missed space and change typo in calibration debugging log.
>>
>> Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
>> ---
>>  drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
>>  drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
>> index 12a730d..4b3c70a 100644
>> --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
>> +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
>> @@ -225,7 +225,7 @@ static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
>>                        i);
>>
>>                ath_dbg(common, ATH_DBG_CALIBRATE,
>> -                       "Orignal: Chn %diq_corr_meas = 0x%08x\n",
>> +                       "Original: Chn %diq_corr_meas = 0x%08x\n",
>
> You haven't put a space after the %d like you did in the other file.
>
> Thanks,
>
> --
> Julian Calaby
>
> Email: julian.calaby@gmail.com
> Profile: http://www.google.com/profiles/julian.calaby/
> .Plan: http://sites.google.com/site/juliancalaby/
>



-- 
Truthfully yours,
Martynov Nikolay.
Email: mar.kolya@gmail.com

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

* [PATCH v3] ath9k: trivial: cosmetic fix in calibration debug log
  2011-11-28  2:52   ` Julian Calaby
  2011-11-28  3:49     ` Nikolay Martynov
@ 2011-11-28  3:51     ` Nikolay Martynov
  1 sibling, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-28  3:51 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, Nikolay Martynov

  Add missed space and change typo in calibration debugging log.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index 88279e3..157337f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -203,7 +203,7 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %d iq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 12a730d..755c98e 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -225,7 +225,7 @@ static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %d iq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
-- 
1.7.4.1


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

* Re: [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340
  2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
                   ` (4 preceding siblings ...)
  2011-11-28  1:09 ` [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Adrian Chadd
@ 2011-11-30 20:10 ` John W. Linville
  2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
  5 siblings, 1 reply; 20+ messages in thread
From: John W. Linville @ 2011-11-30 20:10 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linux-wireless, ath9k-devel, rodrigue

On Sun, Nov 27, 2011 at 07:22:10PM -0500, Nikolay Martynov wrote:
>   Currently in ath9k code there is an attempt which is meant to
> disable ANI for ar9100 and ar9340. But it doesn't really achieve
> this. All it does is disable ANI init and setup (i.e. calls to
> ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
> not called ah->config.ani_poll_interval is never initialized (i.e. it
> is always zero) and ath_ani_calibrate always executes ANI procedures
> (over uninitialized ANI parameters).
>   Moreover, ath_ani_calibrate is being called each 1ms because
> common->ani.timer is set to zero interval because
> ah->config.ani_poll_interval==0 (and thus smallest value of all
> intervals). Normally it should not be called this often.
>   This patch changes the code so config.enable_ani is used to check if
> ANI should be performed.
>   Also, this pacthset enables ANI for ar9100 - ANI was always performed
> for this chip, but this patch fixes the fact that it was performed
> over uninitialized data.
> 
>   All comments and suggestions are appreciated.
>   Thanks.
> 
> Nikolay Martynov (4):
>   ath9k: trivial: cosmetic fix in calibration debug log
>   ath9k: change calibration debug log to output all calibration types
>   ath9k: use config.enable_ani to check if ani should be performed
>   ath9k: enable ANI for ar9100 chips

More than one of the patches in this series either adds indentation
with only spaces or even changes existing indentation with tabs
to spaces.  Please don't do this.

I'm dropping this series for the above reason.  Please feel free
to fix your editor if necessary and to revise the patches to avoid
needless and/or inappropriate whitespace changes or additions.

John
-- 
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] 20+ messages in thread

* [PATCH v3 0/4] Fix the way ANI is being handled for ar9100 and ar9340
  2011-11-30 20:10 ` John W. Linville
@ 2011-11-30 20:46   ` Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
                       ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-30 20:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  I'm really sorry that I missed all those tabs-vs-spaces. Please accept my apologies.
  I think I've now fixed all problems and checkpatch.pl doesn't report
any issues. Please let me know if there are still style problems.
  Thanks!

  Currently in ath9k code there is an attempt which is meant to
disable ANI for ar9100 and ar9340. But it doesn't really achieve
this. All it does is disable ANI init and setup (i.e. calls to
ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
not called ah->config.ani_poll_interval is never initialized (i.e. it
is always zero) and ath_ani_calibrate always executes ANI procedures
(over uninitialized ANI parameters).
  Moreover, ath_ani_calibrate is being called each 1ms because
common->ani.timer is set to zero interval because
ah->config.ani_poll_interval==0 (and thus smallest value of all
intervals). Normally it should not be called this often.
  This patch changes the code so config.enable_ani is used to check if
ANI should be performed.
  Also, this patchset enables ANI for ar9100 - ANI was always performed
for this chip, but this patch fixes the fact that it was performed
over uninitialized data.

  All comments and suggestions are appreciated.
  Thanks.

Nikolay Martynov (4):
  ath9k: trivial: cosmetic fix in calibration debug log
  ath9k: change calibration debug log to output all calibration types
  ath9k: use config.enable_ani to check if ani should be performed
  ath9k: enable ANI for ar9100 chips

 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
 drivers/net/wireless/ath/ath9k/hw.c           |    6 +++++-
 drivers/net/wireless/ath/ath9k/main.c         |   13 ++++++++-----
 5 files changed, 17 insertions(+), 9 deletions(-)

-- 
1.7.4.1


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

* [PATCH v3 1/4] ath9k: trivial: cosmetic fix in calibration debug log
  2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
@ 2011-11-30 20:46     ` Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-30 20:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  Add missed space and change typo in calibration debugging log.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index 88279e3..157337f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -203,7 +203,7 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %d iq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 12a730d..755c98e 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -225,7 +225,7 @@ static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
 			i);
 
 		ath_dbg(common, ATH_DBG_CALIBRATE,
-			"Orignal: Chn %diq_corr_meas = 0x%08x\n",
+			"Original: Chn %d iq_corr_meas = 0x%08x\n",
 			i, ah->totalIqCorrMeas[i]);
 
 		iqCorrNeg = 0;
-- 
1.7.4.1


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

* [PATCH v3 2/4] ath9k: change calibration debug log to output all calibration types
  2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
@ 2011-11-30 20:46     ` Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov
  3 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-30 20:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  To help debugging write a log entry when long calibration, short
calibration or ANI is performed.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e43c41c..937fcfa 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -561,7 +561,6 @@ void ath_ani_calibrate(unsigned long data)
 	/* Long calibration runs independently of short calibration. */
 	if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
 		longcal = true;
-		ath_dbg(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
 		common->ani.longcal_timer = timestamp;
 	}
 
@@ -569,8 +568,6 @@ void ath_ani_calibrate(unsigned long data)
 	if (!common->ani.caldone) {
 		if ((timestamp - common->ani.shortcal_timer) >= short_cal_interval) {
 			shortcal = true;
-			ath_dbg(common, ATH_DBG_ANI,
-				"shortcal @%lu\n", jiffies);
 			common->ani.shortcal_timer = timestamp;
 			common->ani.resetcal_timer = timestamp;
 		}
@@ -605,6 +602,11 @@ void ath_ani_calibrate(unsigned long data)
 						ah->rxchainmask, longcal);
 	}
 
+	ath_dbg(common, ATH_DBG_ANI,
+		"Calibration @%lu finished: %s %s %s, caldone: %s\n", jiffies,
+		longcal ? "long" : "", shortcal ? "short" : "",
+		aniflag ? "ani" : "", common->ani.caldone ? "true" : "false");
+
 	ath9k_ps_restore(sc);
 
 set_timer:
-- 
1.7.4.1


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

* [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed
  2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
  2011-11-30 20:46     ` [PATCH v3 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
@ 2011-11-30 20:46     ` Nikolay Martynov
  2011-12-02 11:04       ` Felix Fietkau
  2011-11-30 20:46     ` [PATCH v3 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov
  3 siblings, 1 reply; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-30 20:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  Currently in ath9k code there is an attempt which is meant to
disable ANI for ar9100 and ar9340. But it doesn't really achieve
this. All it does is disable ANI init and setup (i.e. calls to
ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
not called ah->config.ani_poll_interval is never initialized (i.e. it
is always zero) and ath_ani_calibrate always executes ANI procedures
(over uninitialized ANI parameters).
  Moreover, ath_ani_calibrate is being called each 1ms because
common->ani.timer is set to zero interval because
ah->config.ani_poll_interval==0 (and thus smallest value of all
intervals). Normally it should not be called this often.
  This patch changes the code so config.enable_ani is used to check if
ANI should be performed.
  config.enable_ani is initialized to true by default. This patch sets
it to false for ar9100 and ar9340.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
 drivers/net/wireless/ath/ath9k/hw.c           |    6 +++++-
 drivers/net/wireless/ath/ath9k/main.c         |    5 +++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 0b9a0e8..391d59c 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
 	}
 
 	/* Verify whether we must check ANI */
-	if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
+	if (sc->sc_ah->config.enable_ani &&
+	    (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
 		aniflag = true;
 		common->ani.checkani_timer = timestamp;
 	}
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 662ab7e..44f785c 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -504,7 +504,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
 		return ecode;
 	}
 
-	if (!AR_SREV_9100(ah) && !AR_SREV_9340(ah)) {
+	if (ah->config.enable_ani) {
 		ath9k_hw_ani_setup(ah);
 		ath9k_hw_ani_init(ah);
 	}
@@ -610,6 +610,10 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	if (!AR_SREV_9300_20_OR_LATER(ah))
 		ah->ani_function &= ~ATH9K_ANI_MRC_CCK;
 
+	/* disable ANI for 9100 and 9340 */
+	if (AR_SREV_9100(ah) || AR_SREV_9340(ah))
+		ah->config.enable_ani = false;
+
 	ath9k_hw_init_mode_regs(ah);
 
 	if (!ah->is_pciexpress)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 937fcfa..cfd10cc 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -581,8 +581,9 @@ void ath_ani_calibrate(unsigned long data)
 	}
 
 	/* Verify whether we must check ANI */
-	if ((timestamp - common->ani.checkani_timer) >=
-	     ah->config.ani_poll_interval) {
+	if (sc->sc_ah->config.enable_ani
+	    && (timestamp - common->ani.checkani_timer) >=
+	    ah->config.ani_poll_interval) {
 		aniflag = true;
 		common->ani.checkani_timer = timestamp;
 	}
-- 
1.7.4.1


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

* [PATCH v3 4/4] ath9k: enable ANI for ar9100 chips
  2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
                       ` (2 preceding siblings ...)
  2011-11-30 20:46     ` [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
@ 2011-11-30 20:46     ` Nikolay Martynov
  3 siblings, 0 replies; 20+ messages in thread
From: Nikolay Martynov @ 2011-11-30 20:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  Enable ANI for ar9100 since it seems to be working fine (and as a matter of fact ANI was always performed for ar9100 since code which was supposed to disable it didn't achieve this goal).
  This patch sets config.enable_ani to default (true) value for ar9100.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
 drivers/net/wireless/ath/ath9k/hw.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 44f785c..0015613 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -610,8 +610,8 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	if (!AR_SREV_9300_20_OR_LATER(ah))
 		ah->ani_function &= ~ATH9K_ANI_MRC_CCK;
 
-	/* disable ANI for 9100 and 9340 */
-	if (AR_SREV_9100(ah) || AR_SREV_9340(ah))
+	/* disable ANI for 9340 */
+	if (AR_SREV_9340(ah))
 		ah->config.enable_ani = false;
 
 	ath9k_hw_init_mode_regs(ah);
-- 
1.7.4.1


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

* Re: [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed
  2011-11-30 20:46     ` [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
@ 2011-12-02 11:04       ` Felix Fietkau
  2011-12-02 15:22         ` Nikolay Martynov
  0 siblings, 1 reply; 20+ messages in thread
From: Felix Fietkau @ 2011-12-02 11:04 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linville, linux-wireless

On 2011-11-30 9:46 PM, Nikolay Martynov wrote:
>   Currently in ath9k code there is an attempt which is meant to
> disable ANI for ar9100 and ar9340. But it doesn't really achieve
> this. All it does is disable ANI init and setup (i.e. calls to
> ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
> not called ah->config.ani_poll_interval is never initialized (i.e. it
> is always zero) and ath_ani_calibrate always executes ANI procedures
> (over uninitialized ANI parameters).
>   Moreover, ath_ani_calibrate is being called each 1ms because
> common->ani.timer is set to zero interval because
> ah->config.ani_poll_interval==0 (and thus smallest value of all
> intervals). Normally it should not be called this often.
>   This patch changes the code so config.enable_ani is used to check if
> ANI should be performed.
>   config.enable_ani is initialized to true by default. This patch sets
> it to false for ar9100 and ar9340.
> 
> Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
> ---
>  drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
>  drivers/net/wireless/ath/ath9k/hw.c           |    6 +++++-
>  drivers/net/wireless/ath/ath9k/main.c         |    5 +++--
>  3 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index 0b9a0e8..391d59c 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
>  	}
>  
>  	/* Verify whether we must check ANI */
> -	if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
> +	if (sc->sc_ah->config.enable_ani &&
> +	    (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>  		aniflag = true;
>  		common->ani.checkani_timer = timestamp;
>  	}
Does not compile, there is no 'sc' variable, use ah->config.enable_ani.

- Felix

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

* Re: [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed
  2011-12-02 11:04       ` Felix Fietkau
@ 2011-12-02 15:22         ` Nikolay Martynov
  2011-12-02 16:40           ` Felix Fietkau
  0 siblings, 1 reply; 20+ messages in thread
From: Nikolay Martynov @ 2011-12-02 15:22 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linville, linux-wireless

2011/12/2 Felix Fietkau <nbd@openwrt.org>:
> On 2011-11-30 9:46 PM, Nikolay Martynov wrote:
>> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>> index 0b9a0e8..391d59c 100644
>> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>> @@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
>>       }
>>
>>       /* Verify whether we must check ANI */
>> -     if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>> +     if (sc->sc_ah->config.enable_ani &&
>> +         (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>>               aniflag = true;
>>               common->ani.checkani_timer = timestamp;
>>       }
> Does not compile, there is no 'sc' variable, use ah->config.enable_ani.

  Hmm... weird that it didn't fail when I applied this to openwrt.
Anyway, thanks for letting me know, I'll send an updated patch!

-- 
Truthfully yours,
Martynov Nikolay.
Email: mar.kolya@gmail.com

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

* Re: [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed
  2011-12-02 15:22         ` Nikolay Martynov
@ 2011-12-02 16:40           ` Felix Fietkau
  0 siblings, 0 replies; 20+ messages in thread
From: Felix Fietkau @ 2011-12-02 16:40 UTC (permalink / raw)
  To: Nikolay Martynov; +Cc: linville, linux-wireless

On 2011-12-02 4:22 PM, Nikolay Martynov wrote:
> 2011/12/2 Felix Fietkau <nbd@openwrt.org>:
>> On 2011-11-30 9:46 PM, Nikolay Martynov wrote:
>>> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> index 0b9a0e8..391d59c 100644
>>> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> @@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
>>>       }
>>>
>>>       /* Verify whether we must check ANI */
>>> -     if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>>> +     if (sc->sc_ah->config.enable_ani &&
>>> +         (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>>>               aniflag = true;
>>>               common->ani.checkani_timer = timestamp;
>>>       }
>> Does not compile, there is no 'sc' variable, use ah->config.enable_ani.
> 
>   Hmm... weird that it didn't fail when I applied this to openwrt.
> Anyway, thanks for letting me know, I'll send an updated patch!
Maybe you didn't enable kmod-ath9k-htc - if that one's disabled, it does
not build this source file.

- Felix

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

end of thread, other threads:[~2011-12-02 16:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28  0:22 [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Nikolay Martynov
2011-11-28  0:22 ` [PATCH v2 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
2011-11-28  2:52   ` Julian Calaby
2011-11-28  3:49     ` Nikolay Martynov
2011-11-28  3:51     ` [PATCH v3] " Nikolay Martynov
2011-11-28  0:22 ` [PATCH v2 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
2011-11-28  0:22 ` [PATCH v2 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
2011-11-28  0:22 ` [PATCH v2 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov
2011-11-28  1:09 ` [PATCH v2 0/4] Fix the way ANI is being handled for ar9100 and ar9340 Adrian Chadd
2011-11-28  1:18   ` Adrian Chadd
2011-11-28  2:35     ` Nikolay Martynov
2011-11-30 20:10 ` John W. Linville
2011-11-30 20:46   ` [PATCH v3 " Nikolay Martynov
2011-11-30 20:46     ` [PATCH v3 1/4] ath9k: trivial: cosmetic fix in calibration debug log Nikolay Martynov
2011-11-30 20:46     ` [PATCH v3 2/4] ath9k: change calibration debug log to output all calibration types Nikolay Martynov
2011-11-30 20:46     ` [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed Nikolay Martynov
2011-12-02 11:04       ` Felix Fietkau
2011-12-02 15:22         ` Nikolay Martynov
2011-12-02 16:40           ` Felix Fietkau
2011-11-30 20:46     ` [PATCH v3 4/4] ath9k: enable ANI for ar9100 chips Nikolay Martynov

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).