]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
scan_est_throughput: Use ie_len instead of res->ie_len
authorMatthew Wang <matthewmwang@chromium.org>
Thu, 23 Jan 2020 22:18:17 +0000 (14:18 -0800)
committerJouni Malinen <jouni@codeaurora.org>
Sun, 2 Feb 2020 19:55:42 +0000 (21:55 +0200)
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 <matthewmwang@chromium.org>
wpa_supplicant/scan.c

index c91517a454ac0b591977ae46fc5f897a30feaeab..17636e3b69de786148ddb1ea3bf1a74aab7d7f76 100644 (file)
@@ -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) */
 }