|
@@ -2544,7 +2544,13 @@ int wpas_mac_addr_rand_scan_set(struct wpa_supplicant *wpa_s,
|
|
|
|
|
|
int wpas_abort_ongoing_scan(struct wpa_supplicant *wpa_s)
|
|
|
{
|
|
|
- if (wpa_s->scan_work && wpa_s->own_scan_running) {
|
|
|
+ int scan_work = !!wpa_s->scan_work;
|
|
|
+
|
|
|
+#ifdef CONFIG_P2P
|
|
|
+ scan_work |= !!wpa_s->p2p_scan_work;
|
|
|
+#endif /* CONFIG_P2P */
|
|
|
+
|
|
|
+ if (scan_work && wpa_s->own_scan_running) {
|
|
|
wpa_dbg(wpa_s, MSG_DEBUG, "Abort an ongoing scan");
|
|
|
return wpa_drv_abort_scan(wpa_s);
|
|
|
}
|