From patchwork Mon Feb 1 06:34:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 5019 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 9EC2381CC2 for ; Mon, 1 Feb 2016 07:34:54 +0100 (CET) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 1 Feb 2016 14:34:33 +0800 Message-Id: <1454308474-23211-2-git-send-email-mareklindner@neomailbox.ch> In-Reply-To: <1454308474-23211-1-git-send-email-mareklindner@neomailbox.ch> References: <1454308474-23211-1-git-send-email-mareklindner@neomailbox.ch> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCHv2 next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps 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: Mon, 01 Feb 2016 06:34:54 -0000 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 --- 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 */