3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

p2p: Update peer->device_addr when updating peer->bss

peer->device_addr is a pointer to the Device Address contained in
one of two possible places in peer->bss.  If during discovery we've
received a new beacon/probe response for an existing peer and we're
going to replace peer->bss, we also have to update peer->device_addr.
This commit is contained in:
Andrew Zaborowski 2020-07-11 03:00:37 +02:00 committed by Denis Kenzior
parent 122ea7a8aa
commit 7d3092e1ca

View File

@ -2408,6 +2408,13 @@ static bool p2p_peer_update_existing(struct scan_bss *bss,
* from the discovery scan results. * from the discovery scan results.
* Do we need to update DBus properties? * Do we need to update DBus properties?
*/ */
if (peer->device_addr == peer->bss->addr)
peer->device_addr = bss->addr;
else
peer->device_addr =
bss->p2p_probe_resp_info->device_info.device_addr;
scan_bss_free(peer->bss); scan_bss_free(peer->bss);
peer->bss = bss; peer->bss = bss;