[PATCH 01/10] batman-adv: Replace gw_reselect divisor with simple shift

2015-08-14 Thread Antonio Quartulli
From: Sven Eckelmann 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

[PATCH 01/10] batman-adv: Replace gw_reselect divisor with simple shift

2015-08-11 Thread Antonio Quartulli
From: Sven Eckelmann 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