[PATCH 1/5] wpa_supplicant: Collect and use extended data on used frequencies

Jouni Malinen j
Mon May 26 07:35:27 PDT 2014

On Mon, May 19, 2014 at 10:05:35AM +0300, Ilan Peer wrote:
> When the number of frequencies supported by the kernel is bigger
> than one, and there is a need to pick a frequency for a new flow
> such as P2P GON or P2P invitation, the flow should be able to
> pick the best frequency among all the frequencies currently used
> by the device.
> In order to prioritize between the currently used frequencies, add
> the ability to collect additional data about each used frequency
> (if the frequency is used by a station interface or P2P Client)
> and when needed select the best frequency, where:
> 1. Infrastructure interfaces have highest priority
> 2. P2P Client interfaces have higher priority over AP/GO
>    interfaces.
> The rational is that the frequency of an AP/GO can change while
> that of a station interface cannot.

That sounds fine in general, but this patch is quite painful to review
since it includes number of changes that seem unrelated (e.g., small
changes to debug messages, function/variable renaming, and whitespace
changes). I undid some of those to make this easier to read and
understand the real functional changes.

Unfortunately, there is not yet very good coverage in the automated
hwsim test cases for channel selection in multi channel concurrency
cases. As such, I'm worried about regressions with any non-trivial
changes in this area and this patch is very much non-trivial.

I found couple of cases that would not seem to work properly in some
cases (P2P group on wlan0 was not handled correctly, i.e., need to check
current_ssid->p2p_group instead of wpa_s->p2p_group_interface; and
assumption in wpas_p2p_pick_best_used_freq() about all frequencies being
valid for P2P which is certainly not the case in many cases since this
includes operating channels from non-P2P station interfaces). I tried to
fix these while reviewing the changes, but I'm not sure how complete
that was.

My current work version from the review is here:

I'll continue this at some point, but this is taking significant enough
effort from my part, that this will be likely delayed (as will obviously
the following series that depend on this). If you want to speed up this,
a contribution of hwsim test case or two to exercise and demonstrate
this functionality would be a nice approach. Otherwise, I'll probably
need to do that myself before being able to get convinced that these do
not break some existing use cases. I'd also recommend taking a look at
the patch 2/6 in the series (that is this 1/5 from your set -- I moved
part of 2/5 to be before 1/5 to avoid changes that get deleted
immediately within the same series) and check if I changed something
that does not look correct for your use case.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list