diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2012-06-29 12:47:04 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-29 13:39:17 +0200 |
commit | b78e8ceac23655e1e06b30aa95ab11742d1ac7c0 (patch) | |
tree | ac94fc72cb01b67c1054b7c0b768a57e51800451 /net/wireless/chan.c | |
parent | 4f03c1ed8901a01ad4abcef95c02c007a2d481c2 (diff) | |
download | linux-b78e8ceac23655e1e06b30aa95ab11742d1ac7c0.tar.bz2 |
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/chan.c')
-rw-r--r-- | net/wireless/chan.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 019401b0b5e3..434c56b92c3c 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -82,6 +82,7 @@ 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; @@ -92,7 +93,13 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, if (!chan) return -EINVAL; - return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype); + err = rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype); + if (!err) { + rdev->monitor_channel = chan; + rdev->monitor_channel_type = chantype; + } + + return err; } void |