aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-12-25 02:13:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-12-25 02:13:54 +0000
commit6a4f8b44e5eb76585dae6e4cf3ce70c5309f2672 (patch)
treec1d1a7b19896d18ca3df54e2d34613850104a5b6
parent5382002c37d7d82f1be6c74928dcc5d76d89590d (diff)
parentb6aaecce75ee949b03da891a6a0c4ad382f7b4ee (diff)
downloadwpa_supplicant_8-6a4f8b44e5eb76585dae6e4cf3ce70c5309f2672.tar.gz
Change-Id: I43b6ba140f6273bf955d42f6bd595828a343fef2
-rw-r--r--wpa_supplicant/hidl/1.2/p2p_iface.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/hidl/1.2/p2p_iface.cpp b/wpa_supplicant/hidl/1.2/p2p_iface.cpp
index 0a6b657d..fd9ce0dc 100644
--- a/wpa_supplicant/hidl/1.2/p2p_iface.cpp
+++ b/wpa_supplicant/hidl/1.2/p2p_iface.cpp
@@ -225,7 +225,7 @@ int joinScanReq(
size_t ielen;
unsigned int bands;
- if (!wpa_s->global->p2p) {
+ if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {
wpa_printf(MSG_ERROR,
"P2P: P2P interface is gone, cancel join scan");
return -ENXIO;
@@ -1634,7 +1634,7 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(
int vht = wpa_s->conf->p2p_go_vht;
int ht40 = wpa_s->conf->p2p_go_ht40 || vht;
- if (wpa_s->global->p2p == NULL) {
+ if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {
return {SupplicantStatusCode::FAILURE_IFACE_DISABLED, ""};
}
@@ -1691,6 +1691,9 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(
pending_join_scan_callback =
[wpa_s, ssid, freq]() {
+ if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {
+ return;
+ }
int ret = joinScanReq(wpa_s, ssid, freq);
// for BUSY case, the scan might be occupied by WiFi.
// Do not give up immediately, but try again later.
@@ -1707,7 +1710,7 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(
};
pending_scan_res_join_callback = [wpa_s, ssid, passphrase, peer_address, this]() {
- if (wpa_s->global->p2p_disabled) {
+ if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {
return;
}