On 22/06/15 09:13, Sven Eckelmann wrote:
- gw_divisor = BATADV_TQ_LOCAL_WINDOW_SIZE * BATADV_TQ_LOCAL_WINDOW_SIZE;
- gw_divisor *= 64;
Marek can you comment on why this constant was used in this computation? To me it looks like we only needed a "good enough number" and not a real reference to the local window size.
The remaining change looks good to me.
If you merge this patch I'll then squash it with the uint64_t change that we already have and I will re-send the pull request to David.
Thanks,
- rcu_read_lock(); hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) { if (gw_node->deleted)
@@ -167,7 +163,7 @@ batadv_gw_get_best_gw_node(struct batadv_priv *bat_priv) tmp_gw_factor = tq_avg * tq_avg; tmp_gw_factor *= gw_node->bandwidth_down; tmp_gw_factor *= 100 * 100;
tmp_gw_factor /= gw_divisor;
tmp_gw_factor >>= 18; if ((tmp_gw_factor > max_gw_factor) || ((tmp_gw_factor == max_gw_factor) &&