History

nl80211: add an attribute to allow delaying the first scheduled scan cycle

The userspace may want to delay the the first scheduled scan or net-detect cycle. Add an optional attribute to the scheduled scan configuration to pass the delay to be (optionally) used by the driver.

Luciano Coelho committed 11 years ago

Commit 9c748931 parent db82d8a3 files · +24 −6Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+14−6
@@ -324,7 +324,9 @@ · 323 unmodified lines
324324 * if passed, define which channels should be scanned; if not
325325 * passed, all channels allowed for the current regulatory domain
326326 * are used. Extra IEs can also be passed from the userspace by
327− * using the %NL80211_ATTR_IE attribute.
327+ * using the %NL80211_ATTR_IE attribute. The first cycle of the
328+ * scheduled scan can be delayed by %NL80211_ATTR_SCHED_SCAN_DELAY
329+ * is supplied.
328330 * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
329331 * scheduled scan is not running. The caller may assume that as soon
330332 * as the call returns, it is safe to start a new scheduled scan again.
@@ -1735,6 +1737,9 @@ enum nl80211_commands { · 1404 unmodified lines
17351737 * should be contained in the result as the sum of the respective counters
17361738 * over all channels.
17371739 *
1740+ * @NL80211_ATTR_SCHED_SCAN_DELAY: delay before a scheduled scan (or a
1741+ * WoWLAN net-detect scan) is started, u32 in seconds.
1742+ *
17381743 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
17391744 * @NL80211_ATTR_MAX: highest attribute number currently defined
17401745 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2100,6 +2105,8 @@ enum nl80211_attrs { · 359 unmodified lines
21002105
21012106 NL80211_ATTR_NETNS_FD,
21022107
2108+ NL80211_ATTR_SCHED_SCAN_DELAY,
2109+
21032110 /* add attributes here, update the policy in nl80211.c */
21042111
21052112 __NL80211_ATTR_AFTER_LAST,
@@ -3743,11 +3750,12 @@ struct nl80211_pattern_support { · 1637 unmodified lines
37433750 * @NL80211_WOWLAN_TRIG_NET_DETECT: wake up when a configured network
37443751 * is detected. This is a nested attribute that contains the
37453752 * same attributes used with @NL80211_CMD_START_SCHED_SCAN. It
3746− * specifies how the scan is performed (e.g. the interval and the
3747− * channels to scan) as well as the scan results that will
3748− * trigger a wake (i.e. the matchsets). This attribute is also
3749− * sent in a response to @NL80211_CMD_GET_WIPHY, indicating the
3750− * number of match sets supported by the driver (u32).
3753+ * specifies how the scan is performed (e.g. the interval, the
3754+ * channels to scan and the initial delay) as well as the scan
3755+ * results that will trigger a wake (i.e. the matchsets). This
3756+ * attribute is also sent in a response to
3757+ * @NL80211_CMD_GET_WIPHY, indicating the number of match sets
3758+ * supported by the driver (u32).
37513759 * @NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS: nested attribute
37523760 * containing an array with information about what triggered the
37533761 * wake up. If no elements are present in the array, it means