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
3364 * (not present if no beacon frame has been received yet)3364 * (not present if no beacon frame has been received yet)
3365 * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and3365 * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
3366 * @NL80211_BSS_TSF is known to be from a probe response (flag attribute)3366 * @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)
3367 * @__NL80211_BSS_AFTER_LAST: internal3370 * @__NL80211_BSS_AFTER_LAST: internal
3368 * @NL80211_BSS_MAX: highest BSS attribute3371 * @NL80211_BSS_MAX: highest BSS attribute
3369 */3372 */
@@ -3383,6 +3386,7 @@ enum nl80211_bss { · 13 unmodified lines
3383 NL80211_BSS_CHAN_WIDTH,3386 NL80211_BSS_CHAN_WIDTH,
3384 NL80211_BSS_BEACON_TSF,3387 NL80211_BSS_BEACON_TSF,
3385 NL80211_BSS_PRESP_DATA,3388 NL80211_BSS_PRESP_DATA,
3389 NL80211_BSS_LAST_SEEN_BOOTTIME,
3386 3390
3387 /* keep last */3391 /* keep last */
3388 __NL80211_BSS_AFTER_LAST,3392 __NL80211_BSS_AFTER_LAST,