Author: cgutman
Date: Mon Jan 9 20:19:33 2012
New Revision: 54890
URL:
http://svn.reactos.org/svn/reactos?rev=54890&view=rev
Log:
[WLANCONF]
- Display fractional rates correctly (5.5 Mbps for example)
Modified:
branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c
Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c
URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/base/applications/…
==============================================================================
--- branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1]
(original)
+++ branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] Mon
Jan 9 20:19:33 2012
@@ -514,9 +514,16 @@
Rate = Rate & 0x7F;
/* SupportedRates are in units of .5 */
- Rate = Rate >> 1;
-
- _tprintf(_T("%u "), Rate);
+ if (Rate & 0x01)
+ {
+ /* Bit 0 is set so we need to add 0.5 */
+ _tprintf(_T("%u.5 "), (Rate >> 1));
+ }
+ else
+ {
+ /* Bit 0 is clear so just print the conversion */
+ _tprintf(_T("%u "), (Rate >> 1));
+ }
}
}
_tprintf(_T("\n"));