[PATCH] P2P: Stop p2p listen when listen duration is over.

Arend van Spriel arend
Wed Jul 3 04:36:43 PDT 2013


On 07/03/2013 01:05 PM, Syed Asifful Dayyan Rafiuddeen wrote:
> Even after listen duration is over, supplicant stays in
>   p2p_listen_only state, which is blocking the STA scan. This
>   patch will stop p2p listen and update p2p_state to idle
>   when listen duration expires.
>
> Signed-hostap: Syed Asifful Dayyan <syedd at broadcom.com>
> ---
>   src/p2p/p2p.c                   |    7 +++++++
>   src/p2p/p2p.h                   |    8 ++++++++
>   wpa_supplicant/p2p_supplicant.c |    4 ++++
>   3 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
> index 54f5ee8..fec4af7 100644
> --- a/src/p2p/p2p.c
> +++ b/src/p2p/p2p.c
> @@ -1113,6 +1113,13 @@ void p2p_stop_listen_for_freq(struct p2p_data *p2p, int freq)
>   	p2p->cfg->stop_listen(p2p->cfg->cb_ctx);
>   }
>
> +#ifdef ANDROID_P2P

Any reason to assume this is Android specific? Maybe it is better to fix 
it in p2p_state_timeout().

Regards,
Arend

> +void p2p_stop_listen(struct p2p_data *p2p)
> +{
> +	p2p_stop_listen_for_freq(p2p, 0);
> +	p2p_set_state(p2p, P2P_IDLE);
> +}
> +#endif /* ANDROID_P2P */





More information about the Hostap mailing list