Skip to content

Commit

Permalink
cfg80211: refuse to .set_monitor_channel when non-monitors are present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michal Kazior authored and Johannes Berg committed Jun 29, 2012
1 parent 870d37f commit 4f03c1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/wireless/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f03c1e

Please sign in to comment.