Search Linux Wireless

Re: [PATCH 1/2] wifi: cfg80211: Allow monitor creation in NO_VIRTUAL_MONITOR mode with active AP

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

 



On Fri, 2025-02-28 at 20:15 +0530, Nithyanantham Paramasivam wrote:
> On 2/28/2025 6:20 PM, Johannes Berg wrote:
> > 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...
> > 
> 
> Sure. Perhaps I'll rename it to "WIPHY_FLAG_AP_MONITOR_SUPPORT"

I don't think it's about "AP" either, really, it's about "concurrent" or
so?

> 
> > > 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?
> > 
> 
> Sure. It's better if i remove this sentence.

Well seems you should still explain what happens then - i.e. that the
driver, or in this case mac80211, needs to check that it's possible?

johannes





[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