diff mbox series

[2/2] wifi: mac80211: Set the WIPHY_FLAG_SUPPORTS_NO_VIRTUAL_MONITOR flag for cfg80211

Message ID 20250123010950.1958211-3-quic_nithp@quicinc.com (mailing list archive)
State New
Delegated to: Johannes Berg
Headers show
Series wifi: cfg80211/mac80211/ath12k: Enable monitor creation in NO_VIRTUAL_MONITOR mode when AP is active | expand

Commit Message

Nithyanantham Paramasivam Jan. 23, 2025, 1:09 a.m. UTC
Set the WIPHY_FLAG_SUPPORTS_NO_VIRTUAL_MONITOR flag in
ieee80211_register_hw() when the driver advertises NO_VIRTUAL_MONITOR
support. This wiphy flag enables cfg80211 to verify the presence of
NO_VIRTUAL_MONITOR support.

Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
---
 net/mac80211/main.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 53e5aee46885..864ea54a9fb3 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1148,6 +1148,10 @@  int ieee80211_register_hw(struct ieee80211_hw *hw)
 		    (!local->ops->start_nan || !local->ops->stop_nan)))
 		return -EINVAL;
 
+	if (ieee80211_hw_check(hw, NO_VIRTUAL_MONITOR))
+		local->hw.wiphy->flags |=
+			WIPHY_FLAG_SUPPORTS_NO_VIRTUAL_MONITOR;
+
 	if (hw->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO) {
 		/*
 		 * For drivers capable of doing MLO, assume modern driver