|
|
@@ -5342,10 +5342,8 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
|
|
|
if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) {
|
|
|
request->flags = nla_get_u32(
|
|
|
info->attrs[NL80211_ATTR_SCAN_FLAGS]);
|
|
|
- if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
|
|
- !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) ||
|
|
|
- ((request->flags & NL80211_SCAN_FLAG_FLUSH) &&
|
|
|
- !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) {
|
|
|
+ if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
|
|
+ !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) {
|
|
|
err = -EOPNOTSUPP;
|
|
|
goto out_free;
|
|
|
}
|
|
|
@@ -5585,10 +5583,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
|
|
|
if (info->attrs[NL80211_ATTR_SCAN_FLAGS]) {
|
|
|
request->flags = nla_get_u32(
|
|
|
info->attrs[NL80211_ATTR_SCAN_FLAGS]);
|
|
|
- if (((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
|
|
- !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) ||
|
|
|
- ((request->flags & NL80211_SCAN_FLAG_FLUSH) &&
|
|
|
- !(wiphy->features & NL80211_FEATURE_SCAN_FLUSH))) {
|
|
|
+ if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
|
|
+ !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) {
|
|
|
err = -EOPNOTSUPP;
|
|
|
goto out_free;
|
|
|
}
|