[PATCH 7/8] P2P: cancel action frame offchan wait after recv go neg conf

Jouni Malinen j
Tue Jan 7 06:10:58 PST 2014

On Thu, Dec 19, 2013 at 12:03:29PM +0200, Arik Nemtsov wrote:
> From: Eyal Shapira <eyal at wizery.com>
> The missing call to scan_action_done keeps us offchan
> on the listen channel for 250ms following sending go neg resp.
> In case the oper channel is different from the listen channel
> and we're GO a race could lead to start beaconing while offchan.
> This causes the beacons to go out on the listen channel instead
> of the oper channel.

This looks like a reasonable thing to address..

>  src/p2p/p2p_go_neg.c | 1 +
> diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
> @@ -1057,6 +1057,7 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa,
>  	p2p_dbg(p2p, "Received GO Negotiation Confirm from " MACSTR,
>  		MAC2STR(sa));
> +	p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
>  	dev = p2p_get_device(p2p, sa);
>  	if (dev == NULL || dev->wps_method == WPS_NOT_READY ||
>  	    dev != p2p->go_neg_peer) {

.. but this seems to be too early in the function. We should not change
our state for the cases where the received frame is to be dropped
silently. Moving this down a bit to the place where
P2P_DEV_WAIT_GO_NEG_CONFIRM is cleared would be better, I think. I'll
apply this with such change and see how that goes through the tests.
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list