P2P: Add peer entry based on Provision Discovery Request

Add (or complete Probe Request only) P2P peer entry when receiving
Provision Discovery Request from a previously unknown peer. This is
especially of use for a GO when a P2P client is requesting to join
a running group.
This commit is contained in:
Ardong Chen 2010-09-06 16:51:46 +03:00 committed by Jouni Malinen
parent 812bf56ab1
commit 17bef1e97a
3 changed files with 14 additions and 4 deletions

View file

@ -419,10 +419,12 @@ static int p2p_add_group_clients(struct p2p_data *p2p, const u8 *go_dev_addr,
* Returns: 0 on success, -1 on failure
*
* If the scan result is for a GO, the clients in the group will also be added
* to the peer table.
* to the peer table. This function can also be used with some other frames
* like Provision Discovery Request that contains P2P Capability and P2P Device
* Info attributes.
*/
static int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq,
int level, const u8 *ies, size_t ies_len)
int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq, int level,
const u8 *ies, size_t ies_len)
{
struct p2p_device *dev;
struct p2p_message msg;