P2P: Fix p2p_connect join with interface address
Need to fetch P2P Device Address from the peers table in case the p2p_connect join command uses interface address.
This commit is contained in:
parent
72044390f3
commit
4147a2cc64
3 changed files with 20 additions and 3 deletions
|
@ -2959,6 +2959,17 @@ int p2p_get_interface_addr(struct p2p_data *p2p, const u8 *dev_addr,
|
|||
}
|
||||
|
||||
|
||||
int p2p_get_dev_addr(struct p2p_data *p2p, const u8 *iface_addr,
|
||||
u8 *dev_addr)
|
||||
{
|
||||
struct p2p_device *dev = p2p_get_device_interface(p2p, iface_addr);
|
||||
if (dev == NULL)
|
||||
return -1;
|
||||
os_memcpy(dev_addr, dev->p2p_device_addr, ETH_ALEN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void p2p_set_peer_filter(struct p2p_data *p2p, const u8 *addr)
|
||||
{
|
||||
os_memcpy(p2p->peer_filter, addr, ETH_ALEN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue