One possible outcome of the P2PS PD is P2P GO/P2P Client. In this case,
one peer becomes a P2P GO and the P2P Client joins it. Since multiple
GOs may run simultaneously on the same P2P Device, the P2P Client should
join using the intended interface address.
To be able to find the device by the intended interface address, save it
during the PD.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
* from Beacon/Probe Response), the interface address is stored here.
* p2p_device_addr must still be set in such a case to the unique
* identifier for the P2P Device.
+ *
+ * This field is also used during P2PS PD to store the intended GO
+ * address of the peer.
*/
u8 interface_addr[ETH_ALEN];
dev->wps_prov_info = 0;
break;
}
+
+ if (msg.intended_addr)
+ os_memcpy(dev->interface_addr,
+ msg.intended_addr, ETH_ALEN);
}
}
p2p_parse_free(&msg);
/* Store the provisioning info */
dev->wps_prov_info = msg.wps_config_methods;
+ if (msg.intended_addr)
+ os_memcpy(dev->interface_addr, msg.intended_addr, ETH_ALEN);
p2p_parse_free(&msg);
success = 1;