blob: 119f66ef6809fd1eddd5bd385da22b89ff555400 [file] [log] [blame]
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_applicable_licenses: [
"external_wpa_supplicant_8_license",
"external_wpa_supplicant_8_hostapd_license",
],
}
license {
name: "external_wpa_supplicant_8_hostapd_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD-3-Clause",
"SPDX-license-identifier-ISC",
"legacy_unencumbered",
],
}
cc_library_headers {
name: "hostapd_headers",
export_include_dirs: [
".",
"src",
"src/utils",
],
soc_specific: true,
}
cc_defaults {
name: "hostapd_defaults",
defaults: ["hostapd_cflags_defaults"],
srcs: [":hostapd_srcs"],
shared_libs: [
"android.hardware.wifi.hostapd-V2-ndk",
"libbase",
"libutils",
"libbinder_ndk",
"libc",
"libcutils",
"liblog",
"libcrypto",
"libssl",
"libnl",
],
relative_install_path: "hw",
soc_specific: true,
static_libs: [
"libhostapd_aidl_bp",
],
header_libs: [
"hostapd_headers",
"libhostapd_aidl_headers",
],
}
soong_config_module_type {
name: "hostapd_cflags_cc_defaults",
module_type: "cc_defaults",
config_namespace: "hostapd",
value_variables: [
"platform_version",
"nl80211_driver",
],
properties: ["cflags"],
}
hostapd_cflags_cc_defaults {
name: "hostapd_cflags_defaults",
soong_config_variables: {
// Devices that include this module should set these soong config vars appropriately.
// For example:
// $(call add_soong_config_namespace, wpa_supplicant)
// $(call add_soong_config_var_value, wpa_supplicant, platform_version, $(PLATFORM_VERSION))
// $(call add_soong_config_var_value, wpa_supplicant, nl80211_driver, CONFIG_DRIVER_NL80211_QCA)
platform_version: {
cflags: ["-DVERSION_STR_POSTFIX=\"-%s\""],
conditions_default: {
// Default value
cflags: ["-DVERSION_STR_POSTFIX=\"-Android\""],
},
},
nl80211_driver: {
cflags: ["-D%s"],
// Flag is optional, so no default value provided.
},
},
// Generated by building hostapd and printing LOCAL_CFLAGS.
cflags: [
"-DWPA_IGNORE_CONFIG_ERRORS",
"-DANDROID_LOG_NAME=\"hostapd\"",
"-DANDROID_P2P",
"-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\"",
"-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\"",
"-DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/vendor/wifi/hostapd\"",
"-DHOSTAPD",
"-DHOSTAPD_DUMP_STATE",
"-DCONFIG_NO_RADIUS",
"-DCONFIG_NO_ACCOUNTING",
"-DCONFIG_CTRL_IFACE",
"-DCONFIG_CTRL_IFACE_UNIX",
"-DCONFIG_SUITEB",
"-DCONFIG_SUITEB192",
"-DCONFIG_IEEE80211R",
"-DCONFIG_IEEE80211R_AP",
"-DCONFIG_ETH_P_OUI",
"-DCONFIG_SAE",
"-DCONFIG_SAE_PK",
"-DCONFIG_OWE",
"-DCONFIG_FILS",
"-DCONFIG_WNM",
"-DCONFIG_WNM_AP",
"-DCONFIG_IEEE80211AC",
"-DCONFIG_MBO",
"-DCONFIG_WEP",
"-DCONFIG_DRIVER_NL80211",
"-DEAP_SERVER_MD5",
"-DEAP_SERVER_TLS",
"-DEAP_SERVER_PEAP",
"-DEAP_SERVER_TTLS",
"-DEAP_SERVER_MSCHAPV2",
"-DEAP_SERVER_GTC",
"-DEAP_SERVER_SIM",
"-DEAP_SERVER_AKA",
"-DEAP_SERVER_AKA_PRIME",
"-DEAP_SERVER_PWD",
"-DCONFIG_WPS",
"-DEAP_SERVER_WSC",
"-DCONFIG_WPS_NFC",
"-DCONFIG_WPS_OOB",
"-DCONFIG_DPP",
"-DCONFIG_DPP2",
"-DEAP_SERVER_IDENTITY",
"-DEAP_SERVER",
"-DPKCS12_FUNCS",
"-DEAP_TLS_FUNCS",
"-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"",
"-DCONFIG_SHA256",
"-DCONFIG_SHA384",
"-DCONFIG_SHA512",
"-DCONFIG_ECC",
"-DCONFIG_NO_RANDOM_POOL",
"-DCONFIG_IPV6",
"-DCONFIG_JSON",
"-DNEED_AP_MLME",
"-DCONFIG_HS20",
"-DCONFIG_INTERWORKING",
"-DCONFIG_PROXYARP",
"-DCONFIG_ACS",
"-DCONFIG_ANDROID_LOG",
"-DCONFIG_CTRL_IFACE_AIDL",
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-Wno-unused-variable",
"-Wno-macro-redefined",
],
// Similar to suppressing clang compiler warnings, here we
// suppress clang-tidy warnings to reduce noises in Android build.log.
tidy_checks: [
"-android-cloexec-*",
"-bugprone-branch-clone",
"-bugprone-macro-parentheses",
"-bugprone-misplaced-widening-cast",
"-bugprone-signal-handler",
"-bugprone-signed-char-misuse",
"-bugprone-sizeof-expression",
"-bugprone-suspicious-string-compare",
"-bugprone-too-small-loop-variable",
"-cert-err34-c",
"-cert-msc30-c",
"-cert-msc50-cpp",
"-cert-msc54-cpp",
"-cert-sig30-c",
"-cert-str34-c",
"-clang-analyzer-core.NullDereference",
"-clang-analyzer-core.UndefinedBinaryOperatorResult",
"-clang-analyzer-deadcode.DeadStores",
"-clang-analyzer-optin.performance.Padding",
"-clang-analyzer-optin.portability.UnixAPI",
"-clang-analyzer-security.insecureAPI.UncheckedReturn",
"-clang-analyzer-unix.cstring.NullArg",
"-clang-analyzer-unix.Malloc",
"-clang-diagnostic-unused-but-set-variable",
"-misc-redundant-expression",
],
}
// Generated by building hostapd and printing LOCAL_SRC_FILES.
filegroup {
name: "hostapd_srcs",
srcs: [
"main.c",
"config_file.c",
"ctrl_iface.c",
"eap_register.c",
"src/ap/hostapd.c",
"src/ap/wpa_auth_glue.c",
"src/ap/drv_callbacks.c",
"src/ap/ap_drv_ops.c",
"src/ap/utils.c",
"src/ap/authsrv.c",
"src/ap/ieee802_1x.c",
"src/ap/ap_config.c",
"src/ap/eap_user_db.c",
"src/ap/ieee802_11_auth.c",
"src/ap/sta_info.c",
"src/ap/wpa_auth.c",
"src/ap/tkip_countermeasures.c",
"src/ap/ap_mlme.c",
"src/ap/wpa_auth_ie.c",
"src/ap/preauth_auth.c",
"src/ap/pmksa_cache_auth.c",
"src/ap/ieee802_11_shared.c",
"src/ap/beacon.c",
"src/ap/bss_load.c",
"src/ap/neighbor_db.c",
"src/ap/rrm.c",
"src/drivers/drivers.c",
"src/utils/eloop.c",
"src/utils/common.c",
"src/utils/wpa_debug.c",
"src/utils/wpabuf.c",
"src/utils/os_unix.c",
"src/utils/ip_addr.c",
"src/utils/crc32.c",
"src/common/ieee802_11_common.c",
"src/common/wpa_common.c",
"src/common/hw_features_common.c",
"src/eapol_auth/eapol_auth_sm.c",
"src/eapol_auth/eapol_auth_dump.c",
"src/ap/vlan_init.c",
"src/ap/vlan_ifconfig.c",
"src/ap/vlan.c",
"src/common/ctrl_iface_common.c",
"src/ap/ctrl_iface_ap.c",
"src/ap/wpa_auth_ft.c",
"src/ap/eth_p_oui.c",
"src/common/sae.c",
"src/common/sae_pk.c",
"src/ap/fils_hlp.c",
"src/ap/wnm_ap.c",
"src/ap/mbo_ap.c",
"src/drivers/driver_nl80211.c",
"src/drivers/driver_nl80211_android.c",
"src/drivers/driver_nl80211_capa.c",
"src/drivers/driver_nl80211_event.c",
"src/drivers/driver_nl80211_monitor.c",
"src/drivers/driver_nl80211_scan.c",
"src/drivers/netlink.c",
"src/drivers/rfkill.c",
"src/utils/radiotap.c",
"src/drivers/linux_ioctl.c",
"src/l2_packet/l2_packet_linux.c",
"src/eap_server/eap_server_md5.c",
"src/eap_server/eap_server_tls.c",
"src/eap_server/eap_server_peap.c",
"src/eap_common/eap_peap_common.c",
"src/eap_server/eap_server_ttls.c",
"src/eap_server/eap_server_mschapv2.c",
"src/eap_server/eap_server_gtc.c",
"src/eap_server/eap_server_sim.c",
"src/eap_server/eap_server_aka.c",
"src/eap_common/eap_sim_common.c",
"src/eap_server/eap_sim_db.c",
"src/eap_server/eap_server_pwd.c",
"src/eap_common/eap_pwd_common.c",
"src/utils/uuid.c",
"src/ap/wps_hostapd.c",
"src/eap_server/eap_server_wsc.c",
"src/eap_common/eap_wsc_common.c",
"src/wps/wps.c",
"src/wps/wps_common.c",
"src/wps/wps_attr_parse.c",
"src/wps/wps_attr_build.c",
"src/wps/wps_attr_process.c",
"src/wps/wps_dev_attr.c",
"src/wps/wps_enrollee.c",
"src/wps/wps_registrar.c",
"src/wps/ndef.c",
"src/common/dpp.c",
"src/common/dpp_auth.c",
"src/common/dpp_backup.c",
"src/common/dpp_crypto.c",
"src/common/dpp_pkex.c",
"src/common/dpp_reconfig.c",
"src/common/dpp_tcp.c",
"src/ap/dpp_hostapd.c",
"src/ap/gas_query_ap.c",
"src/eap_server/eap_server.c",
"src/eap_common/eap_common.c",
"src/eap_server/eap_server_methods.c",
"src/eap_server/eap_server_identity.c",
"src/common/dragonfly.c",
"src/crypto/ms_funcs.c",
"src/eap_common/chap.c",
"src/eap_server/eap_server_tls_common.c",
"src/crypto/tls_openssl.c",
"src/crypto/tls_openssl_ocsp.c",
"src/crypto/crypto_openssl.c",
"src/crypto/fips_prf_openssl.c",
"src/crypto/aes-siv.c",
"src/crypto/aes-ctr.c",
"src/crypto/sha1-prf.c",
"src/crypto/sha1-tlsprf.c",
"src/crypto/sha256-prf.c",
"src/crypto/sha256-tlsprf.c",
"src/crypto/sha256-kdf.c",
"src/crypto/sha384-kdf.c",
"src/crypto/sha512-kdf.c",
"src/crypto/sha384-prf.c",
"src/crypto/sha512-prf.c",
"src/tls/asn1.c",
"src/crypto/dh_groups.c",
"src/utils/base64.c",
"src/utils/json.c",
"src/ap/wmm.c",
"src/ap/ap_list.c",
"src/ap/comeback_token.c",
"src/pasn/pasn_responder.c",
"src/ap/ieee802_11.c",
"src/ap/hw_features.c",
"src/ap/dfs.c",
"src/ap/ieee802_11_ht.c",
"src/ap/ieee802_11_vht.c",
"src/ap/hs20.c",
"src/common/gas.c",
"src/ap/gas_serv.c",
"src/ap/x_snoop.c",
"src/ap/dhcp_snoop.c",
"src/ap/ndisc_snoop.c",
"src/drivers/driver_common.c",
"src/ap/acs.c",
],
}
// This manifest can used by a vendor apex module for hostapd as well.
filegroup {
name: "android.hardware.wifi.hostapd.xml",
srcs: ["android.hardware.wifi.hostapd.xml"],
}