History

nl80211: allow multiple active scheduled scan requests

This patch implements the idea to have multiple scheduled scan requests running concurrently. It mainly illustrates how to deal with the incoming request from user-space in terms of backward compatibility. In order to use multiple scheduled scans user-space needs to provide a flag attribute NL80211_ATTR_SCHED_SCAN_MULTI to indicate support. If not the request is treated as a legacy scan. Drivers currently supporting scheduled scan are now indicating they support a single scheduled scan request. This obsoletes WIPHY_FLAG_SUPPORTS_SCHED_SCAN.

Arend Van Spriel committed 9 years ago

Commit ca986ad1 parent ab8100713 files · +205 −64Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+11−1
@@ -387,7 +387,9 @@ · 386 unmodified lines
387387 * are used. Extra IEs can also be passed from the userspace by
388388 * using the %NL80211_ATTR_IE attribute. The first cycle of the
389389 * scheduled scan can be delayed by %NL80211_ATTR_SCHED_SCAN_DELAY
390− * is supplied.
390+ * is supplied. If the device supports multiple concurrent scheduled
391+ * scans, it will allow such when the caller provides the flag attribute
392+ * %NL80211_ATTR_SCHED_SCAN_MULTI to indicate user-space support for it.
391393 * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
392394 * scheduled scan is not running. The caller may assume that as soon
393395 * as the call returns, it is safe to start a new scheduled scan again.
@@ -2081,6 +2083,11 @@ enum nl80211_commands { · 1687 unmodified lines
20812083 * @NL80211_ATTR_PMK: PMK for the PMKSA identified by %NL80211_ATTR_PMKID.
20822084 * This is used with @NL80211_CMD_SET_PMKSA.
20832085 *
2086+ * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to
2087+ * indicate that it supports multiple active scheduled scan requests.
2088+ * @NL80211_ATTR_SCHED_SCAN_MAX_REQS: indicates maximum number of scheduled
2089+ * scan request that may be active for the device (u32).
2090+ *
20842091 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
20852092 * @NL80211_ATTR_MAX: highest attribute number currently defined
20862093 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2500,6 +2507,9 @@ enum nl80211_attrs { · 413 unmodified lines
25002507
25012508 NL80211_ATTR_PMK,
25022509
2510+ NL80211_ATTR_SCHED_SCAN_MULTI,
2511+ NL80211_ATTR_SCHED_SCAN_MAX_REQS,
2512+
25032513 /* add attributes here, update the policy in nl80211.c */
25042514
25052515 __NL80211_ATTR_AFTER_LAST,