Commit 1a84ff75 authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville
Browse files

cfg80211: return -ENOENT when stopping sched_scan while not running



If we try to stop a scheduled scan while it is not running, we should
return -ENOENT instead of simply ignoring the command and returning
success.  This is more consistent with other parts of the code.
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 331c5ea2
...@@ -247,7 +247,8 @@ ...@@ -247,7 +247,8 @@
* passed, all channels allowed for the current regulatory domain * passed, all channels allowed for the current regulatory domain
* are used. Extra IEs can also be passed from the userspace by * are used. Extra IEs can also be passed from the userspace by
* using the %NL80211_ATTR_IE attribute. * using the %NL80211_ATTR_IE attribute.
* @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT
* if scheduled scan is not running.
* @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
* results available. * results available.
* @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
......
...@@ -137,7 +137,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev, ...@@ -137,7 +137,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
ASSERT_RDEV_LOCK(rdev); ASSERT_RDEV_LOCK(rdev);
if (!rdev->sched_scan_req) if (!rdev->sched_scan_req)
return 0; return -ENOENT;
dev = rdev->sched_scan_req->dev; dev = rdev->sched_scan_req->dev;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment