OSDN Git Service

Use new netlink attribute for scan result timestamp
authorNingyuan Wang <nywang@google.com>
Fri, 9 Jun 2017 16:41:21 +0000 (09:41 -0700)
committerNingyuan Wang <nywang@google.com>
Thu, 15 Jun 2017 16:17:57 +0000 (09:17 -0700)
commit74db77ecd5314fa28ac2b78ccc3ca18788eeef60
tree6461c068759a6fae9c8c7d3bf050dc6e9660fb2a
parent7124c9f3f02ec08034434b7e143292ab888b7c76
Use new netlink attribute for scan result timestamp

This CL prioritize the new netlink attribute
NL80211_BSS_LAST_SEEN_BOOTTIME to the old NL80211_BSS_TSF
because if driver supports the new attribute, the new
attribute will carry more accurate data. If not, we still
can fall back to NL80211_BSS_TSF.

Bug: 37758502
Test: compile, unit tests, integration test
Test: manual tests:
1. Test devices which have new kernel/driver supporting this attribute.
Test that most APs still consistantly show up in scan result.
1. Test devices which don't support this attribute. Insert logs to test
that wificond can fall back to the old attributes.

Change-Id: I14226b77e8bf50f4e035679fff3313affb800e86
scanning/scan_utils.cpp
scanning/scan_utils.h
tests/scan_utils_unittest.cpp