On Thu, 2025-01-23 at 06:39 +0530, Nithyanantham Paramasivam wrote: > 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, add the new wiphy flag > WIPHY_FLAG_SUPPORTS_NO_VIRTUAL_MONITOR to advertise no virtual monitor > support to cfg80211. This flag will allow the creation of a monitor > interface by bypassing the cfg80211_has_monitors_only() function. I think it would make sense to call this differently in cfg80211, per what it actually _achieves_, rather than per the *mac80211* logic about it... > There is no need for special handling after this, as > cfg80211_set_monitor_channel() will manage all interface combinations > and allowed radio conditions. This sentence just can't be right - you're changing cfg80211_set_monitor_channel() and there's no more code after it? johannes