diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2016-11-17 09:02:40 +0000 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-12-13 16:04:56 +0100 |
commit | 5a88de5342f3090d8292132a392094034d85d101 (patch) | |
tree | 98e91ccf2424d27fa12dadbb2795e1c8487c0842 | |
parent | 543b921b475ad2e1897d5e7784437af238b33705 (diff) |
nl80211: check NL80211_ATTR_SCHED_SCAN_INTERVAL only once
The presence of the NL80211_ATTR_SCHED_SCAN_INTERVAL attribute was
checked in nl80211_parse_sched_scan() and
nl80211_parse_sched_scan_plans() which might be a bit redundant
so removing one.
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 3df85a751a85..db1a434f6169 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -6775,13 +6775,10 @@ nl80211_parse_sched_scan_plans(struct wiphy *wiphy, int n_plans, /* * If scan plans are not specified, - * %NL80211_ATTR_SCHED_SCAN_INTERVAL must be specified. In this + * %NL80211_ATTR_SCHED_SCAN_INTERVAL will be specified. In this * case one scan plan will be set with the specified scan * interval and infinite number of iterations. */ - if (!attrs[NL80211_ATTR_SCHED_SCAN_INTERVAL]) - return -EINVAL; - interval = nla_get_u32(attrs[NL80211_ATTR_SCHED_SCAN_INTERVAL]); if (!interval) return -EINVAL; |