Allow compilation without HS20/INTERWORKING

CONFIG_HS20 and CONFIG_INTERWORKING are used in wpa_supplicant
to enable or disable HotSpot 2.0 or ANQP respectively. These
defines were not checked in AIDL code, which assumed that
HS20 and INTERWORKING were enabled, and fails to compile when
they are disabled.

This patch compiles out the functions that require HS20 and
INTERWORKING when they are not enabled in android.config.

Upstream from Meta.

Test: Modify android.config and build for all configurations of
CONFIG_HS20 and CONFIG_INTERWORKING. WiFi continues to work fine.

Bug: 280661640

Signed-off-by: Sam Gao <ssgao@meta.com>

Change-Id: Ib95b798ea80c375f6922b4b46576578ad7c112c2
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 9a459c2..1b7c7dc 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -1627,6 +1627,7 @@
 	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++) {
@@ -1646,6 +1647,7 @@
 			cred->roaming_consortiums_len[i];
 		break;
 	}
+#endif /* CONFIG_HS20 */
 
 	if (cred->eap_method == NULL) {
 		wpa_msg(wpa_s, MSG_DEBUG,