Author: simon
Date: 2010-06-05 19:58:38 +0200 (Sat, 05 Jun 2010)
New Revision: 1691
Modified:
trunk/batman/batman.c
Log:
batman: Correct gw_speed down bit mask
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(a)newsguy.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Modified: trunk/batman/batman.c
===================================================================
--- trunk/batman/batman.c 2010-06-05 17:57:18 UTC (rev 1690)
+++ trunk/batman/batman.c 2010-06-05 17:58:38 UTC (rev 1691)
@@ -482,7 +482,7 @@
void get_gw_speeds(unsigned char gw_class, int *down, int *up)
{
char sbit = (gw_class & 0x80) >> 7;
- char dpart = (gw_class & 0x7C) >> 3;
+ char dpart = (gw_class & 0x78) >> 3;
char upart = (gw_class & 0x07);
*down = 32 * (sbit + 2) * (1 << dpart);
Show replies by date