From: Suryadevara Sudheer Date: Fri, 17 May 2013 08:18:02 +0000 (+0300) Subject: P2P: Re-select channel in invitation case with peer info X-Git-Tag: aosp-kk-from-upstream~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d956c40640aa4e7460affa0436cce505f93616a;p=thirdparty%2Fhostap.git P2P: Re-select channel in invitation case with peer info Allow invitation exchange to update operating channel selection after peer channel list has been received similarly to how GO negotiation was handled. Signed-hostap: Jouni Malinen --- diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c index 471868f4b..fe8408cfb 100644 --- a/src/p2p/p2p_invitation.c +++ b/src/p2p/p2p_invitation.c @@ -322,6 +322,14 @@ void p2p_process_invitation_req(struct p2p_data *p2p, const u8 *sa, status = P2P_SC_FAIL_NO_COMMON_CHANNELS; goto fail; } + } else if (!(dev->flags & P2P_DEV_FORCE_FREQ) && + !p2p->cfg->cfg_op_channel) { + wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, + "P2P: Try to reselect channel selection with " + "peer information received; " + "previously selected op_class %u channel %u", + p2p->op_reg_class, p2p->op_channel); + p2p_reselect_channel(p2p, &intersection); } op_freq = p2p_channel_to_freq(p2p->op_reg_class,