P2P: Copy config from p2pdev when not using dedicated group interface
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 7 Apr 2016 10:32:08 +0000 (13:32 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 21:10:49 +0000 (00:10 +0300)
commit9b377be0374a11625b4d4387190cc4f02617a54a
tree132e3ad12ab70d72dafae0c264a99e9d57b72061
parent3c88d269410e30a31160dc6f813bce4277b696cf
P2P: Copy config from p2pdev when not using dedicated group interface

When the P2P Device interface is used and an existing interface is used
for P2P GO/Client, the P2P Device configuration was not cloned to the
configuration of the existing interface. Thus, configuration parameters
such as idle_group_time, etc., were not propagated to the P2P GO/Client
interface.

Handle this by copying all configuration parameters of the P2P device
interface to the reused interface, with the following exceptions:

1. Copy the NFC key data only if it was not set in the configuration
   file.
2. The WPS string fields are set only if they were not previously set
   in the configuration of the destination interface (based on the
   assumption that these fields should be identical among all
   interfaces).

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/p2p_supplicant.c