Author: axel Date: 2010-06-08 19:53:36 +0200 (Tue, 08 Jun 2010) New Revision: 1693
Modified: trunk/batman-experimental/posix/tunnel.c Log: tunnel.c fix gw-speed bits, thanks to Sven Eckelmann 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.
Modified: trunk/batman-experimental/posix/tunnel.c =================================================================== --- trunk/batman-experimental/posix/tunnel.c 2010-06-08 17:46:46 UTC (rev 1692) +++ trunk/batman-experimental/posix/tunnel.c 2010-06-08 17:53:36 UTC (rev 1693) @@ -463,7 +463,8 @@ static void get_gw_speeds( unsigned char class, int *down, int *up ) {
char sbit = (class&0x80)>>7; - char dpart = (class&0x7C)>>3; +// char dpart = (class&0x7C)>>3; + char dpart = (class&0x78)>>3; char upart = (class&0x07);
*down= 32*(sbit+2)*(1<<dpart);