Merge "Default implementation for addGroupWithParams" into main
diff --git a/wpa_supplicant/aidl/p2p_iface.cpp b/wpa_supplicant/aidl/p2p_iface.cpp
index 8c117d3..7afc8a1 100644
--- a/wpa_supplicant/aidl/p2p_iface.cpp
+++ b/wpa_supplicant/aidl/p2p_iface.cpp
@@ -845,6 +845,14 @@
this, SupplicantStatusCode::FAILURE_IFACE_INVALID,
&P2pIface::addGroupWithConfigurationParamsInternal, in_groupConfigurationParams);
}
+
+::ndk::ScopedAStatus P2pIface::createGroupOwner(
+ const P2pCreateGroupOwnerInfo& in_groupOwnerInfo)
+{
+ return validateAndCall(
+ this, SupplicantStatusCode::FAILURE_IFACE_INVALID,
+ &P2pIface::createGroupOwnerInternal, in_groupOwnerInfo);
+}
std::pair<std::string, ndk::ScopedAStatus> P2pIface::getNameInternal()
{
return {ifname_, ndk::ScopedAStatus::ok()};
@@ -1928,6 +1936,13 @@
groupConfigurationParams.joinExistingGroup);
}
+ndk::ScopedAStatus P2pIface::createGroupOwnerInternal(
+ const P2pCreateGroupOwnerInfo& groupOwnerInfo)
+{
+ return addGroupInternal(
+ groupOwnerInfo.persistent, groupOwnerInfo.persistentNetworkId);
+}
+
/**
* Retrieve the underlying |wpa_supplicant| struct
* pointer for this iface.
diff --git a/wpa_supplicant/aidl/p2p_iface.h b/wpa_supplicant/aidl/p2p_iface.h
index 252abc4..98556d1 100644
--- a/wpa_supplicant/aidl/p2p_iface.h
+++ b/wpa_supplicant/aidl/p2p_iface.h
@@ -182,6 +182,8 @@
const P2pExtListenInfo& in_extListenInfo) override;
::ndk::ScopedAStatus addGroupWithConfigurationParams(
const P2pAddGroupConfigurationParams& in_groupConfigurationParams) override;
+ ::ndk::ScopedAStatus createGroupOwner(
+ const P2pCreateGroupOwnerInfo& in_groupOwnerInfo) override;
private:
@@ -312,6 +314,8 @@
ndk::ScopedAStatus configureExtListenWithParamsInternal(const P2pExtListenInfo& extListenInfo);
ndk::ScopedAStatus addGroupWithConfigurationParamsInternal(
const P2pAddGroupConfigurationParams& groupConfigurationParams);
+ ndk::ScopedAStatus createGroupOwnerInternal(
+ const P2pCreateGroupOwnerInfo& groupOwnerInfo);
struct wpa_supplicant* retrieveIfacePtr();
struct wpa_supplicant* retrieveGroupIfacePtr(