wifi: use 1.4 supplicant status to return unsupported code

Bug: 160642415
Test: build
Change-Id: Ib69bc279c8661f757f352905e09fd3e5bd78cf69
diff --git a/wpa_supplicant/hidl/1.4/hidl_return_util.h b/wpa_supplicant/hidl/1.4/hidl_return_util.h
index d285164..217f215 100644
--- a/wpa_supplicant/hidl/1.4/hidl_return_util.h
+++ b/wpa_supplicant/hidl/1.4/hidl_return_util.h
@@ -17,7 +17,6 @@
 namespace V1_4 {
 namespace implementation {
 namespace hidl_return_util {
-using V1_0::SupplicantStatusCode;
 
 /**
  * These utility functions are used to invoke a method on the provided
@@ -30,10 +29,11 @@
  * provided error status and default values.
  */
 // Use for HIDL methods which return only an instance of SupplicantStatus.
-template <typename ObjT, typename WorkFuncT, typename... Args>
+template <typename ObjT, typename SupplicantStatusCodeT, typename WorkFuncT,
+    typename SupplicantStatusT, typename... Args>
 Return<void> validateAndCall(
-    ObjT* obj, SupplicantStatusCode status_code_if_invalid, WorkFuncT&& work,
-    const std::function<void(const SupplicantStatus&)>& hidl_cb, Args&&... args)
+    ObjT* obj, SupplicantStatusCodeT status_code_if_invalid, WorkFuncT&& work,
+    const std::function<void(const SupplicantStatusT&)>& hidl_cb, Args&&... args)
 {
 	if (obj->isValid()) {
 		hidl_cb((obj->*work)(std::forward<Args>(args)...));
@@ -45,16 +45,17 @@
 
 // Use for HIDL methods which return instance of SupplicantStatus and a single
 // return value.
-template <typename ObjT, typename WorkFuncT, typename ReturnT, typename... Args>
+template <typename ObjT, typename SupplicantStatusCodeT, typename WorkFuncT,
+    typename SupplicantStatusT, typename ReturnT, typename... Args>
 Return<void> validateAndCall(
-    ObjT* obj, SupplicantStatusCode status_code_if_invalid, WorkFuncT&& work,
-    const std::function<void(const SupplicantStatus&, ReturnT)>& hidl_cb,
+    ObjT* obj, SupplicantStatusCodeT status_code_if_invalid, WorkFuncT&& work,
+    const std::function<void(const SupplicantStatusT&, ReturnT)>& hidl_cb,
     Args&&... args)
 {
 	if (obj->isValid()) {
 		const auto& ret_pair =
 		    (obj->*work)(std::forward<Args>(args)...);
-		const SupplicantStatus& status = std::get<0>(ret_pair);
+		const SupplicantStatusT& status = std::get<0>(ret_pair);
 		const auto& ret_value = std::get<1>(ret_pair);
 		hidl_cb(status, ret_value);
 	} else {
@@ -68,18 +69,18 @@
 // Use for HIDL methods which return instance of SupplicantStatus and 2 return
 // values.
 template <
-    typename ObjT, typename WorkFuncT, typename ReturnT1, typename ReturnT2,
-    typename... Args>
+    typename ObjT, typename SupplicantStatusCodeT, typename WorkFuncT,
+    typename SupplicantStatusT, typename ReturnT1, typename ReturnT2, typename... Args>
 Return<void> validateAndCall(
-    ObjT* obj, SupplicantStatusCode status_code_if_invalid, WorkFuncT&& work,
-    const std::function<void(const SupplicantStatus&, ReturnT1, ReturnT2)>&
+    ObjT* obj, SupplicantStatusCodeT status_code_if_invalid, WorkFuncT&& work,
+    const std::function<void(const SupplicantStatusT&, ReturnT1, ReturnT2)>&
 	hidl_cb,
     Args&&... args)
 {
 	if (obj->isValid()) {
 		const auto& ret_tuple =
 		    (obj->*work)(std::forward<Args>(args)...);
-		const SupplicantStatus& status = std::get<0>(ret_tuple);
+		const SupplicantStatusT& status = std::get<0>(ret_tuple);
 		const auto& ret_value1 = std::get<1>(ret_tuple);
 		const auto& ret_value2 = std::get<2>(ret_tuple);
 		hidl_cb(status, ret_value1, ret_value2);
diff --git a/wpa_supplicant/hidl/1.4/iface_config_utils.cpp b/wpa_supplicant/hidl/1.4/iface_config_utils.cpp
index b10523a..9af3ea9 100644
--- a/wpa_supplicant/hidl/1.4/iface_config_utils.cpp
+++ b/wpa_supplicant/hidl/1.4/iface_config_utils.cpp
@@ -84,6 +84,8 @@
 namespace V1_4 {
 namespace implementation {
 namespace iface_config_utils {
+using V1_0::SupplicantStatusCode;
+
 SupplicantStatus setWpsDeviceName(
     struct wpa_supplicant* wpa_s, const std::string& name)
 {
diff --git a/wpa_supplicant/hidl/1.4/p2p_iface.cpp b/wpa_supplicant/hidl/1.4/p2p_iface.cpp
index 8e1e264..7baffa2 100644
--- a/wpa_supplicant/hidl/1.4/p2p_iface.cpp
+++ b/wpa_supplicant/hidl/1.4/p2p_iface.cpp
@@ -884,14 +884,14 @@
 Return<void> P2pIface::setEdmg(bool enable, setEdmg_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &P2pIface::setEdmgInternal, _hidl_cb, enable);
 }
 
 Return<void> P2pIface::getEdmg(getEdmg_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &P2pIface::getEdmgInternal, _hidl_cb);
 }
 
@@ -1839,19 +1839,19 @@
 	return {SupplicantStatusCode::SUCCESS, ""};
 }
 
-SupplicantStatus P2pIface::setEdmgInternal(bool enable)
+V1_4::SupplicantStatus P2pIface::setEdmgInternal(bool enable)
 {
 	struct wpa_supplicant* wpa_s = retrieveIfacePtr();
 	wpa_printf(MSG_DEBUG, "set p2p_go_edmg to %d", enable);
 	wpa_s->conf->p2p_go_edmg = enable ? 1 : 0;
 	wpa_s->p2p_go_edmg = enable ? 1 : 0;
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
-std::pair<SupplicantStatus, bool> P2pIface::getEdmgInternal()
+std::pair<V1_4::SupplicantStatus, bool> P2pIface::getEdmgInternal()
 {
 	struct wpa_supplicant* wpa_s = retrieveIfacePtr();
-	return {{SupplicantStatusCode::SUCCESS, ""},
+	return {{V1_4::SupplicantStatusCode::SUCCESS, ""},
 		(wpa_s->p2p_go_edmg == 1)};
 }
 
diff --git a/wpa_supplicant/hidl/1.4/p2p_iface.h b/wpa_supplicant/hidl/1.4/p2p_iface.h
index 4a0e60a..1694efe 100644
--- a/wpa_supplicant/hidl/1.4/p2p_iface.h
+++ b/wpa_supplicant/hidl/1.4/p2p_iface.h
@@ -309,8 +309,8 @@
 	    bool persistent, uint32_t freq, const std::array<uint8_t, 6>& peer_address,
 	    bool joinExistingGroup);
 	SupplicantStatus setMacRandomizationInternal(bool enable);
-	SupplicantStatus setEdmgInternal(bool enable);
-	std::pair<SupplicantStatus, bool> getEdmgInternal();
+	V1_4::SupplicantStatus setEdmgInternal(bool enable);
+	std::pair<V1_4::SupplicantStatus, bool> getEdmgInternal();
 
 	struct wpa_supplicant* retrieveIfacePtr();
 	struct wpa_supplicant* retrieveGroupIfacePtr(
diff --git a/wpa_supplicant/hidl/1.4/sta_iface.cpp b/wpa_supplicant/hidl/1.4/sta_iface.cpp
index b2bfa50..40ec870 100644
--- a/wpa_supplicant/hidl/1.4/sta_iface.cpp
+++ b/wpa_supplicant/hidl/1.4/sta_iface.cpp
@@ -228,6 +228,7 @@
 namespace implementation {
 using hidl_return_util::validateAndCall;
 using V1_0::ISupplicantStaIfaceCallback;
+using V1_0::SupplicantStatusCode;
 
 StaIface::StaIface(struct wpa_global *wpa_global, const char ifname[])
     : wpa_global_(wpa_global), ifname_(ifname), is_valid_(true)
@@ -340,12 +341,12 @@
 
 Return<void> StaIface::registerCallback_1_4(
     const sp<V1_4::ISupplicantStaIfaceCallback> &callback,
-    registerCallback_cb _hidl_cb)
+    registerCallback_1_4_cb _hidl_cb)
 {
 	sp<V1_4::ISupplicantStaIfaceCallback> callback_1_4 = callback;
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_IFACE_INVALID,
-	    &StaIface::registerCallbackInternal, _hidl_cb, callback_1_4);
+	    this, V1_4::SupplicantStatusCode::FAILURE_IFACE_INVALID,
+	    &StaIface::registerCallbackInternal_1_4, _hidl_cb, callback_1_4);
 }
 
 Return<void> StaIface::reassociate(reassociate_cb _hidl_cb)
@@ -780,7 +781,7 @@
     getConnectionCapabilities_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_UNKNOWN,
+	    this, V1_4::SupplicantStatusCode::FAILURE_UNKNOWN,
 	    &StaIface::getConnectionCapabilitiesInternal_1_4, _hidl_cb);
 }
 
@@ -831,12 +832,18 @@
 SupplicantStatus StaIface::registerCallbackInternal(
     const sp<ISupplicantStaIfaceCallback> &callback)
 {
+	return {SupplicantStatusCode::FAILURE_UNKNOWN, "deprecated"};
+}
+
+V1_4::SupplicantStatus StaIface::registerCallbackInternal_1_4(
+    const sp<V1_4::ISupplicantStaIfaceCallback> &callback)
+{
 	HidlManager *hidl_manager = HidlManager::getInstance();
 	if (!hidl_manager ||
 	    hidl_manager->addStaIfaceCallbackHidlObject(ifname_, callback)) {
-		return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};
+		return {V1_4::SupplicantStatusCode::FAILURE_UNKNOWN, ""};
 	}
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
 SupplicantStatus StaIface::reassociateInternal()
@@ -1448,7 +1455,7 @@
 	return {{SupplicantStatusCode::FAILURE_UNKNOWN, "deprecated"}, capa};
 }
 
-std::pair<SupplicantStatus, ConnectionCapabilities>
+std::pair<V1_4::SupplicantStatus, ConnectionCapabilities>
 StaIface::getConnectionCapabilitiesInternal_1_4()
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
@@ -1500,7 +1507,7 @@
 		capa.V1_3.maxNumberRxSpatialStreams = 1;
 		capa.legacyMode = LegacyMode::UNKNOWN;
 	}
-	return {{SupplicantStatusCode::SUCCESS, ""}, capa};
+	return {{V1_4::SupplicantStatusCode::SUCCESS, ""}, capa};
 }
 
 std::pair<SupplicantStatus, uint32_t>
diff --git a/wpa_supplicant/hidl/1.4/sta_iface.h b/wpa_supplicant/hidl/1.4/sta_iface.h
index cf3afdd..b6590d3 100644
--- a/wpa_supplicant/hidl/1.4/sta_iface.h
+++ b/wpa_supplicant/hidl/1.4/sta_iface.h
@@ -92,7 +92,7 @@
 	    registerCallback_cb _hidl_cb) override;
 	Return<void> registerCallback_1_4(
 	    const sp<V1_4::ISupplicantStaIfaceCallback> &callback,
-	    registerCallback_cb _hidl_cb) override;
+	    registerCallback_1_4_cb _hidl_cb) override;
 	Return<void> reassociate(reassociate_cb _hidl_cb) override;
 	Return<void> reconnect(reconnect_cb _hidl_cb) override;
 	Return<void> disconnect(disconnect_cb _hidl_cb) override;
@@ -220,6 +220,8 @@
 	    const sp<V1_0::ISupplicantStaIfaceCallback>& callback);
 	SupplicantStatus registerCallbackInternal_1_1(
 	    const sp<V1_1::ISupplicantStaIfaceCallback>& callback);
+	V1_4::SupplicantStatus registerCallbackInternal_1_4(
+	    const sp<V1_4::ISupplicantStaIfaceCallback>& callback);
 	SupplicantStatus reassociateInternal();
 	SupplicantStatus reconnectInternal();
 	SupplicantStatus disconnectInternal();
@@ -288,7 +290,7 @@
 			uint32_t own_bootstrap_id);
 	SupplicantStatus stopDppInitiatorInternal();
 	std::pair<SupplicantStatus, V1_3::ConnectionCapabilities> getConnectionCapabilitiesInternal();
