On Wed, 2016-10-12 at 18:27 +0530, Purushottam Kushwaha wrote:
> This commit enhances the current beacon interval validation to also
> consider the "radar_detect" and "num_different_channels".
> Rename "cfg80211_validate_beacon_int" to
> as the validation considers other parameters.
Looking at this more closely, I think it's correct, but incomplete.
Consider a case like the following:
(1) AP=3, beacon_int_gcd=50
(2) AP=2, station=1, beacon_int_gcd=0
AP interfaces A and B are both active, with beacon intervals of 100 and
150 respectively. So far, this is not a problem, falling into the
interface combination (1).
Now, somebody wants to add a station interface, and brings it up.
Because the validation thereof doesn't take the beacon intervals into
account at all, this would be accepted as falling into the interface
combination (2), but is actually incorrect due to the differing beacon
As a consequence, I think we need to factor out the beacon interval
information building from cfg80211_validate_beacon_int() as it is right
now (with your other two patches applied), and also apply it when we
call cfg80211_iter_combinations() so that the case above gets verified.
This patch is probably a step in the right direction, but given the
situation above I don't think it's complete.