@@ -51,9 +51,6 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
struct ieee80211_channel *chan;
int result;
- if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
- wdev = NULL;
-
if (wdev) {
ASSERT_WDEV_LOCK(wdev);
@@ -69,7 +66,9 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
return -EINVAL;
result = rdev->ops->set_channel(&rdev->wiphy,
- wdev ? wdev->netdev : NULL,
+ wdev && wdev->iftype !=
+ NL80211_IFTYPE_MONITOR ?
+ wdev->netdev : NULL,
chan, channel_type);
if (result)
return result;