P2P: Indicate frequency for upper layer invitation processing

When a device that is a GO in a persistent group receives an Invitation
Request from a P2P client and persistent_reconnect=0, upper layer is
notified of this with P2P-INVITATION-RECEIVED event. The upper layer is
supposed to run another invitation exchange is this case, but if that
does not happen and the GO is started without successful (status=0)
invitation exchange, the operating channel for the group may end up
getting set in a way that the P2P client is not able to support. Provide
optional freq parameter in the P2P-INVITATION-RECEIVED event on the GO
side. If this parameter is received and the upper layer decides to issue
P2P_GROUP_ADD command, that command should include this freq parameter
to make sure the operating channel gets selected from the set that the
peer can support.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-03-01 21:27:31 +02:00 committed by Jouni Malinen
parent 18206e02c5
commit cd1e2309a2

View file

@ -2476,8 +2476,14 @@ static void wpas_invitation_received(void *ctx, const u8 *sa, const u8 *bssid,
return; return;
} }
wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_INVITATION_RECEIVED "sa=" MACSTR if (s->mode == WPAS_MODE_P2P_GO && op_freq) {
" persistent=%d", MAC2STR(sa), s->id); wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_INVITATION_RECEIVED "sa="
MACSTR " persistent=%d freq=%d",
MAC2STR(sa), s->id, op_freq);
} else {
wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_INVITATION_RECEIVED "sa="
MACSTR " persistent=%d", MAC2STR(sa), s->id);
}
} }