diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-10-24 17:29:37 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-24 17:29:37 +0300 |
commit | acc247b260817aac89121f46f444be8278085726 (patch) | |
tree | 111b00f1f03ef211603f17229b484a9e6170efec /src/p2p/p2p_go_neg.c | |
parent | ccc12d784197e4d0c68024553269a6098eac7daf (diff) | |
download | external_wpa_supplicant_8_ti-acc247b260817aac89121f46f444be8278085726.zip external_wpa_supplicant_8_ti-acc247b260817aac89121f46f444be8278085726.tar.gz external_wpa_supplicant_8_ti-acc247b260817aac89121f46f444be8278085726.tar.bz2 |
P2P: Advertise Persistent Reconnect group capability
The persistent_reconnect configuration parameter was used to decide
whether to accept invitation to re-establish a persistent group.
However, this was not being advertised in the Group Capability bitmap.
Add the Persistent Reconnect bit based on this configuration to GO
Negotiation frames and Beacon/Probe Response frames from the GO.
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index b506a80..eb85f51 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -152,8 +152,11 @@ static struct wpabuf * p2p_build_go_neg_req(struct p2p_data *p2p, len = p2p_buf_add_ie_hdr(buf); group_capab = 0; - if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) { group_capab |= P2P_GROUP_CAPAB_PERSISTENT_GROUP; + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_RECONN) + group_capab |= P2P_GROUP_CAPAB_PERSISTENT_RECONN; + } if (p2p->cross_connect) group_capab |= P2P_GROUP_CAPAB_CROSS_CONN; if (p2p->cfg->p2p_intra_bss) @@ -242,8 +245,12 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p, p2p_buf_add_status(buf, status); group_capab = 0; if (peer && peer->go_state == LOCAL_GO) { - if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) { group_capab |= P2P_GROUP_CAPAB_PERSISTENT_GROUP; + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_RECONN) + group_capab |= + P2P_GROUP_CAPAB_PERSISTENT_RECONN; + } if (p2p->cross_connect) group_capab |= P2P_GROUP_CAPAB_CROSS_CONN; if (p2p->cfg->p2p_intra_bss) @@ -673,8 +680,12 @@ static struct wpabuf * p2p_build_go_neg_conf(struct p2p_data *p2p, p2p_buf_add_status(buf, status); group_capab = 0; if (peer->go_state == LOCAL_GO) { - if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_GROUP) { group_capab |= P2P_GROUP_CAPAB_PERSISTENT_GROUP; + if (peer->flags & P2P_DEV_PREFER_PERSISTENT_RECONN) + group_capab |= + P2P_GROUP_CAPAB_PERSISTENT_RECONN; + } if (p2p->cross_connect) group_capab |= P2P_GROUP_CAPAB_CROSS_CONN; if (p2p->cfg->p2p_intra_bss) |