diff options
-rw-r--r-- | wpa_supplicant/hidl/1.0/p2p_iface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wpa_supplicant/hidl/1.0/p2p_iface.cpp b/wpa_supplicant/hidl/1.0/p2p_iface.cpp index 252266ba..40b4b9cd 100644 --- a/wpa_supplicant/hidl/1.0/p2p_iface.cpp +++ b/wpa_supplicant/hidl/1.0/p2p_iface.cpp @@ -682,6 +682,7 @@ std::pair<SupplicantStatus, std::string> P2pIface::connectInternal( if (go_intent > 15) { return {{SupplicantStatusCode::FAILURE_ARGS_INVALID, ""}, {}}; } + int go_intent_signed = join_existing_group ? -1 : go_intent; p2p_wps_method wps_method = {}; switch (provision_method) { case WpsProvisionMethod::PBC: @@ -694,9 +695,10 @@ std::pair<SupplicantStatus, std::string> P2pIface::connectInternal( wps_method = WPS_PIN_KEYPAD; break; } + const char* pin = pre_selected_pin.length() > 0 ? pre_selected_pin.data() : nullptr; int new_pin = wpas_p2p_connect( - wpa_s, peer_address.data(), pre_selected_pin.data(), wps_method, - persistent, false, join_existing_group, false, go_intent, 0, 0, -1, + wpa_s, peer_address.data(), pin, wps_method, + persistent, false, join_existing_group, false, go_intent_signed, 0, 0, -1, false, false, false, VHT_CHANWIDTH_USE_HT, nullptr, 0); if (new_pin < 0) { return {{SupplicantStatusCode::FAILURE_UNKNOWN, ""}, {}}; |