Search Linux Wireless

Re: [PATCH 3/5] ath9k: Use common cycle counters

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

 



On Tue, Oct 5, 2010 at 2:55 AM, Bruno Randolf <br1@xxxxxxxxxxx> wrote:
> Update ath9k to use the common cycle counters.
>
> This also includes other changes from Felix Fietkaus "[PATCH 2/4] ath9k_hw:
> merge codepaths that access the cycle counter registers".
>
> Compile tested only. ath9k team please review...
>
> Signed-off-by: Felix Fietkau <nbd@xxxxxxxxxxx>
> Signed-off-by: Bruno Randolf <br1@xxxxxxxxxxx>
> ---
> Âdrivers/net/wireless/ath/ath9k/ani.c    Â|  87 +++------------------------
> Âdrivers/net/wireless/ath/ath9k/ani.h    Â|  Â6 --
> Âdrivers/net/wireless/ath/ath9k/ar5008_phy.c | Â Â9 +--
> Âdrivers/net/wireless/ath/ath9k/ar9003_phy.c | Â 18 +++---
> Â4 files changed, 22 insertions(+), 98 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
> index 0496f96..0c0d01d 100644
> --- a/drivers/net/wireless/ath/ath9k/ani.c
> +++ b/drivers/net/wireless/ath/ath9k/ani.c
> @@ -549,47 +549,21 @@ static u8 ath9k_hw_chan_2_clockrate_mhz(struct ath_hw *ah)
>
> Âstatic int32_t ath9k_hw_ani_get_listen_time(struct ath_hw *ah)
> Â{
> - Â Â Â struct ar5416AniState *aniState;
> Â Â Â Âstruct ath_common *common = ath9k_hw_common(ah);
> - Â Â Â u32 txFrameCount, rxFrameCount, cycleCount;
> - Â Â Â int32_t listenTime;
> + Â Â Â int32_t listen_time;
> + Â Â Â int32_t clock_rate;
>
> - Â Â Â txFrameCount = REG_READ(ah, AR_TFCNT);
> - Â Â Â rxFrameCount = REG_READ(ah, AR_RFCNT);
> - Â Â Â cycleCount = REG_READ(ah, AR_CCCNT);
> + Â Â Â ath_hw_cycle_counters_lock(common);

Note the lock call here. This is what I'd like to see avoided. Can you
perhaps have the lock called within the core driver instead, that is,
add the lock call for the caller of ath9k_hw_ani_get_listen_time(). In
this case I see ath9k_hw_ani_get_listen_time() is static though and so
is its caller but ultimately we get to ath9k_hw_ani_monitor(). What
I'm saying is how about calling the
ath_hw_cycle_counters_lock(common); right before
ath9k_hw_ani_monitor().

> + Â Â Â ath_hw_cycle_counters_update(common);

  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