From: Matthew Wang Date: Thu, 23 Jan 2020 22:18:17 +0000 (-0800) Subject: scan_est_throughput: Use ie_len instead of res->ie_len X-Git-Tag: hostap_2_10~1885 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee28410de6b5b5a609c656c09a434ddc48e8b91;p=thirdparty%2Fhostap.git scan_est_throughput: Use ie_len instead of res->ie_len Local variable should be used. This fixes an issue where IEs are available only from a Beacon frame. Fixes: ad06ac0b0 ("Move throughput estimation into a helper function") Signed-off-by: Matthew Wang --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index c91517a45..17636e3b6 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2347,7 +2347,7 @@ void scan_est_throughput(struct wpa_supplicant *wpa_s, if (!ie_len) ie_len = res->beacon_ie_len; res->est_throughput = - wpas_get_est_tpt(wpa_s, ies, res->ie_len, rate, snr); + wpas_get_est_tpt(wpa_s, ies, ie_len, rate, snr); /* TODO: channel utilization and AP load (e.g., from AP Beacon) */ }