On Thu, 2024-12-19 at 16:27 +0530, Kavita Kavita wrote: > > On 12/19/2024 2:31 PM, Johannes Berg wrote: > > On Thu, 2024-12-19 at 11:35 +0530, Kavita Kavita wrote: > > > > > > The for_each_subchan() macro will not work for this. When sub channel is > > > null, it will terminate the loop, but in this case, we should continue > > > checking other sub channels. > > > > Wait, I'm confused by what you're saying here. The for_each_subchan() > > macro should iterate over all enabled (not punctured) subchannels, so > > why would it not be applicable here? > > > > So, In the following regulatory checks: cfg80211_get_chans_dfs_required, > cfg80211_get_chans_dfs_usable, cfg80211_get_chans_dfs_available, and so on. > > When iterating over primary or secondary bandwidth, if we encounter any > null subchannel, What do you mean by "null subchannel"? In all of these cases, if you have e.g. the following 320 MHz channel, where "x" indicates removed by puncturing: | | | | | | | | | | | | |x|x| | | then of course it should iterate over all the non-removed 14 subchannels, not just the first 12? > the loop will terminate, and we will not check the > remaining subchannels. As you write it here, that seems wrong for all cases? johannes