]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Re-select channel in invitation case with peer info
authorSuryadevara Sudheer <ssuryade@qti.qualcomm.com>
Fri, 17 May 2013 08:18:02 +0000 (11:18 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 May 2013 08:18:02 +0000 (11:18 +0300)
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 <jouni@qca.qualcomm.com>

src/p2p/p2p_invitation.c

index 471868f4b8404f27eecef02a1ee8b9a3cf9b287e..fe8408cfb740f4e941a95e5148b94d8de5b79c2c 100644 (file)
@@ -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,