History

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.)

Dmitry Shmidt committed 11 years ago

Commit 6e19bc41 parent 93f04907 files · +130 −60Browse files

Showing the changes to include/uapi (1 of 7 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+4−0
@@ -3364,6 +3364,9 @@ enum nl80211_bss_scan_width { · 3363 unmodified lines
33643364 * (not present if no beacon frame has been received yet)
33653365 * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
33663366 * @NL80211_BSS_TSF is known to be from a probe response (flag attribute)
3367+ * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry
3368+ * was last updated by a received frame. The value is expected to be
3369+ * accurate to about 10ms. (u64, nanoseconds)
33673370 * @__NL80211_BSS_AFTER_LAST: internal
33683371 * @NL80211_BSS_MAX: highest BSS attribute
33693372 */
@@ -3383,6 +3386,7 @@ enum nl80211_bss { · 13 unmodified lines
33833386 NL80211_BSS_CHAN_WIDTH,
33843387 NL80211_BSS_BEACON_TSF,
33853388 NL80211_BSS_PRESP_DATA,
3389+ NL80211_BSS_LAST_SEEN_BOOTTIME,
33863390
33873391 /* keep last */
33883392 __NL80211_BSS_AFTER_LAST,