[v2,next,3/3] batman-adv: fix misleading default throughput warning
Commit Message
BATADV_THROUGHPUT_DEFAULT_VALUE is expressed in multiples of 100kbps. Make
sure the warning text converts it 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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On Monday, February 01, 2016 14:34:34 Marek Lindner wrote:
> BATADV_THROUGHPUT_DEFAULT_VALUE is expressed in multiples of 100kbps. Make
> sure the warning text converts it 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 | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied in revision 41d1e61.
Regards,
Marek
@@ -129,9 +129,10 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
default_throughput:
if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) {
batadv_info(hard_iface->soft_iface,
- "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %d kbit/s. Consider overriding the throughput manually or checking your driver.\n",
+ "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %u.%1u Mbps. Consider overriding the throughput manually or checking your driver.\n",
hard_iface->net_dev->name,
- BATADV_THROUGHPUT_DEFAULT_VALUE / 10);
+ BATADV_THROUGHPUT_DEFAULT_VALUE / 10,
+ BATADV_THROUGHPUT_DEFAULT_VALUE % 10);
hard_iface->bat_v.flags |= BATADV_WARNING_DEFAULT;
}