diff options
author | Daisuke Niwa <daisuke.x.niwa@sonymobile.com> | 2017-05-23 20:05:40 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-23 20:05:40 +0000 |
commit | 973b60a4b7378505960457cf5fab070f85c47c71 (patch) | |
tree | 4eed27d199bddb2c694809f67f146abbb399d325 | |
parent | b77f4c6ed5d4d598963f344530fac74dfd673882 (diff) | |
parent | 7a3998d9441af108e589afddd367762c4ef20f1b (diff) | |
download | wpa_supplicant_8-973b60a4b7378505960457cf5fab070f85c47c71.tar.gz |
wpa_supplicant(hidl): Support WPS PBC for GO
am: 7a3998d944
Change-Id: I9a6ef32f44c139feeb2551f79345089ccf6d6f06
-rw-r--r-- | wpa_supplicant/hidl/1.0/p2p_iface.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/hidl/1.0/p2p_iface.cpp b/wpa_supplicant/hidl/1.0/p2p_iface.cpp index 9a048eb5..839fceee 100644 --- a/wpa_supplicant/hidl/1.0/p2p_iface.cpp +++ b/wpa_supplicant/hidl/1.0/p2p_iface.cpp @@ -2,6 +2,7 @@ * hidl interface for wpa_supplicant daemon * Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi> * Copyright (c) 2004-2016, Roshan Pius <rpius@google.com> + * Copyright (C) 2017 Sony Mobile Communications Inc. * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -14,6 +15,7 @@ #include "p2p_iface.h" extern "C" { +#include "ap.h" #include "wps_supplicant.h" #include "wifi_display.h" } @@ -1035,6 +1037,14 @@ SupplicantStatus P2pIface::startWpsPbcInternal( } const uint8_t* bssid_addr = is_zero_ether_addr(bssid.data()) ? nullptr : bssid.data(); +#ifdef CONFIG_AP + if (wpa_group_s->ap_iface) { + if (wpa_supplicant_ap_wps_pbc(wpa_group_s, bssid_addr, NULL)) { + return {SupplicantStatusCode::FAILURE_UNKNOWN, ""}; + } + return {SupplicantStatusCode::SUCCESS, ""}; + } +#endif /* CONFIG_AP */ if (wpas_wps_start_pbc(wpa_group_s, bssid_addr, 0)) { return {SupplicantStatusCode::FAILURE_UNKNOWN, ""}; } |