linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ath5k calibration error
@ 2010-09-06 23:10 Fabio Rossi
  2010-09-07  0:48 ` Bruno Randolf
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Rossi @ 2010-09-06 23:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: br1

In the patch 9e04a7eb1fdf37bc8bc0d0f59e5fb737926f0152 there has been a change 
in the possible return values from ath5k_hw_rf511x_iq_calibrate().

Sometimes I get -1 (before that commit the return value was always 0) because 
i_coffd:0, q_coffd:0 and the following error message is produced:

  ath5k phy0: calibration of channel 8 failed

Of course I'm running on channel 8.

Is this condition normal or something is weird? I have the following card:

  3Com Corporation AR5212 802.11abg NIC (3CRDAG675) (rev 01)

Thanks,
Fabio

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

* Re: ath5k calibration error
  2010-09-06 23:10 ath5k calibration error Fabio Rossi
@ 2010-09-07  0:48 ` Bruno Randolf
  2010-09-08 20:37   ` [PATCH] ath5k: avoid unneeded calibration error messages Fabio Rossi
  0 siblings, 1 reply; 4+ messages in thread
From: Bruno Randolf @ 2010-09-07  0:48 UTC (permalink / raw)
  To: Fabio Rossi; +Cc: linux-wireless

On Tue September 7 2010 08:10:11 Fabio Rossi wrote:
> In the patch 9e04a7eb1fdf37bc8bc0d0f59e5fb737926f0152 there has been a
> change in the possible return values from ath5k_hw_rf511x_iq_calibrate().
> 
> Sometimes I get -1 (before that commit the return value was always 0)
> because i_coffd:0, q_coffd:0 and the following error message is produced:
> 
>   ath5k phy0: calibration of channel 8 failed
> 
> Of course I'm running on channel 8.
> 
> Is this condition normal or something is weird? I have the following card:
> 
>   3Com Corporation AR5212 802.11abg NIC (3CRDAG675) (rev 01)
> 
> Thanks,
> Fabio

hmm, i guess i was wrong to introduce the -1 return value here, since this is 
not really an error condition... 

sorry,
bruno

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

* [PATCH] ath5k: avoid unneeded calibration error messages
  2010-09-07  0:48 ` Bruno Randolf
@ 2010-09-08 20:37   ` Fabio Rossi
  2010-09-09  0:40     ` Bruno Randolf
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Rossi @ 2010-09-08 20:37 UTC (permalink / raw)
  To: John W. Linville; +Cc: Bruno Randolf, linux-wireless

Don't generate calibration errors messages when not needed.

Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
---
diff --git a/drivers/net/wireless/ath/ath5k/phy.c 
b/drivers/net/wireless/ath/ath5k/phy.c                                             
index 984ba92..4932bf2 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1377,7 +1377,7 @@ ath5k_hw_rf511x_iq_calibrate(struct ath5k_hw *ah)
 
        /* protect against divide by 0 and loss of sign bits */
        if (i_coffd == 0 || q_coffd < 2)
-               return -1;
+               return 0;
 
        i_coff = (-iq_corr) / i_coffd;
        i_coff = clamp(i_coff, -32, 31); /* signed 6 bit */

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

* Re: [PATCH] ath5k: avoid unneeded calibration error messages
  2010-09-08 20:37   ` [PATCH] ath5k: avoid unneeded calibration error messages Fabio Rossi
@ 2010-09-09  0:40     ` Bruno Randolf
  0 siblings, 0 replies; 4+ messages in thread
From: Bruno Randolf @ 2010-09-09  0:40 UTC (permalink / raw)
  To: Fabio Rossi; +Cc: John W. Linville, linux-wireless

On Thu September 9 2010 05:37:41 Fabio Rossi wrote:
> Don't generate calibration errors messages when not needed.
> 
> Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
> ---
> diff --git a/drivers/net/wireless/ath/ath5k/phy.c
> b/drivers/net/wireless/ath/ath5k/phy.c
> index 984ba92..4932bf2 100644
> --- a/drivers/net/wireless/ath/ath5k/phy.c
> +++ b/drivers/net/wireless/ath/ath5k/phy.c
> @@ -1377,7 +1377,7 @@ ath5k_hw_rf511x_iq_calibrate(struct ath5k_hw *ah)
> 
>         /* protect against divide by 0 and loss of sign bits */
>         if (i_coffd == 0 || q_coffd < 2)
> -               return -1;
> +               return 0;
> 
>         i_coff = (-iq_corr) / i_coffd;
>         i_coff = clamp(i_coff, -32, 31); /* signed 6 bit */

Acked-by: Bruno Randolf <br1@einfach.org>

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

end of thread, other threads:[~2010-09-09  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06 23:10 ath5k calibration error Fabio Rossi
2010-09-07  0:48 ` Bruno Randolf
2010-09-08 20:37   ` [PATCH] ath5k: avoid unneeded calibration error messages Fabio Rossi
2010-09-09  0:40     ` Bruno Randolf

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