Search Linux Wireless

Re: [PATCH 1/3] ath5k: fix noise floor calibration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 23, 2007 5:52 AM, Bruno Randolf <bruno@xxxxxxxxxxxxx> wrote:

> diff --git a/drivers/net/wireless/ath5k/phy.c b/drivers/net/wireless/ath5k/phy.c
> index 3c2a67c..9b91121 100644
> --- a/drivers/net/wireless/ath5k/phy.c
> +++ b/drivers/net/wireless/ath5k/phy.c
> @@ -1519,6 +1519,51 @@ int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel)
>  /*****************\
>    PHY calibration
>  \*****************/
> +int
> +ath5k_hw_noise_floor_calibration(struct ath5k_hw *ah, short freq)
> +{

Good idea :) Mind adding kdoc for this? I hope we can add kdoc for
more hw stuff to eventually export this automatically as developer
documentation.

> +       int ret;
> +       unsigned int i;
> +       s32 noise_floor;
> +
> +       /*
> +        * Enable noise floor calibration and wait until completion
> +        */
> +       AR5K_REG_ENABLE_BITS(ah, AR5K_PHY_AGCCTL,
> +                               AR5K_PHY_AGCCTL_NF);

This is minor but you probably noticed ath5k_hw_rf511x_calibrate()
only enables noise floor calibration but does not actually wait and
check for the value. I am not sure why. Anyone? Anyway, until we do
how about wrapping the AR5K_REG_ENABLE_BITS for noise floor into a
small static inline ath5k_hw_enable_noise_floor(). Then your new
routine can call it and so can ath5k_hw_rf511x_calibrate().

> +       ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_CALIBRATE,
> +               "noise floor %d, %d\n", noise_floor, AR5K_TUNE_NOISE_FLOOR);

This relies on your previous debug.[ch] patches which are pending.
Just a note, next time you may want to mention this, just so that if
someone wants to test this they'll know how to get to test it without
compilation problems. It'll also help John know if he can apply this
or if he has to wait for pending patches.

  Luis
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux