wpa_supplicant(hidl): P2P Iface implementation
Implementation of the methods exposed in the ISupplicantP2pIface hidl
interface. This is a subset of all the P2P control parameters exposed by
wpa_supplicant used by Android framework. So, many of the internal
methods calls are invoked with default values retrieved from
ctrl_iface.c (old socket interface).
Bug: 31497295
Test: Compiles
Change-Id: I5077419fb38e3c5b9162139127caea4487d5777e
diff --git a/wpa_supplicant/hidl/supplicant.cpp b/wpa_supplicant/hidl/supplicant.cpp
index aba4402..409547f 100644
--- a/wpa_supplicant/hidl/supplicant.cpp
+++ b/wpa_supplicant/hidl/supplicant.cpp
@@ -165,7 +165,15 @@
SupplicantStatus Supplicant::setConcurrencyPriorityInternal(IfaceType type)
{
- // TODO: Add implementation.
+ if (type == IfaceType::STA) {
+ wpa_global_->conc_pref =
+ wpa_global::wpa_conc_pref::WPA_CONC_PREF_STA;
+ } else if (type == IfaceType::P2P) {
+ wpa_global_->conc_pref =
+ wpa_global::wpa_conc_pref::WPA_CONC_PREF_P2P;
+ } else {
+ return {SupplicantStatusCode::FAILURE_ARGS_INVALID, ""};
+ }
return SupplicantStatus{SupplicantStatusCode::SUCCESS, ""};
}
} // namespace implementation