P2P: Update pending join interface address during scans
Since the P2P peer entry may not have been available at the time the join request was issued, we need to allow the P2P Interface Address to be updated during join-scans when the P2P peer entry for the GO may be added.
This commit is contained in:
parent
9b1ab931b1
commit
5496062919
1 changed files with 18 additions and 0 deletions
|
@ -2441,6 +2441,7 @@ static void wpas_p2p_scan_res_join(struct wpa_supplicant *wpa_s,
|
||||||
{
|
{
|
||||||
struct wpa_bss *bss;
|
struct wpa_bss *bss;
|
||||||
int freq;
|
int freq;
|
||||||
|
u8 iface_addr[ETH_ALEN];
|
||||||
|
|
||||||
eloop_cancel_timeout(wpas_p2p_join_scan, wpa_s, NULL);
|
eloop_cancel_timeout(wpas_p2p_join_scan, wpa_s, NULL);
|
||||||
|
|
||||||
|
@ -2455,6 +2456,23 @@ static void wpas_p2p_scan_res_join(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
freq = p2p_get_oper_freq(wpa_s->global->p2p,
|
freq = p2p_get_oper_freq(wpa_s->global->p2p,
|
||||||
wpa_s->pending_join_iface_addr);
|
wpa_s->pending_join_iface_addr);
|
||||||
|
if (freq < 0 &&
|
||||||
|
p2p_get_interface_addr(wpa_s->global->p2p,
|
||||||
|
wpa_s->pending_join_dev_addr,
|
||||||
|
iface_addr) == 0 &&
|
||||||
|
os_memcmp(iface_addr, wpa_s->pending_join_dev_addr, ETH_ALEN) != 0)
|
||||||
|
{
|
||||||
|
wpa_printf(MSG_DEBUG, "P2P: Overwrite pending interface "
|
||||||
|
"address for join from " MACSTR " to " MACSTR
|
||||||
|
" based on newly discovered P2P peer entry",
|
||||||
|
MAC2STR(wpa_s->pending_join_iface_addr),
|
||||||
|
MAC2STR(iface_addr));
|
||||||
|
os_memcpy(wpa_s->pending_join_iface_addr, iface_addr,
|
||||||
|
ETH_ALEN);
|
||||||
|
|
||||||
|
freq = p2p_get_oper_freq(wpa_s->global->p2p,
|
||||||
|
wpa_s->pending_join_iface_addr);
|
||||||
|
}
|
||||||
if (freq >= 0) {
|
if (freq >= 0) {
|
||||||
wpa_printf(MSG_DEBUG, "P2P: Target GO operating frequency "
|
wpa_printf(MSG_DEBUG, "P2P: Target GO operating frequency "
|
||||||
"from P2P peer table: %d MHz", freq);
|
"from P2P peer table: %d MHz", freq);
|
||||||
|
|
Loading…
Reference in a new issue