summaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-29 12:47:04 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-06-29 13:39:17 +0200
commitb78e8ceac23655e1e06b30aa95ab11742d1ac7c0 (patch)
treeac94fc72cb01b67c1054b7c0b768a57e51800451 /net/wireless/core.c
parentcfg80211: refuse to .set_monitor_channel when non-monitors are present (diff)
downloadlinux-b78e8ceac23655e1e06b30aa95ab11742d1ac7c0.tar.xz
linux-b78e8ceac23655e1e06b30aa95ab11742d1ac7c0.zip
cfg80211: track monitor channel
Make it even more obvious we support single monitor channel. This will allow us to remove .get_channel. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 8412da7d0f25..1b5daa73b3a9 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -730,9 +730,15 @@ void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev,
rdev->num_running_monitor_ifaces += num;
has_monitors_only_new = cfg80211_has_monitors_only(rdev);
- if (has_monitors_only_new != has_monitors_only_old)
+ if (has_monitors_only_new != has_monitors_only_old) {
rdev->ops->set_monitor_enabled(&rdev->wiphy,
has_monitors_only_new);
+
+ if (!has_monitors_only_new) {
+ rdev->monitor_channel = NULL;
+ rdev->monitor_channel_type = NL80211_CHAN_NO_HT;
+ }
+ }
}
static int cfg80211_netdev_notifier_call(struct notifier_block *nb,