[PATCH] P2P: Fix problem with connecting to non-P2P network in P2P mode

Janusz Dziedzic janusz.dziedzic at gmail.com
Mon Jun 25 06:50:00 EDT 2012


2012/6/25 Jouni Malinen <j at w1.fi>:
> On Mon, Jun 25, 2012 at 08:41:23AM +0200, Janusz Dziedzic wrote:
>> This fix solve problem we have during such test case:
>> 1) add and configure network 0
>> 2) run p2p_scan
>
> Do you mean p2p_find?

yes.

>
>> 3) enable_network 0
>>
>> Seems step-3 don't work because of p2p_scan.
>> So, the question is if supplicant should stop p2p_scan or this should
>> be solve in upper layer?
>
> p2p_find tries to use all possible time on the radio for P2P device
> discovery. As such, it is pretty much exclusive with any other radio
> operation.
>
> As far as stopping p2p_find is concerned, that is currently done with
> some P2P operations, but those are only done based on explicit control
> interface command from an external application. Whether "enable_network
> 0" should be such command is a question that may not have a clear
> answer.. I'm not sure which behavior would be less confusing for
> external programs that may expect P2P device discovery to continue.
>
> That said, if we want to disable p2p_find on enable_network command, it
> would seem that wpa_supplicant_enable_network() would be the place to do
> this.
>

The problem still with other paths that enable network.
select_network 0
reassociate

So, best is to left this for upper layer to decide.
Thanks.

BR
Janusz


More information about the HostAP mailing list