@@ -306,8 +306,19 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p,
p2p_buf_add_channel_list(buf, p2p->cfg->country,
&p2p->channels);
} else if (peer->go_state == REMOTE_GO) {
+ struct p2p_channels res;
+
+ p2p_channels_union(&p2p->cfg->channels,
+ &p2p->cfg->cli_channels,
+ &res);
+
+ if (p2p_is_indoor_device(&peer->info))
+ p2p_channels_union(&res,
+ &p2p->cfg->indoor_channels,
+ &res);
+
p2p_buf_add_channel_list(buf, p2p->cfg->country,
- &p2p->channels);
+ &res);
} else {
struct p2p_channels res;
p2p_channels_intersect(&p2p->channels, &peer->channels,
The P2P specification states that in case the P2P Device is to become a P2P Client it can set the channels in the channel list attribute independently from the channel list attribute in the GoN request. Add all the P2P Device supported channels to the GoN response, as this can be useful for cases that the allowed channels of the peer P2P Device change, and the GO can now operate in additional channels. Signed-off-by: Ilan Peer <ilan.peer@intel.com> --- src/p2p/p2p_go_neg.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)