Fixed wpa_scan_get_max_rate() to clear the basicrate flag when determining

the highest rate.
This commit is contained in:
Jouni Malinen 2008-07-15 20:05:50 +03:00
parent 886a807fb5
commit 6e33ca4529

View file

@ -67,14 +67,14 @@ int wpa_scan_get_max_rate(const struct wpa_scan_res *res)
ie = wpa_scan_get_ie(res, WLAN_EID_SUPP_RATES); ie = wpa_scan_get_ie(res, WLAN_EID_SUPP_RATES);
for (i = 0; ie && i < ie[1]; i++) { for (i = 0; ie && i < ie[1]; i++) {
if (ie[i + 2] > rate) if ((ie[i + 2] & 0x7f) > rate)
rate = ie[i + 2]; rate = ie[i + 2] & 0x7f;
} }
ie = wpa_scan_get_ie(res, WLAN_EID_EXT_SUPP_RATES); ie = wpa_scan_get_ie(res, WLAN_EID_EXT_SUPP_RATES);
for (i = 0; ie && i < ie[1]; i++) { for (i = 0; ie && i < ie[1]; i++) {
if (ie[i + 2] > rate) if ((ie[i + 2] & 0x7f) > rate)
rate = ie[i + 2]; rate = ie[i + 2] & 0x7f;
} }
return rate; return rate;