diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index af38cb159..777b09745 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1237,7 +1237,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; } diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c index 4c5ff7b6b..a7f4ead5d 100644 --- a/src/drivers/driver_wext.c +++ b/src/drivers/driver_wext.c @@ -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; } diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.c b/wpa_supplicant/ctrl_iface_dbus_handlers.c index 6bf399311..62751adfc 100644 --- a/wpa_supplicant/ctrl_iface_dbus_handlers.c +++ b/wpa_supplicant/ctrl_iface_dbus_handlers.c @@ -435,7 +435,7 @@ DBusMessage * wpas_dbus_bssid_properties(DBusMessage *message, if (!wpa_dbus_dict_append_int32(&iter_dict, "level", res->level)) goto error; if (!wpa_dbus_dict_append_int32(&iter_dict, "maxrate", - wpa_scan_get_max_rate(res))) + wpa_scan_get_max_rate(res) * 500000)) goto error; if (!wpa_dbus_dict_close_write(&iter, &iter_dict))