[PATCH] P2P: prevent p2pdev from roaming
Mon Dec 1 02:05:32 PST 2014
On 1 December 2014 at 10:32, Arend van Spriel <arend at broadcom.com> wrote:
> On 12/01/14 09:36, Michal Kazior wrote:
>> It was possible for a P2P_DEVICE to receive scan results and
>> subsequently start roaming due to a matching network. This caused
>> P2P find stop working (state machines seemed to be confused).
>> +static int wpa_supplicant_is_p2pdev(struct wpa_supplicant *wpa_s)
>> + return wpa_s->parent&& wpa_s->parent->p2p_dev == wpa_s;
>> static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
>> struct wpa_bss *selected,
>> struct wpa_ssid *ssid)
>> @@ -1146,6 +1152,8 @@ static int wpa_supplicant_need_to_roam(struct
>> wpa_supplicant *wpa_s,
>> struct wpa_bss *current_bss = NULL;
>> int min_diff;
>> + if (wpa_supplicant_is_p2pdev(wpa_s))
> Could check wpa_s->p2p_mgmt here instead, which is set for dedicated p2p
> management interface, ie. p2pdev.
Good point. I was a bit confused about p2p_mgmt flow at first. It
seems to work fine as well. Thanks! I'll send a v2.
More information about the Hostap