P2P: Re-start P2P operation if station mode scanning is stopped
There were couple of code paths that could end up stopping station mode scanning without clearing sta_scan_pending. This could result in P2P search getting stuck waiting for completion of station mode scan which would never show up. Fix this by calling wpas_p2p_continue_after_scan() in cases where station mode scans are stopped. This allows sta_scan_pending to be cleared and P2P search operation continued. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
f85f545e71
commit
b1cd021e29
1 changed files with 4 additions and 3 deletions
|
@ -531,12 +531,14 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
|
|
||||||
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) {
|
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - interface disabled");
|
wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - interface disabled");
|
||||||
|
wpas_p2p_continue_after_scan(wpa_s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wpa_s->disconnected && wpa_s->scan_req == NORMAL_SCAN_REQ) {
|
if (wpa_s->disconnected && wpa_s->scan_req == NORMAL_SCAN_REQ) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "Disconnected - do not scan");
|
wpa_dbg(wpa_s, MSG_DEBUG, "Disconnected - do not scan");
|
||||||
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
|
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
|
||||||
|
wpas_p2p_continue_after_scan(wpa_s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,9 +546,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
wpa_s->scan_req == NORMAL_SCAN_REQ) {
|
wpa_s->scan_req == NORMAL_SCAN_REQ) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");
|
wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");
|
||||||
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
|
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
|
||||||
#ifdef CONFIG_P2P
|
wpas_p2p_continue_after_scan(wpa_s);
|
||||||
wpa_s->sta_scan_pending = 0;
|
|
||||||
#endif /* CONFIG_P2P */
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1143,6 +1143,7 @@ void wpa_supplicant_cancel_scan(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling scan request");
|
wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling scan request");
|
||||||
eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL);
|
eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL);
|
||||||
|
wpas_p2p_continue_after_scan(wpa_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue