summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-29 12:47:03 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-06-29 13:39:17 +0200
commit4f03c1ed8901a01ad4abcef95c02c007a2d481c2 (patch)
tree7b0dbbf9413cb0aa314bf8cdd1c17684261b7659 /net/wireless
parent870d37fc22f3e40f9f23e06c581c8538fc16a2f0 (diff)
downloadlinux-4f03c1ed8901a01ad4abcef95c02c007a2d481c2.tar.bz2
cfg80211: refuse to .set_monitor_channel when non-monitors are present
Having .set_monitor_channel work with non-monitor interfaces running would make interface combinations accounting ambiguous. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/chan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 167e7cb60089..019401b0b5e3 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -85,6 +85,8 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
if (!rdev->ops->set_monitor_channel)
return -EOPNOTSUPP;
+ if (!cfg80211_has_monitors_only(rdev))
+ return -EBUSY;
chan = rdev_freq_to_chan(rdev, freq, chantype);
if (!chan)