diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2015-01-16 09:04:09 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-23 04:30:47 -0500 |
commit | 9c74893441d3cf4b258a82b19cbf6bfd2ed6e549 (patch) | |
tree | 4e2d61d97961013e4a8db0be6c5386b43f123476 /net/wireless | |
parent | db82d8a966ded064bd4cf0e1fcca13442f50d0ae (diff) |
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.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
[add the attribute to the policy to validate it]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c64100ec79e3..4542e8683beb 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -398,6 +398,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { | |||
398 | [NL80211_ATTR_MAC_MASK] = { .len = ETH_ALEN }, | 398 | [NL80211_ATTR_MAC_MASK] = { .len = ETH_ALEN }, |
399 | [NL80211_ATTR_WIPHY_SELF_MANAGED_REG] = { .type = NLA_FLAG }, | 399 | [NL80211_ATTR_WIPHY_SELF_MANAGED_REG] = { .type = NLA_FLAG }, |
400 | [NL80211_ATTR_NETNS_FD] = { .type = NLA_U32 }, | 400 | [NL80211_ATTR_NETNS_FD] = { .type = NLA_U32 }, |
401 | [NL80211_ATTR_SCHED_SCAN_DELAY] = { .type = NLA_U32 }, | ||
401 | }; | 402 | }; |
402 | 403 | ||
403 | /* policy for the key attributes */ | 404 | /* policy for the key attributes */ |
@@ -6205,6 +6206,10 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
6205 | } | 6206 | } |
6206 | } | 6207 | } |
6207 | 6208 | ||
6209 | if (attrs[NL80211_ATTR_SCHED_SCAN_DELAY]) | ||
6210 | request->delay = | ||
6211 | nla_get_u32(attrs[NL80211_ATTR_SCHED_SCAN_DELAY]); | ||
6212 | |||
6208 | request->interval = interval; | 6213 | request->interval = interval; |
6209 | request->scan_start = jiffies; | 6214 | request->scan_start = jiffies; |
6210 | 6215 | ||