-	std::pair<SupplicantStatus, V1_4::ConnectionCapabilities>
+	std::pair<V1_4::SupplicantStatus, V1_4::ConnectionCapabilities>
 			getConnectionCapabilitiesInternal_1_4();
 	std::pair<SupplicantStatus, uint32_t> getWpaDriverCapabilitiesInternal();
 	SupplicantStatus setMboCellularDataStatusInternal(bool available);
diff --git a/wpa_supplicant/hidl/1.4/sta_network.cpp b/wpa_supplicant/hidl/1.4/sta_network.cpp
index a56c83a..d62fdae 100644
--- a/wpa_supplicant/hidl/1.4/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.4/sta_network.cpp
@@ -113,6 +113,7 @@
 namespace V1_4 {
 namespace implementation {
 using hidl_return_util::validateAndCall;
+using V1_0::SupplicantStatus;
 using V1_0::SupplicantStatusCode;
 
 StaNetwork::StaNetwork(
@@ -164,7 +165,7 @@
     registerCallback_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::registerCallback_1_4Internal, _hidl_cb, callback);
 }
 
@@ -427,7 +428,7 @@
 Return<void> StaNetwork::setEdmg(bool enable, setEdmg_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::setEdmgInternal, _hidl_cb, enable);
 }
 
@@ -662,7 +663,7 @@
 Return<void> StaNetwork::getEdmg(getEdmg_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::getEdmgInternal, _hidl_cb);
 }
 
