Hmm. Apart from some misleading documentation, that doesn't mention
"GCD" at all, the logic seems odd.

In order to validate a new beacon interval, you're first looking up the
min GCD value of all the combinations that allow the *current*
scenario, but doing that matching without the right # of channels or
radar detect parameters? And then you're trying to match that to the
new beacon interval?

It seems to me that the logic should be something like:

If the driver specified diff_beacon_int_gcd_min, then don't do anything
in cfg80211_validate_beacon_int(), other than perhaps a minimal range
check against the minimum of all diff_beacon_int_gcd_min values for all
combinations.

Then, add a new argument to cfg80211_check_combinations() (and
cfg80211_iter_combinations()) to have the beacon intervals for each
beaconing interface, and use that in order to match if a combination
fits, inside cfg80211_iter_combinations().

That new argument could be made the GCD of all existing beaconing
interfaces (or 0 if no such exists), since that's sufficient for
checking against a new min_gcd.

johannes

Reply via email to