aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-24 17:00:59 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-24 17:16:15 (GMT)
commit662512e027db30b0b7a2dd4865e964d1f8812f91 (patch)
tree920219b402f60e88d65bf549a87b4504c3ef138f /wpa_supplicant/p2p_supplicant.c
parent0c8eacd1ab0447813d98e52f23ee1f571fd74821 (diff)
downloadhostap-662512e027db30b0b7a2dd4865e964d1f8812f91.zip
hostap-662512e027db30b0b7a2dd4865e964d1f8812f91.tar.gz
hostap-662512e027db30b0b7a2dd4865e964d1f8812f91.tar.bz2
P2PS: Remove dead code
Commit f8a80e39b33212992f88ce2e638193f81664230a ('P2PS: Change connection capability handling') added the identical P2PS_SETUP_CLIENT check into two places within p2ps_group_capability(). However, only the first one of these can be reached. In the second case, role can only have values 0 or P2PS_SETUP_NEW and as such, the P2PS_SETUP_CLIENT case is not possible. It looks like the first part of the commit is sufficient, so remove the dead code added by the second part. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 45dae50..d6acbd0 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -774,13 +774,6 @@ static u8 p2ps_group_capability(void *ctx, u8 incoming, u8 role,
case P2PS_SETUP_GROUP_OWNER | P2PS_SETUP_NEW:
case P2PS_SETUP_GROUP_OWNER | P2PS_SETUP_CLIENT:
- /*
- * Peer has an active GO, so if the role allows it and
- * we do not have any active roles, become client.
- */
- if ((role & P2PS_SETUP_CLIENT) && !go_wpa_s && !cli_wpa_s)
- return P2PS_SETUP_CLIENT;
-
if (cli_wpa_s)
conncap = P2PS_SETUP_GROUP_OWNER;
else {