aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-29 06:47:03 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-29 07:39:17 -0400
commit4f03c1ed8901a01ad4abcef95c02c007a2d481c2 (patch)
tree7b0dbbf9413cb0aa314bf8cdd1c17684261b7659 /net/wireless
parent870d37fc22f3e40f9f23e06c581c8538fc16a2f0 (diff)
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,
85 85
86 if (!rdev->ops->set_monitor_channel) 86 if (!rdev->ops->set_monitor_channel)
87 return -EOPNOTSUPP; 87 return -EOPNOTSUPP;
88 if (!cfg80211_has_monitors_only(rdev))
89 return -EBUSY;
88 90
89 chan = rdev_freq_to_chan(rdev, freq, chantype); 91 chan = rdev_freq_to_chan(rdev, freq, chantype);
90 if (!chan) 92 if (!chan)