@@ -961,14 +962,14 @@
     uint32_t group_cipher_mask, setGroupCipher_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::setGroupCipher_1_4Internal, _hidl_cb, group_cipher_mask);
 }
 
 Return<void> StaNetwork::getGroupCipher_1_4(getGroupCipher_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::getGroupCipher_1_4Internal, _hidl_cb);
 }
 
@@ -976,7 +977,7 @@
     uint32_t pairwise_cipher_mask, setPairwiseCipher_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::setPairwiseCipher_1_4Internal, _hidl_cb,
 	    pairwise_cipher_mask);
 }
@@ -985,14 +986,14 @@
     getPairwiseCipher_1_4_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::getPairwiseCipher_1_4Internal, _hidl_cb);
 }
 
 Return<void> StaNetwork::enableSaeH2eOnlyMode(bool enable, enableSaeH2eOnlyMode_cb _hidl_cb)
 {
 	return validateAndCall(
-	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    this, V1_4::SupplicantStatusCode::FAILURE_NETWORK_INVALID,
 	    &StaNetwork::enableSaeH2eOnlyModeInternal, _hidl_cb, enable);
 }
 
@@ -1017,15 +1018,15 @@
 	return {SupplicantStatusCode::FAILURE_UNKNOWN, "deprecated"};
 }
 
