The expected throughout returned by the cfg80211 API is expressed in kbps while internally batman-adv stores multiples of 100kbps. Ensure the conversion is performed properly.
Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch --- net/batman-adv/bat_v_elp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 46c6a00..461a765 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -100,7 +100,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) return 0; } if (!ret) - return sinfo.expected_throughput / 10; + return sinfo.expected_throughput / 100; }
/* unsupported WiFi driver version */