Search Linux Wireless

Re: [PATCH 3/4 V2] mac80211: add last beacon time in scan list

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

 



On Wed, 2008-06-25 at 11:58 -0400, Pavel Roskin wrote:

> > +			unsigned long mid_range = (-1) / 2 + 1;
> 
> What is that?  I guess that's where Riemann's zeta function has its
> non-trivial roots :-)

The Pavel hypothesis: "The Riemann hypothesis is correct when calculated
in 32-bit integers" is obviously wrong ;)

> > +			time_diff = jiffies - bss->last_update > mid_range ?
> > +				jiffies - bss->last_update :
> > +				bss->last_update - jiffies;
> 
> That's pretty hairy.  Do we really lack a function to calculate time
> difference?

Actually, come to think of it, isn't just doing the difference as in teh
original patch correct in 32-bit unsigned integers? It'll wrap around a
bit but that's ok, no?

johannes

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