nl80211: allow BSS data to include CLOCK_BOOTTIME timestamp
For location and connectivity services, userspace would often like to know the time when the BSS was last seen. The current "last seen" value is calculated in a way that makes it less useful, especially if the system suspended in the meantime. Add the ability for the driver to report a real CLOCK_BOOTTIME stamp that can then be reported to userspace (if present). Drivers wishing to use this must be converted to the new API to call cfg80211_inform_bss_data() or cfg80211_inform_bss_frame_data(). They need to ensure the reported value is accurate enough even when the frame might have been buffered in the device (e.g. firmware.) Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> [modified to use struct, inlines] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
93f0490e5d
commit
6e19bc4b70
@@ -3364,6 +3364,9 @@ enum nl80211_bss_scan_width {
|
||||
* (not present if no beacon frame has been received yet)
|
||||
* @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
|
||||
* @NL80211_BSS_TSF is known to be from a probe response (flag attribute)
|
||||
* @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry
|
||||
* was last updated by a received frame. The value is expected to be
|
||||
* accurate to about 10ms. (u64, nanoseconds)
|
||||
* @__NL80211_BSS_AFTER_LAST: internal
|
||||
* @NL80211_BSS_MAX: highest BSS attribute
|
||||
*/
|
||||
@@ -3383,6 +3386,7 @@ enum nl80211_bss {
|
||||
NL80211_BSS_CHAN_WIDTH,
|
||||
NL80211_BSS_BEACON_TSF,
|
||||
NL80211_BSS_PRESP_DATA,
|
||||
NL80211_BSS_LAST_SEEN_BOOTTIME,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_BSS_AFTER_LAST,
|
||||
|
Reference in New Issue
Block a user