Re: [PATCH 19/29] batman-adv: fix random jitter calculation

2012-12-25 Thread Akinobu Mita
2012/12/25 Antonio Quartulli : > On Mon, Dec 24, 2012 at 11:14:06AM +0900, Akinobu Mita wrote: >> batadv_iv_ogm_emit_send_time() attempts to calculates a random integer >> in the range of 'orig_interval +- BATADV_JITTER' by the below lines. >> >> msecs = atomic_read(&bat_priv->orig_interval

Re: [PATCH 19/29] batman-adv: fix random jitter calculation

2012-12-25 Thread David Miller
From: Akinobu Mita Date: Wed, 26 Dec 2012 06:35:37 +0900 > 2012/12/25 Antonio Quartulli : >> On Mon, Dec 24, 2012 at 11:14:06AM +0900, Akinobu Mita wrote: >>> batadv_iv_ogm_emit_send_time() attempts to calculates a random integer >>> in the range of 'orig_interval +- BATADV_JITTER' by the below l

Re: [PATCH 19/29] batman-adv: fix random jitter calculation

2012-12-25 Thread Antonio Quartulli
On Mon, Dec 24, 2012 at 11:14:06AM +0900, Akinobu Mita wrote: > batadv_iv_ogm_emit_send_time() attempts to calculates a random integer > in the range of 'orig_interval +- BATADV_JITTER' by the below lines. > > msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; > msecs +

[PATCH 19/29] batman-adv: fix random jitter calculation

2012-12-23 Thread Akinobu Mita
batadv_iv_ogm_emit_send_time() attempts to calculates a random integer in the range of 'orig_interval +- BATADV_JITTER' by the below lines. msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; msecs += (random32() % 2 * BATADV_JITTER); But it actually gets 'orig_interval