Search Linux Wireless

Re: [ath5k-devel] [PATCH 4/5] ath5k: Reimplement clock rate to usec conversion

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

 



On 21.12.2009 11:41 海藻敬之 wrote:
>  In ath5k_hw_write_ofdm_timings(),  comment says
>       "ALGO: coef = (5 * clock * carrier_freq) / 2) ",
>  but current code is
>       "coef_scaled = ((5 * (clock << 24)) / 2) / channel->center_freq;"
>
>  Did they match each other ?
>  I am wondering the the comment is wrong, but I am not sure that either
> is wrong.
Good point, it seems the comment is wrong. The calculation would overflow 
32-bit integer if there was a multiplication instead of a division.

Lukas Turek

Attachment: signature.asc
Description: This is a digitally signed message part.


[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