diff mbox series

[wireless-next,v2,2/2] wifi: mac80211: Set the WIPHY_FLAG_SUPPORTS_CONCUR_MONITOR_N_OTHER_VIF flag

Message ID 20250313020154.4066212-3-quic_nithp@quicinc.com
State New
Headers show
Series wifi: cfg80211/mac80211/ath12k: Enable monitor creation in NO_VIRTUAL_MONITOR mode when AP is active | expand

Commit Message

Nithyanantham Paramasivam March 13, 2025, 2:01 a.m. UTC
Set the WIPHY_FLAG_SUPPORTS_CONCUR_MONITOR_N_OTHER_VIF flag in
ieee80211_register_hw() when the driver advertises NO_VIRTUAL_MONITOR
support. This wiphy flag enables cfg80211 to allow concurrent
support for monitor mode alongside AP/STA/other interfaces.

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 741e6c7edcb7..a7fbec07a484 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_CONCUR_MONITOR_N_OTHER_VIF;
+
 	if (hw->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO) {
 		/*
 		 * For drivers capable of doing MLO, assume modern driver