diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index aff959e5a1b3..9dca0925a1a9 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -357,8 +357,6 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv) | |||
357 | rdev->wiphy.rts_threshold = (u32) -1; | 357 | rdev->wiphy.rts_threshold = (u32) -1; |
358 | rdev->wiphy.coverage_class = 0; | 358 | rdev->wiphy.coverage_class = 0; |
359 | 359 | ||
360 | rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH; | ||
361 | |||
362 | return &rdev->wiphy; | 360 | return &rdev->wiphy; |
363 | } | 361 | } |
364 | EXPORT_SYMBOL(wiphy_new); | 362 | EXPORT_SYMBOL(wiphy_new); |
@@ -566,6 +564,8 @@ int wiphy_register(struct wiphy *wiphy) | |||
566 | /* check and set up bitrates */ | 564 | /* check and set up bitrates */ |
567 | ieee80211_set_bitrate_flags(wiphy); | 565 | ieee80211_set_bitrate_flags(wiphy); |
568 | 566 | ||
567 | rdev->wiphy.features |= NL80211_FEATURE_SCAN_FLUSH; | ||
568 | |||
569 | rtnl_lock(); | 569 | rtnl_lock(); |
570 | res = device_add(&rdev->wiphy.dev); | 570 | res = device_add(&rdev->wiphy.dev); |
571 | if (res) { | 571 | if (res) { |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e2bb4276af1a..1ad11de6dd2f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5342,10 +5342,8 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
5342 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { | 5342 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { |
5343 | request->flags = nla_get_u32( | 5343 | request->flags = nla_get_u32( |
5344 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); | 5344 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); |
5345 | if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && | 5345 | if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && |
5346 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) || | 5346 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { |
5347 | ((request->flags & NL80211_SCAN_FLAG_FLUSH) && | ||
5348 | !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) { | ||
5349 | err = -EOPNOTSUPP; | 5347 | err = -EOPNOTSUPP; |
5350 | goto out_free; | 5348 | goto out_free; |
5351 | } | 5349 | } |
@@ -5585,10 +5583,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
5585 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { | 5583 | if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) { |
5586 | request->flags = nla_get_u32( | 5584 | request->flags = nla_get_u32( |
5587 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); | 5585 | info->attrs[NL80211_ATTR_SCAN_FLAGS]); |
5588 | if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && | 5586 | if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && |
5589 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) || | 5587 | !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { |
5590 | ((request->flags & NL80211_SCAN_FLAG_FLUSH) && | ||
5591 | !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) { | ||
5592 | err = -EOPNOTSUPP; | 5588 | err = -EOPNOTSUPP; |
5593 | goto out_free; | 5589 | goto out_free; |
5594 | } | 5590 | } |