P2P: Accept invitations to already running persistent group
We can automatically accept invitations that are for a persistent group that is already running. There is no need to confirm this separately or preparare a new group interface.
This commit is contained in:
parent
9d39057c2b
commit
ab72eb5256
1 changed files with 10 additions and 0 deletions
|
@ -1834,6 +1834,7 @@ static u8 wpas_invitation_process(void *ctx, const u8 *sa, const u8 *bssid,
|
||||||
struct wpa_ssid *s;
|
struct wpa_ssid *s;
|
||||||
u8 cur_bssid[ETH_ALEN];
|
u8 cur_bssid[ETH_ALEN];
|
||||||
int res;
|
int res;
|
||||||
|
struct wpa_supplicant *grp;
|
||||||
|
|
||||||
if (!persistent_group) {
|
if (!persistent_group) {
|
||||||
wpa_printf(MSG_DEBUG, "P2P: Invitation from " MACSTR
|
wpa_printf(MSG_DEBUG, "P2P: Invitation from " MACSTR
|
||||||
|
@ -1853,6 +1854,15 @@ static u8 wpas_invitation_process(void *ctx, const u8 *sa, const u8 *bssid,
|
||||||
return P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE;
|
return P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grp = wpas_get_p2p_group(wpa_s, ssid, ssid_len, go);
|
||||||
|
if (grp) {
|
||||||
|
wpa_printf(MSG_DEBUG, "P2P: Accept invitation to already "
|
||||||
|
"running persistent group");
|
||||||
|
if (*go)
|
||||||
|
os_memcpy(group_bssid, grp->own_addr, ETH_ALEN);
|
||||||
|
goto accept_inv;
|
||||||
|
}
|
||||||
|
|
||||||
if (!wpa_s->conf->persistent_reconnect)
|
if (!wpa_s->conf->persistent_reconnect)
|
||||||
return P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE;
|
return P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue