P2P: Fix invitation to active group to use correct operating channel
Invitation Request must use the current operating frequency of the group, not the default operating channel.
This commit is contained in:
parent
dcf788d1a4
commit
d9d6a58c8f
3 changed files with 6 additions and 3 deletions
|
@ -405,8 +405,9 @@ int p2p_invite(struct p2p_data *p2p, const u8 *peer, enum p2p_invite_role role,
|
||||||
struct p2p_device *dev;
|
struct p2p_device *dev;
|
||||||
|
|
||||||
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
|
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
|
||||||
"P2P: Request to invite peer " MACSTR " role=%d",
|
"P2P: Request to invite peer " MACSTR " role=%d persistent=%d "
|
||||||
MAC2STR(peer), role);
|
"force_freq=%u",
|
||||||
|
MAC2STR(peer), role, persistent_group, force_freq);
|
||||||
if (bssid)
|
if (bssid)
|
||||||
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
|
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
|
||||||
"P2P: Invitation for BSSID " MACSTR, MAC2STR(bssid));
|
"P2P: Invitation for BSSID " MACSTR, MAC2STR(bssid));
|
||||||
|
|
|
@ -372,6 +372,7 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
wpa_s->current_ssid = ssid;
|
wpa_s->current_ssid = ssid;
|
||||||
os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN);
|
os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN);
|
||||||
|
wpa_s->assoc_freq = ssid->frequency;
|
||||||
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
|
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
|
||||||
|
|
||||||
if (wpa_s->ap_configured_cb)
|
if (wpa_s->ap_configured_cb)
|
||||||
|
|
|
@ -3140,7 +3140,8 @@ int wpas_p2p_invite_group(struct wpa_supplicant *wpa_s, const char *ifname,
|
||||||
wpa_s->pending_invite_ssid_id = -1;
|
wpa_s->pending_invite_ssid_id = -1;
|
||||||
|
|
||||||
return p2p_invite(wpa_s->global->p2p, peer_addr, role, bssid,
|
return p2p_invite(wpa_s->global->p2p, peer_addr, role, bssid,
|
||||||
ssid->ssid, ssid->ssid_len, 0, go_dev_addr, 0);
|
ssid->ssid, ssid->ssid_len, wpa_s->assoc_freq,
|
||||||
|
go_dev_addr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue