From 6e33ca4529e7b4eae9a46db224282a116d112ffa Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 15 Jul 2008 20:05:50 +0300 Subject: [PATCH] Fixed wpa_scan_get_max_rate() to clear the basicrate flag when determining the highest rate. --- src/drivers/scan_helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drivers/scan_helpers.c b/src/drivers/scan_helpers.c index 1dfc2e4e2..bd774c1bd 100644 --- a/src/drivers/scan_helpers.c +++ b/src/drivers/scan_helpers.c @@ -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); for (i = 0; ie && i < ie[1]; i++) { - if (ie[i + 2] > rate) - rate = ie[i + 2]; + if ((ie[i + 2] & 0x7f) > rate) + rate = ie[i + 2] & 0x7f; } ie = wpa_scan_get_ie(res, WLAN_EID_EXT_SUPP_RATES); for (i = 0; ie && i < ie[1]; i++) { - if (ie[i + 2] > rate) - rate = ie[i + 2]; + if ((ie[i + 2] & 0x7f) > rate) + rate = ie[i + 2] & 0x7f; } return rate;