2009/2/4 Tulio Magno Quites Machado Filho <[email protected]>:
> Separate both calibrations and call noise floor calibrations only when 
> necessary.
>
> Signed-off-by: Tulio Magno Quites Machado Filho <[email protected]>
> ---
>  drivers/net/wireless/ath5k/base.c |    4 ++++
>  drivers/net/wireless/ath5k/phy.c  |    8 --------
>  drivers/net/wireless/ath5k/reg.h  |    1 +
>  3 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/base.c 
> b/drivers/net/wireless/ath5k/base.c
> index 697450d..251d022 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -2518,6 +2518,10 @@ ath5k_calibrate(unsigned long data)
>                        ieee80211_frequency_to_channel(
>                                sc->curchan->center_freq));
>
> +       if(ah->ah_regdomain & AR5K_PHY_NFC) {
> +               ath5k_hw_noise_floor_calibration(ah, 
> sc->curchan->center_freq);
> +       }
> +
>        mod_timer(&sc->calib_tim, round_jiffies(jiffies +
>                        msecs_to_jiffies(ath5k_calinterval * 1000)));
>  }

How is regdomain related to nf calibration ?
Also where does ah_regdomain gets updated ?

This way nf calibration never happens...

> @@ -1325,12 +1323,6 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw 
> *ah,
>
>  done:
>
> -       /* TODO: Separate noise floor calibration from I/Q calibration
> -        * since noise floor calibration interrupts rx path while I/Q
> -        * calibration doesn't. We don't need to run noise floor calibration
> -        * as often as I/Q calibration.*/
> -       ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
> -
>        /* Initiate a gain_F calibration */
>        ath5k_hw_request_rfgain_probe(ah);
>

I've put that TODO there because there is a plan about this that
includes stopping tx queues etc, it's not that simple...

> diff --git a/drivers/net/wireless/ath5k/reg.h 
> b/drivers/net/wireless/ath5k/reg.h
> index d023eb5..e8a10b8 100644
> --- a/drivers/net/wireless/ath5k/reg.h
> +++ b/drivers/net/wireless/ath5k/reg.h
> @@ -2032,6 +2032,7 @@
>  #define        AR5K_PHY_NF_THRESH62_S          12
>  #define        AR5K_PHY_NF_MINCCA_PWR          0x0ff80000      /* ??? */
>  #define        AR5K_PHY_NF_MINCCA_PWR_S        19
> +#define AR5K_PHY_NFC                   4 /* Bit to identify when it is 
> necessary floor calibration */
>
>  /*
>  * PHY ADC saturation register [5110]

There is no such bit on the register and if there was such bit you'll
probably want to AND ah_regdomain against 0x10


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
_______________________________________________
ath5k-devel mailing list
[email protected]
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to