Currently, in NO_VIRTUAL_MONITOR mode, when creating an AP/STA + monitor, there is a restriction: if the AP/STA is running, setting the channel for the monitor is not allowed. For example, in a scenario with three supported radios where the AP uses only the 2 GHz and 5 GHz bands, the 6 GHz band remains available. However, due to the restriction that rdev->num_running_ifaces must equal rdev->num_running_monitor_ifaces in cfg80211_has_monitors_only(), we are unable to create the monitor interface. cfg80211_set_monitor_channel -> cfg80211_has_monitors_only() static inline bool cfg80211_has_monitors_only() { ... return rdev->num_running_ifaces == rdev->num_running_monitor_ifaces && rdev->num_running_ifaces > 0; } To address this issue, bypass the cfg80211_has_monitors_only() call for NO_VIRTUAL_MONITOR to allow monitor creation. Subsequently, cfg80211_set_monitor_channel() will manage all interface combinations and allowed radio conditions, eliminating the need for special handling. Refer link to Felix's NO_VIRTUAL_MONITOR mode patch series. https://lore.kernel.org/linux-wireless/cover.bd168805c299851d01269473eb64e7b05edc41d6.1728372192.git-series.nbd@xxxxxxxx/ Tested various scenarios with the cfg80211_has_monitors_only() bypass modification standalone monitor creation case ******************************** 1. Create multiple standalone monitor interfaces with different radios - Allowed one channel per radio but multiple interfaces can be created with the same channel/radio. AP+Monitor case *************** 1. Create monitor interface with same channel used by AP - allowed 2. Create a monitor interface on a different channel (ch-6) on the same radio that the AP uses (ch-1) - not allowed 3. If the system supports three radios (2 GHz, 5 GHz, and 6 GHz) and the AP uses 5 GHz and 6 GHz - allowed to create a monitor on the 2 GHz radio Please share your thoughts on the following query In the virtual monitor mode design, only a single monitor interface per radio was supported and subsquent monitor creation shares the same vif. However, in NO_VIRTUAL_MONITOR mode(multi-wiphy scenario), there is no limitation on the number of interfaces that can be created (due to separate SDATA for each interface) and notified to the driver. For example, the ath driver can handle up to 16 interfaces per radio. Should we impose any limitations in cfg80211/mac80211 ? Nithyanantham Paramasivam (2): wifi: cfg80211: Allow monitor creation in NO_VIRTUAL_MONITOR mode with active AP wifi: mac80211: Set the WIPHY_FLAG_SUPPORTS_NO_VIRTUAL_MONITOR flag for cfg80211 include/net/cfg80211.h | 3 +++ net/mac80211/main.c | 4 ++++ net/wireless/chan.c | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) base-commit: c4e4e37afc8b8d178b0f00f607c30b3b81253597 -- 2.17.1