Patchwork P2P: Set Concurrent Operation bit in Beacon/Probe Response

login
register
mail settings
Submitter Masashi Honma
Date June 5, 2012, 3:10 p.m.
Message ID <CAFk-A4=s_ApF26MWNZcbj5W=akctnLF-13hMjW2y0sRx4HbKZw@mail.gmail.com>
Download mbox | patch
Permalink /patch/163092/
State Superseded
Headers show

Comments

Masashi Honma - June 5, 2012, 3:10 p.m.
Hello.

If the Concurrent Operation is supported by the P2P Device's driver, the
Concurrent Operation bit in the Device Capability is 1. But when the P2P Device
will be GO, the Concurrent Operation bit is changed to 0 on Beacon/Probe
Response. Because p2p_group_add_common_ies() doesn't care the bit. Is there any
reason for it ?

If this is a bug, this patch solves this issue.

 		group_capab |= P2P_GROUP_CAPAB_PERSISTENT_GROUP;


Regards, Masashi Honma.
Jouni Malinen - June 5, 2012, 5:59 p.m.
On Wed, Jun 06, 2012 at 12:10:35AM +0900, Masashi Honma wrote:
> If the Concurrent Operation is supported by the P2P Device's driver, the
> Concurrent Operation bit in the Device Capability is 1. But when the P2P Device
> will be GO, the Concurrent Operation bit is changed to 0 on Beacon/Probe
> Response. Because p2p_group_add_common_ies() doesn't care the bit. Is there any
> reason for it ?
> 
> If this is a bug, this patch solves this issue.

It looks fine to add this Device Capability into the Beacon/Probe
Response frames from the GO. Could you please re-send the patch with
Signed-hostap: line so that I can apply it? Though, it would likely be
even better to initialize dev_capab to group->p2p->dev_capab in
p2p_group_add_common_ies() to remain consistent with how this is set in
p2p_init().

Patch

diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
index 44b387a..d3373bf 100644
--- a/src/p2p/p2p_group.c
+++ b/src/p2p/p2p_group.c
@@ -140,6 +140,8 @@  static void p2p_group_add_common_ies(struct
p2p_group *group,
 	/* P2P Capability */
 	dev_capab |= P2P_DEV_CAPAB_SERVICE_DISCOVERY;
 	dev_capab |= P2P_DEV_CAPAB_INVITATION_PROCEDURE;
+	if (group->p2p->cfg->concurrent_operations)
+		dev_capab |= P2P_DEV_CAPAB_CONCURRENT_OPER;
 	group_capab |= P2P_GROUP_CAPAB_GROUP_OWNER;
 	if (group->cfg->persistent_group) {