linux/net/batman-adv
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
..
bat_algo.h batman-adv: update copyright years for 2015 2015-05-29 10:13:35 +02:00
bat_iv_ogm.c batman-adv: Clarify calculation precedence for '&' and '?' 2015-06-07 17:07:19 +02:00
bitarray.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
bitarray.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
bridge_loop_avoidance.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
bridge_loop_avoidance.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
debugfs.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
debugfs.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
distributed-arp-table.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
distributed-arp-table.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
fragmentation.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
fragmentation.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
gateway_client.c batman-adv: Replace gw_reselect divisor with simple shift 2015-08-11 18:10:04 +02:00
gateway_client.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
gateway_common.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
gateway_common.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
hard-interface.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
hard-interface.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
hash.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
hash.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
icmp_socket.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
icmp_socket.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
Kconfig batman-adv: Kconfig, Add missing DEBUG_FS dependency 2015-01-07 22:17:11 +01:00
main.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
main.h batman-adv: Clarify calculation precedence for '&' and '?' 2015-06-07 17:07:19 +02:00
Makefile batman-adv: Makefile, Sort alphabetically 2015-05-29 10:13:36 +02:00
multicast.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
multicast.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
network-coding.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
network-coding.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
originator.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
originator.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
packet.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
routing.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
routing.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
send.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
send.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
soft-interface.c batman-adv: change the MAC of each VLAN upon ndo_set_mac_address 2015-06-07 17:07:20 +02:00
soft-interface.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
sysfs.c batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
sysfs.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
translation-table.c batman-adv: Clarify calculation precedence for '&' and '?' 2015-06-07 17:07:19 +02:00
translation-table.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
types.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00