diff --git a/wpa_supplicant/aidl/aidl_manager.cpp b/wpa_supplicant/aidl/aidl_manager.cpp index 89b5432b..f23ba931 100644 --- a/wpa_supplicant/aidl/aidl_manager.cpp +++ b/wpa_supplicant/aidl/aidl_manager.cpp @@ -773,6 +773,7 @@ int AidlManager::notifyNetworkRequest( return 1; } +#ifdef CONFIG_INTERWORKING /** * Notify that the AT_PERMANENT_ID_REQ is denied from eap_peer when the strict * conservative peer mode is enabled. @@ -843,6 +844,7 @@ void AidlManager::notifyAnqpQueryDone( } } +#ifdef CONFIG_HS20 aidl_hs20_anqp_data.operatorFriendlyName = misc_utils::convertWpaBufToVector( anqp->hs20_operator_friendly_name); @@ -854,6 +856,16 @@ void AidlManager::notifyAnqpQueryDone( aidl_hs20_anqp_data.osuProvidersList = misc_utils::convertWpaBufToVector( anqp->hs20_osu_providers_list); +#else + aidl_hs20_anqp_data.operatorFriendlyName = + misc_utils::convertWpaBufToVector(NULL); + aidl_hs20_anqp_data.wanMetrics = + misc_utils::convertWpaBufToVector(NULL); + aidl_hs20_anqp_data.connectionCapability = + misc_utils::convertWpaBufToVector(NULL); + aidl_hs20_anqp_data.osuProvidersList = + misc_utils::convertWpaBufToVector(NULL); +#endif /* CONFIG_HS20 */ } callWithEachStaIfaceCallback( @@ -862,6 +874,7 @@ void AidlManager::notifyAnqpQueryDone( std::placeholders::_1, macAddrToVec(bssid), aidl_anqp_data, aidl_hs20_anqp_data)); } +#endif /* CONFIG_INTERWORKING */ /** * Notify all listeners about the end of an HS20 icon query. diff --git a/wpa_supplicant/aidl/sta_iface.cpp b/wpa_supplicant/aidl/sta_iface.cpp index 238a0924..fe56c21c 100644 --- a/wpa_supplicant/aidl/sta_iface.cpp +++ b/wpa_supplicant/aidl/sta_iface.cpp @@ -1087,6 +1087,7 @@ ndk::ScopedAStatus StaIface::initiateAnqpQueryInternal( if (info_elements.size() > kMaxAnqpElems) { return createStatus(SupplicantStatusCode::FAILURE_ARGS_INVALID); } +#ifdef CONFIG_INTERWORKING uint16_t info_elems_buf[kMaxAnqpElems]; uint32_t num_info_elems = 0; for (const auto &info_element : info_elements) { @@ -1110,11 +1111,15 @@ ndk::ScopedAStatus StaIface::initiateAnqpQueryInternal( return createStatus(SupplicantStatusCode::FAILURE_UNKNOWN); } return ndk::ScopedAStatus::ok(); +#else + return createStatus(SupplicantStatusCode::FAILURE_UNSUPPORTED); +#endif /* CONFIG_INTERWORKING */ } ndk::ScopedAStatus StaIface::initiateVenueUrlAnqpQueryInternal( const std::vector &mac_address) { +#ifdef CONFIG_INTERWORKING struct wpa_supplicant *wpa_s = retrieveIfacePtr(); uint16_t info_elems_buf[1] = {ANQP_VENUE_URL}; if (mac_address.size() != ETH_ALEN) { @@ -1126,11 +1131,15 @@ ndk::ScopedAStatus StaIface::initiateVenueUrlAnqpQueryInternal( return createStatus(SupplicantStatusCode::FAILURE_UNKNOWN); } return ndk::ScopedAStatus::ok(); +#else + return createStatus(SupplicantStatusCode::FAILURE_UNSUPPORTED); +#endif /* CONFIG_INTERWORKING */ } ndk::ScopedAStatus StaIface::initiateHs20IconQueryInternal( const std::vector &mac_address, const std::string &file_name) { +#ifdef CONFIG_HS20 struct wpa_supplicant *wpa_s = retrieveIfacePtr(); if (mac_address.size() != ETH_ALEN) { return createStatus(SupplicantStatusCode::FAILURE_UNKNOWN); @@ -1143,6 +1152,9 @@ ndk::ScopedAStatus StaIface::initiateHs20IconQueryInternal( return createStatus(SupplicantStatusCode::FAILURE_UNKNOWN); } return ndk::ScopedAStatus::ok(); +#else + return createStatus(SupplicantStatusCode::FAILURE_UNSUPPORTED); +#endif /* CONFIG_HS20 */ } std::pair, ndk::ScopedAStatus> diff --git a/wpa_supplicant/aidl/sta_network.cpp b/wpa_supplicant/aidl/sta_network.cpp index e245247b..bb3045c8 100644 --- a/wpa_supplicant/aidl/sta_network.cpp +++ b/wpa_supplicant/aidl/sta_network.cpp @@ -1420,12 +1420,16 @@ ndk::ScopedAStatus StaNetwork::setIdStrInternal(const std::string &id_str) ndk::ScopedAStatus StaNetwork::setUpdateIdentifierInternal(uint32_t id) { +#ifdef CONFIG_HS20 struct wpa_ssid *wpa_ssid = retrieveNetworkPtr(); wpa_ssid->update_identifier = id; wpa_printf( MSG_MSGDUMP, "update_identifier: %d", wpa_ssid->update_identifier); resetInternalStateAfterParamsUpdate(); return ndk::ScopedAStatus::ok(); +#else + return createStatusWithMsg(SupplicantStatusCode::FAILURE_UNKNOWN, "Not implemented"); +#endif /* CONFIG_HS20 */ } ndk::ScopedAStatus StaNetwork::setWapiCertSuiteInternal(const std::string &suite) @@ -2301,6 +2305,7 @@ StaNetwork::getPairwiseCipherInternal() ndk::ScopedAStatus StaNetwork::setRoamingConsortiumSelectionInternal( const std::vector &selectedRcoi) { +#ifdef CONFIG_HS20 struct wpa_ssid *wpa_ssid = retrieveNetworkPtr(); if (wpa_ssid == NULL) { return createStatus(SupplicantStatusCode::FAILURE_NETWORK_INVALID); @@ -2316,6 +2321,9 @@ ndk::ScopedAStatus StaNetwork::setRoamingConsortiumSelectionInternal( resetInternalStateAfterParamsUpdate(); return ndk::ScopedAStatus::ok(); +#else + return createStatusWithMsg(SupplicantStatusCode::FAILURE_UNKNOWN, "Not implemented"); +#endif /* CONFIG_HS20 */ } /** diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 4d0fc638..cb1165e9 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -1661,6 +1661,7 @@ static int interworking_connect_roaming_consortium( if (interworking_set_hs20_params(wpa_s, ssid) < 0) goto fail; +#ifdef CONFIG_HS20 ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM); anqp = bss->anqp ? bss->anqp->roaming_consortium : NULL; for (i = 0; (ie || anqp) && i < cred->num_roaming_consortiums; i++) { @@ -1679,6 +1680,7 @@ static int interworking_connect_roaming_consortium( cred->roaming_consortiums_len[i]; break; } +#endif /* CONFIG_HS20 */ if (cred->eap_method == NULL) { wpa_msg(wpa_s, MSG_DEBUG,