Re: Wireless IBSS on Linux-2.6.34 broken by commit3bbb9ec946428b96657126768f65487a48dd090c
From: Jeff Chua
Date: Sun May 23 2010 - 19:16:33 EST
Mon, May 24, 2010 at 5:25 AM, Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
wrote:
can you try, instead do the following, in the apply_slack() function:
just before the return expires_limit; do
if (expires_limit< expires)
# # #expires_limit = expires;
This doesn't work.
if that does not fix it, a second thought:
add, after the first if (timer->slack< 0)
if (timer->slack< 0&& expires< jiffies)
# # # #expires_limit = expires;
This works.
hmm ok so the wireless stack sets a timer way back in the past
ok that's technically legal.
how about
expires_limit = expires;
if (timer->slack > -1)
expires_limit = expires + timer->slack;
else if (time_after(expires, jiffies))
expires_limit = expires + (expires - jiffies)/256;
can you test such a thing and send a patch?
(it has my Acked-By: either way)
Arjan,
Tested and working. Here's the patch. Thanks for the fix!
Jeff
--- a/kernel/timer.c.org 2010-05-24 07:09:04.000000000 +0800
+++ a/kernel/timer.c 2010-05-24 07:05:22.000000000 +0800
@@ -750,9 +750,11 @@
unsigned long expires_limit, mask;
int bit;
- expires_limit = expires + timer->slack;
+ expires_limit = expires;
- if (timer->slack < 0) /* auto slack: use 0.4% */
+ if (timer->slack > -1)
+ expires_limit = expires + timer->slack;
+ else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
expires_limit = expires + (expires - jiffies)/256;
mask = expires ^ expires_limit;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/