summaryrefslogtreecommitdiff
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c9
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