[PATCH 17/24] P2P: Add all channels to GoN response
Ilan Peer
ilan.peer
Mon May 19 00:06:14 PDT 2014
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 at intel.com>
---
src/p2p/p2p_go_neg.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index ac93902..b756a86 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -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,
--
1.7.10.4
More information about the Hostap
mailing list