wext: fix maxrate calculation
[libeap.git] / src / drivers / driver_wext.c
index 4c5ff7b..a7f4ead 100644 (file)
@@ -1364,7 +1364,11 @@ static void wext_get_scan_rate(struct iw_event *iwe,
                clen -= sizeof(struct iw_param);
                custom += sizeof(struct iw_param);
        }
-       res->maxrate = maxrate;
+
+       /* Convert the maxrate from WE-style (b/s units) to
+        * 802.11 rates (500000 b/s units).
+        */
+       res->maxrate = maxrate / 500000;
 }