aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2017-06-08 08:17:56 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-08 13:06:38 (GMT)
commit23eead4d74849633dd5fd425abec7837a6cb5260 (patch)
treeaeb40a3a3e2c5b71683f0eedec6dfd1967016576 /wpa_supplicant
parent3f8e3a5486a9fa5e0d37021c47f8f673d32867c8 (diff)
downloadhostap-23eead4d74849633dd5fd425abec7837a6cb5260.zip
hostap-23eead4d74849633dd5fd425abec7837a6cb5260.tar.gz
hostap-23eead4d74849633dd5fd425abec7837a6cb5260.tar.bz2
RRM: Filter scan results by parent TSF only if driver supports it
Scan results with parent TSF older than the scan start TSF are not added to the beacon report since they are considered as scan results from previous scans. However, for drivers that report the scan start TSF but not the parent TSF of each scan result, the parent TSF will be zero so valid scan results will be dropped. Fix this by filtering scan results by the parent TSF only if the driver supports reporting the parent TSF for each scan result. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/rrm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
index 18d4907..6b297d0 100644
--- a/wpa_supplicant/rrm.c
+++ b/wpa_supplicant/rrm.c
@@ -1376,6 +1376,10 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
continue;
}
+ /*
+ * Don't report results that were not received during the
+ * current measurement.
+ */
if (!(wpa_s->drv_rrm_flags &
WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT)) {
struct os_reltime update_time, diff;
@@ -1402,14 +1406,10 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
(unsigned int) diff.usec);
continue;
}
- }
-
- /*
- * Don't report results that were not received during the
- * current measurement.
- */
- if (info->scan_start_tsf > scan_res->res[i]->parent_tsf)
+ } else if (info->scan_start_tsf >
+ scan_res->res[i]->parent_tsf) {
continue;
+ }
if (wpas_add_beacon_rep(wpa_s, &buf, bss, info->scan_start_tsf,
scan_res->res[i]->parent_tsf) < 0)