diff options
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 0324fe5..b0b53fe 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -174,13 +174,17 @@ static struct wpabuf * p2p_build_go_neg_req(struct p2p_data *p2p, p2p_buf_add_ext_listen_timing(buf, p2p->ext_listen_period, p2p->ext_listen_interval); p2p_buf_add_intended_addr(buf, p2p->intended_addr); +#ifdef ANDROID_P2P if (p2p->cfg->p2p_concurrency == P2P_SINGLE_CHANNEL_CONCURRENT && p2p->op_channel) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Force channel list %d", p2p->op_channel); p2p_buf_add_oper_as_channel_list(buf, p2p->cfg->country, p2p->op_reg_class, p2p->op_channel); } else { +#endif p2p_buf_add_channel_list(buf, p2p->cfg->country, &p2p->channels); +#ifdef ANDROID_P2P } +#endif p2p_buf_add_device_info(buf, p2p, peer); p2p_buf_add_operating_channel(buf, p2p->cfg->country, p2p->op_reg_class, p2p->op_channel); @@ -300,14 +304,18 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p, p2p_buf_add_go_intent(buf, (p2p->go_intent << 1) | tie_breaker); p2p_buf_add_config_timeout(buf, p2p->go_timeout, p2p->client_timeout); if (peer && peer->go_state == REMOTE_GO) { +#ifdef ANDROID_P2P if (p2p->cfg->p2p_concurrency == P2P_SINGLE_CHANNEL_CONCURRENT && p2p->op_channel) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Forcing a channel "); p2p_buf_add_operating_channel(buf, p2p->cfg->country, p2p->op_reg_class, p2p->op_channel); } else { +#endif wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Omit Operating " "Channel attribute"); +#ifdef ANDROID_P2P } +#endif } else { p2p_buf_add_operating_channel(buf, p2p->cfg->country, p2p->op_reg_class, @@ -315,11 +323,13 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p, } p2p_buf_add_intended_addr(buf, p2p->intended_addr); +#ifdef ANDROID_P2P if (p2p->cfg->p2p_concurrency == P2P_SINGLE_CHANNEL_CONCURRENT && p2p->op_channel) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Force channel list %d", p2p->op_channel); p2p_buf_add_oper_as_channel_list(buf, p2p->cfg->country, p2p->op_reg_class, p2p->op_channel); } else { +#endif if (status || peer == NULL) { p2p_buf_add_channel_list(buf, p2p->cfg->country, &p2p->channels); @@ -332,7 +342,9 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p, &res); p2p_buf_add_channel_list(buf, p2p->cfg->country, &res); } +#ifdef ANDROID_P2P } +#endif p2p_buf_add_device_info(buf, p2p, peer); if (peer && peer->go_state == LOCAL_GO) { @@ -1188,6 +1200,7 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa, #endif /* CONFIG_P2P_STRICT */ } +#ifdef ANDROID_P2P if (msg.operating_channel) { dev->oper_freq = p2p_channel_to_freq((const char *) msg.operating_channel, @@ -1197,6 +1210,7 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa, "channel preference: %d MHz", dev->oper_freq); } else dev->oper_freq = 0; +#endif if (!msg.channel_list) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, |