diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index bfd9cdaef..26b86a8bc 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1133,6 +1133,8 @@ static int p2p_prepare_channel_pref(struct p2p_data *p2p, u8 op_class, op_channel; unsigned int freq = force_freq ? force_freq : pref_freq; + p2p_dbg(p2p, "Prepare channel pref - force_freq=%u pref_freq=%u", + force_freq, pref_freq); if (p2p_freq_to_channel(freq, &op_class, &op_channel) < 0) { p2p_dbg(p2p, "Unsupported frequency %u MHz", freq); return -1; @@ -1165,6 +1167,8 @@ static void p2p_prepare_channel_best(struct p2p_data *p2p) { u8 op_class, op_channel; + p2p_dbg(p2p, "Prepare channel best"); + if (!p2p->cfg->cfg_op_channel && p2p->best_freq_overall > 0 && p2p_supported_freq(p2p, p2p->best_freq_overall) && p2p_freq_to_channel(p2p->best_freq_overall, &op_class, &op_channel) @@ -1187,6 +1191,7 @@ static void p2p_prepare_channel_best(struct p2p_data *p2p) p2p->op_reg_class = op_class; p2p->op_channel = op_channel; } else { + p2p_dbg(p2p, "Select pre-configured channel as operating channel preference"); p2p->op_reg_class = p2p->cfg->op_reg_class; p2p->op_channel = p2p->cfg->op_channel; } @@ -1212,6 +1217,8 @@ static void p2p_prepare_channel_best(struct p2p_data *p2p) int p2p_prepare_channel(struct p2p_data *p2p, struct p2p_device *dev, unsigned int force_freq, unsigned int pref_freq) { + p2p_dbg(p2p, "Prepare channel - force_freq=%u pref_freq=%u", + force_freq, pref_freq); if (force_freq || pref_freq) { if (p2p_prepare_channel_pref(p2p, force_freq, pref_freq) < 0) return -1; diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 7c786fd21..e280cf73c 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3847,6 +3847,9 @@ static int wpas_p2p_setup_freqs(struct wpa_supplicant *wpa_s, int freq, num = get_shared_radio_freqs(wpa_s, freqs, wpa_s->num_multichan_concurrent); + wpa_printf(MSG_DEBUG, + "P2P: Setup freqs: freq=%d num_MCC=%d shared_freqs=%u", + freq, wpa_s->num_multichan_concurrent, num); if (freq > 0) { if (!p2p_supported_freq(wpa_s->global->p2p, freq)) {