-SupplicantStatus StaNetwork::registerCallback_1_4Internal(
+V1_4::SupplicantStatus StaNetwork::registerCallback_1_4Internal(
     const sp<V1_4::ISupplicantStaNetworkCallback> &callback)
 {
 	HidlManager *hidl_manager = HidlManager::getInstance();
 	if (!hidl_manager || hidl_manager->addStaNetworkCallbackHidlObject(
 				 ifname_, network_id_, callback)) {
-		return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};
+		return {V1_4::SupplicantStatusCode::FAILURE_UNKNOWN, ""};
 	}
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
 SupplicantStatus StaNetwork::setSsidInternal(const std::vector<uint8_t> &ssid)
@@ -1102,12 +1103,12 @@
 	return {SupplicantStatusCode::SUCCESS, ""};
 }
 
-SupplicantStatus StaNetwork::setEdmgInternal(bool enable)
+V1_4::SupplicantStatus StaNetwork::setEdmgInternal(bool enable)
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
 	wpa_ssid->enable_edmg = enable ? 1 : 0;
 	resetInternalStateAfterParamsUpdate();
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
 SupplicantStatus StaNetwork::setGroupCipherInternal(uint32_t group_cipher_mask)
@@ -1876,10 +1877,10 @@
 	return {{SupplicantStatusCode::SUCCESS, ""}, {wpa_ssid->id_str}};
 }
 
