}
}
+ res.peer_config_timeout = go ? peer->client_timeout : peer->go_timeout;
+
p2p_clear_timeout(p2p);
peer->go_neg_req_sent = 0;
peer->wps_method = WPS_NOT_READY;
* persistent_group - Whether the group should be made persistent
*/
int persistent_group;
+
+ /**
+ * peer_config_timeout - Peer configuration timeout (in 10 msec units)
+ */
+ unsigned int peer_config_timeout;
};
struct p2p_data;
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Peer operating "
"channel preference: %d MHz", dev->oper_freq);
+ if (msg.config_timeout) {
+ dev->go_timeout = msg.config_timeout[0];
+ dev->client_timeout = msg.config_timeout[1];
+ }
+
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: GO Negotiation with " MACSTR, MAC2STR(sa));
if (p2p->state != P2P_IDLE)
status = P2P_SC_FAIL_INVALID_PARAMS;
goto fail;
#endif /* CONFIG_P2P_STRICT */
+ } else {
+ dev->go_timeout = msg.config_timeout[0];
+ dev->client_timeout = msg.config_timeout[1];
}
if (!msg.operating_channel && !go) {
u16 ext_listen_period;
u16 ext_listen_interval;
+
+ u8 go_timeout;
+ u8 client_timeout;
};
struct p2p_sd_query {
eloop_cancel_timeout(wpas_p2p_long_listen_timeout, wpa_s, NULL);
eloop_cancel_timeout(wpas_p2p_group_formation_timeout, wpa_s, NULL);
- /* TODO: add peer Config Timeout */
- eloop_register_timeout(15, 0, wpas_p2p_group_formation_timeout, wpa_s,
- NULL);
+ eloop_register_timeout(15 + res->peer_config_timeout / 100,
+ (res->peer_config_timeout % 100) * 10000,
+ wpas_p2p_group_formation_timeout, wpa_s, NULL);
}