diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index aee252d65b8f..9e5a7206b0b4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -4371,8 +4371,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
4371 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { | 4371 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { |
4372 | request->flags = nla_get_u32( | 4372 | request->flags = nla_get_u32( |
4373 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); | 4373 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); |
4374 | if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && | 4374 | if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && |
4375 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { | 4375 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) || |
4376 | ((request->flags & NL80211_SCAN_FLAG_FLUSH) && | ||
4377 | !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) { | ||
4376 | err = -EOPNOTSUPP; | 4378 | err = -EOPNOTSUPP; |
4377 | goto out_free; | 4379 | goto out_free; |
4378 | } | 4380 | } |
@@ -4383,6 +4385,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
4383 | 4385 | ||
4384 | request->wdev = wdev; | 4386 | request->wdev = wdev; |
4385 | request->wiphy = &rdev->wiphy; | 4387 | request->wiphy = &rdev->wiphy; |
4388 | request->scan_start = jiffies; | ||
4386 | 4389 | ||
4387 | rdev->scan_req = request; | 4390 | rdev->scan_req = request; |
4388 | err = rdev->ops->scan(&rdev->wiphy, request); | 4391 | err = rdev->ops->scan(&rdev->wiphy, request); |
@@ -4612,8 +4615,10 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
4612 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { | 4615 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { |
4613 | request->flags = nla_get_u32( | 4616 | request->flags = nla_get_u32( |
4614 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); | 4617 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); |
4615 | if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && | 4618 | if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && |
4616 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { | 4619 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) || |
4620 | ((request->flags & NL80211_SCAN_FLAG_FLUSH) && | ||
4621 | !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) { | ||
4617 | err = -EOPNOTSUPP; | 4622 | err = -EOPNOTSUPP; |
4618 | goto out_free; | 4623 | goto out_free; |
4619 | } | 4624 | } |
@@ -4622,6 +4627,7 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
4622 | request->dev = dev; | 4627 | request->dev = dev; |
4623 | request->wiphy = &rdev->wiphy; | 4628 | request->wiphy = &rdev->wiphy; |
4624 | request->interval = interval; | 4629 | request->interval = interval; |
4630 | request->scan_start = jiffies; | ||
4625 | 4631 | ||
4626 | err = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); | 4632 | err = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); |
4627 | if (!err) { | 4633 | if (!err) { |