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, Jun 25, 2008 at 7:12 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> 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 ;)
>
Welcome to the Desert of the Real

>> > +                   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?

This is simplest as you can get under assumption that times are not
apart more then 1/2 of UL.
 It would be overkill to translate it to timeval or anything we have
diff function for.

> 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?

It would make a very recent beacon to be like half an hour old on
wraps, wouldn't it?
But I'm good also with the old version as well. Just ACK one

Tomas
--
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