@@ -1408,10 +1408,19 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
if (p2p->cfg->p2ps_prov_complete) {
int freq = 0;
+ u8 tmp;
- if (conncap == P2PS_SETUP_GROUP_OWNER)
+ if (conncap == P2PS_SETUP_GROUP_OWNER) {
+ /* Re-select the oprating channel as it is
+ * possible that original channel is no longer
+ * valid. This should not really fail
+ */
+ if (p2p_go_select_channel(p2p, dev, &tmp) < 0)
+ p2p_dbg(p2p,
+ "P2PS PD channel selection failed");
freq = p2p_channel_to_freq(p2p->op_reg_class,
p2p->op_channel);
+ }
p2p->cfg->p2ps_prov_complete(
p2p->cfg->cb_ctx, status, sa, adv_mac,
It is possible that the initial operating channel is not supported by the peer, so reselect the channel from the channel intersection. Signed-off-by: Ilan Peer <ilan.peer@intel.com> --- src/p2p/p2p_pd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)