-std::pair<SupplicantStatus, bool> StaNetwork::getEdmgInternal()
+std::pair<V1_4::SupplicantStatus, bool> StaNetwork::getEdmgInternal()
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	return {{SupplicantStatusCode::SUCCESS, ""},
+	return {{V1_4::SupplicantStatusCode::SUCCESS, ""},
 		(wpa_ssid->enable_edmg == 1)};
 }
 
@@ -2320,43 +2321,43 @@
 	return {{SupplicantStatusCode::FAILURE_UNKNOWN, "deprecated"}, 0};
 }
 
-SupplicantStatus StaNetwork::setGroupCipher_1_4Internal(uint32_t group_cipher_mask)
+V1_4::SupplicantStatus StaNetwork::setGroupCipher_1_4Internal(uint32_t group_cipher_mask)
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
 	if (group_cipher_mask & ~kAllowedGroupCipherMask) {
-		return {SupplicantStatusCode::FAILURE_ARGS_INVALID, ""};
+		return {V1_4::SupplicantStatusCode::FAILURE_ARGS_INVALID, ""};
 	}
 	wpa_ssid->group_cipher = group_cipher_mask;
 	wpa_printf(MSG_MSGDUMP, "group_cipher: 0x%x", wpa_ssid->group_cipher);
 	resetInternalStateAfterParamsUpdate();
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
-std::pair<SupplicantStatus, uint32_t> StaNetwork::getGroupCipher_1_4Internal()
+std::pair<V1_4::SupplicantStatus, uint32_t> StaNetwork::getGroupCipher_1_4Internal()
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	return {{SupplicantStatusCode::SUCCESS, ""},
+	return {{V1_4::SupplicantStatusCode::SUCCESS, ""},
 		wpa_ssid->group_cipher & kAllowedGroupCipherMask};
 }
 
-SupplicantStatus StaNetwork::setPairwiseCipher_1_4Internal(
+V1_4::SupplicantStatus StaNetwork::setPairwiseCipher_1_4Internal(
     uint32_t pairwise_cipher_mask)
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
 	if (pairwise_cipher_mask & ~kAllowedPairwisewCipherMask) {
-		return {SupplicantStatusCode::FAILURE_ARGS_INVALID, ""};
+		return {V1_4::SupplicantStatusCode::FAILURE_ARGS_INVALID, ""};
 	}
 	wpa_ssid->pairwise_cipher = pairwise_cipher_mask;
 	wpa_printf(
 	    MSG_MSGDUMP, "pairwise_cipher: 0x%x", wpa_ssid->pairwise_cipher);
 	resetInternalStateAfterParamsUpdate();
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
-std::pair<SupplicantStatus, uint32_t> StaNetwork::getPairwiseCipher_1_4Internal()
+std::pair<V1_4::SupplicantStatus, uint32_t> StaNetwork::getPairwiseCipher_1_4Internal()
 {
 	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	return {{SupplicantStatusCode::SUCCESS, ""},
+	return {{V1_4::SupplicantStatusCode::SUCCESS, ""},
 		wpa_ssid->pairwise_cipher & kAllowedPairwisewCipherMask};
 }
 
@@ -2607,12 +2608,12 @@
 #endif /* CONFIG_FILS */
 }
 
-SupplicantStatus StaNetwork::enableSaeH2eOnlyModeInternal(bool enable)
+V1_4::SupplicantStatus StaNetwork::enableSaeH2eOnlyModeInternal(bool enable)
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
 	wpa_s->conf->sae_pwe = enable ? SAE_PWE_H2E_ONLY_MODE : SAE_PWE_HP_H2E_BOTH;
 	resetInternalStateAfterParamsUpdate();
-	return {SupplicantStatusCode::SUCCESS, ""};
+	return {V1_4::SupplicantStatusCode::SUCCESS, ""};
 }
 
 }  // namespace implementation
