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
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 <[email protected]>
> ---
> 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 <[email protected]>
Don't generate calibration errors messages when not needed.
Signed-off-by: Fabio Rossi <[email protected]>
---
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 */
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