wext: fix maxrate calculation
authorDan Williams <dcbw@redhat.com>
Tue, 15 Jul 2008 17:07:50 +0000 (20:07 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 15 Jul 2008 17:07:50 +0000 (20:07 +0300)
commit93ef879f0fedcaed519345b5181690e6d0993c57
treed06eaa136c68bfeb5b84babfc0e6f2af27942731
parent6e33ca4529e7b4eae9a46db224282a116d112ffa
wext: fix maxrate calculation

When scan results got moved from wpa_scan_result -> wpa_scan_res, the
'maxrate' member was dropped from wpa_scan_res.  The D-Bus interface
used 'maxrate', which was replaced with wpa_scan_get_max_rate().
Unfortunately, wpa_scan_get_max_rate() returns 802.11 rate values
directly from the IE, where 'maxrate' was the rate in bits/second.  The
supplicant internally fakes an IE for wpa_scan_res from the value of
wpa_scan_result->maxrate, but interprets ->maxrate as an 802.11 rate
index.

As a side-effect, this fixes a soft-break of the D-Bus control API since
the wpa_scan_res change was introduced.
src/drivers/driver_nl80211.c
src/drivers/driver_wext.c
wpa_supplicant/ctrl_iface_dbus_handlers.c