P2PS: Remove dead code
Commit f8a80e39b3
('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>
This commit is contained in:
parent
0c8eacd1ab
commit
662512e027
1 changed files with 0 additions and 7 deletions
|
@ -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_NEW:
|
||||||
case P2PS_SETUP_GROUP_OWNER | P2PS_SETUP_CLIENT:
|
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)
|
if (cli_wpa_s)
|
||||||
conncap = P2PS_SETUP_GROUP_OWNER;
|
conncap = P2PS_SETUP_GROUP_OWNER;
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue