This patch checks the monitor mode scan feature flag and conditionally allows scanning in monitor mode for hw which supports this. Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx> --- net/mac80211/cfg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7b654d2b8bb2..01a20f2dbf86 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2313,6 +2313,12 @@ static int ieee80211_scan(struct wiphy *wiphy, !(req->flags & NL80211_SCAN_FLAG_AP))) return -EOPNOTSUPP; break; + case NL80211_IFTYPE_MONITOR: + if (wiphy_ext_feature_isset(wiphy, + NL80211_EXT_FEATURE_MONITOR_MODE_SCAN)) + break; + else + return -EOPNOTSUPP; case NL80211_IFTYPE_NAN: default: return -EOPNOTSUPP; -- 2.25.1