P2PS: Re-factor p2ps_group_capability()
authorIlan Peer <ilan.peer@intel.com>
Thu, 24 Sep 2015 17:37:57 +0000 (20:37 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 7 Oct 2015 14:07:21 +0000 (17:07 +0300)
commitab804bcb6fcdaa74d2d457f1f5d09d37e3f33085
tree4c8860ad46ad7d028d0b1f11890665d82364528d
parent8d5e73290f44d076634b1eb827d86038206c8112
P2PS: Re-factor p2ps_group_capability()

The code was iterating all the interfaces, and for each interface
iterated all the network blocks to count active P2P GO and P2P Client
interfaces.

Change the code to reuse wpas_p2p_get_go_group() to get a P2P GO
interface and add wpas_p2p_get_cli_group() and use it to find a
P2P Client interface, and use these objects when evaluating the
group capability.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
wpa_supplicant/p2p_supplicant.c