Sven Eckelmann e071d93eb4 batman-adv: Replace gw_reselect divisor with simple shift
The gw_factor is divided by BATADV_TQ_LOCAL_WINDOW_SIZE ** 2 * 64. But the
rest of the calculation has nothing to do with the tq window size and
therefore the calculation is just (tmp_gw_factor / (64 ** 3)).

Replace it with a simple shift to avoid a costly 64-bit divide when the
max_gw_factor is changed from u32 to u64. This type change is necessary
to avoid an overflow bug.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
2015-08-11 18:10:04 +02:00
..
2015-07-23 13:07:04 -07:00
2015-03-02 16:43:41 -05:00
2015-03-06 21:50:02 -05:00
2015-08-10 14:25:02 -07:00
2015-07-28 09:37:44 -07:00
2015-07-21 00:28:36 -07:00