From patchwork Sun Jan 31 16:21:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 5049 Return-Path: Received-SPF: Softfail (domain owner discourages use of this host) identity=mailfrom; client-ip=5.148.176.60; helo=s2.neomailbox.net; envelope-from=mareklindner@neomailbox.ch; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=neomailbox.ch Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by open-mesh.org (Postfix) with ESMTPS id E7BF381CC8 for ; Sun, 31 Jan 2016 17:21:52 +0100 (CET) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 1 Feb 2016 00:21:20 +0800 Message-Id: <1454257280-19649-3-git-send-email-mareklindner@neomailbox.ch> In-Reply-To: <1454257280-19649-1-git-send-email-mareklindner@neomailbox.ch> References: <1454257280-19649-1-git-send-email-mareklindner@neomailbox.ch> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 16:21:53 -0000 The default throughput value represents Mbps and not kbps. Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput") Signed-off-by: Marek Lindner Acked-by: Antonio Quartulli --- net/batman-adv/bat_v_elp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 461a765..2a6a9a2 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -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; }