|
@@ -4964,17 +4964,7 @@ void wpas_p2p_completed(struct wpa_supplicant *wpa_s)
|
|
|
wpas_notify_p2p_group_started(wpa_s, ssid, network_id, 1);
|
|
|
|
|
|
done:
|
|
|
- if (wpa_s->global->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled &&
|
|
|
- wpa_s->global->p2p != NULL) {
|
|
|
- wpa_s->global->p2p_cb_on_scan_complete = 0;
|
|
|
- if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) {
|
|
|
- wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation "
|
|
|
- "continued after successful connection");
|
|
|
- p2p_increase_search_delay(
|
|
|
- wpa_s->global->p2p,
|
|
|
- wpas_p2p_search_delay(wpa_s));
|
|
|
- }
|
|
|
- }
|
|
|
+ wpas_p2p_continue_after_scan(wpa_s);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -5748,3 +5738,27 @@ unsigned int wpas_p2p_search_delay(struct wpa_supplicant *wpa_s)
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+void wpas_p2p_continue_after_scan(struct wpa_supplicant *wpa_s)
|
|
|
+{
|
|
|
+ wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Station mode scan operation not "
|
|
|
+ "pending anymore (sta_scan_pending=%d "
|
|
|
+ "p2p_cb_on_scan_complete=%d)", wpa_s->sta_scan_pending,
|
|
|
+ wpa_s->global->p2p_cb_on_scan_complete);
|
|
|
+ wpa_s->sta_scan_pending = 0;
|
|
|
+
|
|
|
+ if (!wpa_s->global->p2p_cb_on_scan_complete)
|
|
|
+ return;
|
|
|
+ wpa_s->global->p2p_cb_on_scan_complete = 0;
|
|
|
+
|
|
|
+ if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
|
|
|
+ return;
|
|
|
+
|
|
|
+ if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) {
|
|
|
+ wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation "
|
|
|
+ "continued after successful connection");
|
|
|
+ p2p_increase_search_delay(wpa_s->global->p2p,
|
|
|
+ wpas_p2p_search_delay(wpa_s));
|
|
|
+ }
|
|
|
+}
|