diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2012-06-29 12:47:03 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-29 13:39:17 +0200 |
commit | 4f03c1ed8901a01ad4abcef95c02c007a2d481c2 (patch) | |
tree | 7b0dbbf9413cb0aa314bf8cdd1c17684261b7659 /net/wireless/chan.c | |
parent | 870d37fc22f3e40f9f23e06c581c8538fc16a2f0 (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/chan.c')
-rw-r--r-- | net/wireless/chan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 167e7cb6008..019401b0b5e 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) |