From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Correct gw_speed down bit mask
Date: Thu, 3 Jun 2010 00:58:35 +0200 [thread overview]
Message-ID: <1275519516-21394-2-git-send-email-sven.eckelmann@gmx.de> (raw)
In-Reply-To: <1275519516-21394-1-git-send-email-sven.eckelmann@gmx.de>
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 <wmeier@newsguy.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
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) {
--
1.7.1
next prev parent reply other threads:[~2010-06-02 22:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 22:58 [B.A.T.M.A.N.] [PATCH 1/3] batman: Correct gw_speed down bit mask Sven Eckelmann
2010-06-02 22:58 ` Sven Eckelmann [this message]
2010-06-05 17:57 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: " Simon Wunderlich
2010-06-02 22:58 ` [B.A.T.M.A.N.] [PATCH 3/3] batman-experimental: " Sven Eckelmann
2010-06-05 17:58 ` [B.A.T.M.A.N.] [PATCH 1/3] batman: " Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275519516-21394-2-git-send-email-sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=b.a.t.m.a.n@open-mesh.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).