Search Linux Wireless

[PATCH 2/3] mac80211: conditionally allow scan in monitor mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux