summaryrefslogtreecommitdiff
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-12 20:19:48 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2012-07-13 14:16:11 (GMT)
commit4290cb4bf212112e3d6f860e25f000ca8a1ca6a4 (patch)
treeb6dda8955a4e199c318860ffa01dc9b2ea417905 /net/wireless/chan.c
parent5b7ccaf3fc7446e42b83a77fd7aa7ad92850acdd (diff)
downloadlinux-4290cb4bf212112e3d6f860e25f000ca8a1ca6a4.tar.xz
cfg80211: reduce monitor interface tracking
Revert commit b78e8ceac23655e1e06b30aa95ab11742d1ac7c0 ("cfg80211: track monitor channel") and remove the set_monitor_enabled() callback. Due to the tracking happening in NETDEV_PRE_UP, it had introduced bugs because the monitor interface callback would be called before the device was started. It looks like there's no way to fix this, and using NETDEV_PRE_UP is broken anyway (since there's no NETDEV_UP_FAIL), so remove all that code, track interfaces in NETDEV_UP and also stop tracking the monitor channel in cfg80211. This mostly reverts to before the tracking, except that we keep the interface count tracking so that setting the monitor channel can be rejected properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index a16cdff..d355f67 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -82,7 +82,6 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
int freq, enum nl80211_channel_type chantype)
{
struct ieee80211_channel *chan;
- int err;
if (!rdev->ops->set_monitor_channel)
return -EOPNOTSUPP;
@@ -93,13 +92,7 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
if (!chan)
return -EINVAL;
- err = rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype);
- if (!err) {
- rdev->monitor_channel = chan;
- rdev->monitor_channel_type = chantype;
- }
-
- return err;
+ return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype);
}
void