From patchwork Wed Jun 2 22:58:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 190 Return-Path: Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (Postfix) with SMTP id 62B01154361 for ; Thu, 3 Jun 2010 00:58:48 +0200 (CEST) Received: (qmail invoked by alias); 02 Jun 2010 22:58:47 -0000 Received: from i58829CC7.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [88.130.156.199] by mail.gmx.net (mp019) with SMTP; 03 Jun 2010 00:58:47 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX18BowUQcrEBY+tUKxbM5HXnZu5xWUIQ1FFrjIkz5L FYmJFc6meMoaGX From: Sven Eckelmann To: b.a.t.m.a.n@open-mesh.net Date: Thu, 3 Jun 2010 00:58:35 +0200 Message-Id: <1275519516-21394-2-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275519516-21394-1-git-send-email-sven.eckelmann@gmx.de> References: <1275519516-21394-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Correct gw_speed down bit mask X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking 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: Wed, 02 Jun 2010 22:58:48 -0000 We want to get bits .OOOO... and not as the mask would suggest .OOOOO.. when we decode the encoded bits for the download part of the gateway speed. Reported-By: Bill Meier Signed-off-by: Sven Eckelmann --- batman-adv-kernelland/gateway_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/batman-adv-kernelland/gateway_common.c b/batman-adv-kernelland/gateway_common.c index d542306..270cf3d 100644 --- a/batman-adv-kernelland/gateway_common.c +++ b/batman-adv-kernelland/gateway_common.c @@ -63,7 +63,7 @@ static void kbit_to_gw_srv_class(int down, int up, long *gw_srv_class) void gw_srv_class_to_kbit(uint8_t gw_srv_class, int *down, int *up) { char sbit = (gw_srv_class & 0x80) >> 7; - char dpart = (gw_srv_class & 0x7C) >> 3; + char dpart = (gw_srv_class & 0x78) >> 3; char upart = (gw_srv_class & 0x07); if (!gw_srv_class) {