diff --git a/wpa_supplicant/hidl/1.4/sta_network.h b/wpa_supplicant/hidl/1.4/sta_network.h
index aea9c19..b00f8e5 100644
--- a/wpa_supplicant/hidl/1.4/sta_network.h
+++ b/wpa_supplicant/hidl/1.4/sta_network.h
@@ -280,7 +280,7 @@
 	std::pair<SupplicantStatus, IfaceType> getTypeInternal();
 	SupplicantStatus registerCallbackInternal(
 	    const sp<ISupplicantStaNetworkCallback>& callback);
-	SupplicantStatus registerCallback_1_4Internal(
+	V1_4::SupplicantStatus registerCallback_1_4Internal(
 	    const sp<V1_4::ISupplicantStaNetworkCallback>& callback);
 	SupplicantStatus setSsidInternal(const std::vector<uint8_t>& ssid);
 	SupplicantStatus setBssidInternal(const std::array<uint8_t, 6>& bssid);
@@ -323,7 +323,7 @@
 	SupplicantStatus setProactiveKeyCachingInternal(bool enable);
 	SupplicantStatus setIdStrInternal(const std::string& id_str);
 	SupplicantStatus setUpdateIdentifierInternal(uint32_t id);
-	SupplicantStatus setEdmgInternal(bool enable);
+	V1_4::SupplicantStatus setEdmgInternal(bool enable);
 	std::pair<SupplicantStatus, std::vector<uint8_t>> getSsidInternal();
 	std::pair<SupplicantStatus, std::array<uint8_t, 6>> getBssidInternal();
 	std::pair<SupplicantStatus, bool> getScanSsidInternal();
@@ -364,7 +364,7 @@
 	std::pair<SupplicantStatus, std::string> getIdStrInternal();
 	std::pair<SupplicantStatus, std::vector<uint8_t>>
 	getWpsNfcConfigurationTokenInternal();
-	std::pair<SupplicantStatus, bool> getEdmgInternal();
+	std::pair<V1_4::SupplicantStatus, bool> getEdmgInternal();
 	SupplicantStatus enableInternal(bool no_connect);
 	SupplicantStatus disableInternal();
 	SupplicantStatus selectInternal();
@@ -408,12 +408,12 @@
 	    uint32_t pairwise_cipher_mask);
 	SupplicantStatus setWapiPskInternal(const std::vector<uint8_t>& psk);
 	std::pair<SupplicantStatus, std::vector<uint8_t>> getWapiPskInternal();
-	std::pair<SupplicantStatus, uint32_t> getGroupCipher_1_4Internal();
-	SupplicantStatus setGroupCipher_1_4Internal(uint32_t group_cipher_mask);
-	std::pair<SupplicantStatus, uint32_t> getPairwiseCipher_1_4Internal();
-	SupplicantStatus setPairwiseCipher_1_4Internal(
+	std::pair<V1_4::SupplicantStatus, uint32_t> getGroupCipher_1_4Internal();
+	V1_4::SupplicantStatus setGroupCipher_1_4Internal(uint32_t group_cipher_mask);
+	std::pair<V1_4::SupplicantStatus, uint32_t> getPairwiseCipher_1_4Internal();
+	V1_4::SupplicantStatus setPairwiseCipher_1_4Internal(
 	    uint32_t pairwise_cipher_mask);
-	SupplicantStatus enableSaeH2eOnlyModeInternal(bool enable);
+	V1_4::SupplicantStatus enableSaeH2eOnlyModeInternal(bool enable);
 
 	struct wpa_ssid* retrieveNetworkPtr();
 	struct wpa_supplicant* retrieveIfacePtr();