Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 1 | // Copyright (C) 2021 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package { |
| 16 | default_applicable_licenses: [ |
| 17 | "external_wpa_supplicant_8_license", |
| 18 | "external_wpa_supplicant_8_hostapd_license", |
| 19 | ], |
| 20 | } |
| 21 | |
| 22 | license { |
| 23 | name: "external_wpa_supplicant_8_hostapd_license", |
| 24 | visibility: [":__subpackages__"], |
| 25 | license_kinds: [ |
| 26 | "SPDX-license-identifier-BSD-3-Clause", |
| 27 | "SPDX-license-identifier-ISC", |
| 28 | "legacy_unencumbered", |
| 29 | ], |
| 30 | } |
| 31 | |
| 32 | cc_library_headers { |
| 33 | name: "hostapd_headers", |
| 34 | export_include_dirs: [ |
| 35 | ".", |
| 36 | "src", |
| 37 | "src/utils", |
| 38 | ], |
| 39 | soc_specific: true, |
| 40 | } |
| 41 | |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 42 | cc_defaults { |
| 43 | name: "hostapd_defaults", |
| 44 | defaults: ["hostapd_cflags_defaults"], |
| 45 | srcs: [":hostapd_srcs"], |
| 46 | shared_libs: [ |
Les Lee | 36412a5 | 2024-09-06 18:31:55 +0000 | [diff] [blame] | 47 | "android.hardware.wifi.hostapd-V3-ndk", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 48 | "libbase", |
| 49 | "libutils", |
| 50 | "libbinder_ndk", |
| 51 | "libc", |
| 52 | "libcutils", |
| 53 | "liblog", |
| 54 | "libcrypto", |
| 55 | "libssl", |
| 56 | "libnl", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 57 | ], |
| 58 | relative_install_path: "hw", |
| 59 | soc_specific: true, |
| 60 | static_libs: [ |
| 61 | "libhostapd_aidl_bp", |
| 62 | ], |
| 63 | header_libs: [ |
| 64 | "hostapd_headers", |
| 65 | "libhostapd_aidl_headers", |
| 66 | ], |
| 67 | } |
| 68 | |
Cole Faust | 0b99b52 | 2024-08-20 15:34:57 -0700 | [diff] [blame] | 69 | cc_defaults { |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 70 | name: "hostapd_cflags_defaults", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 71 | // Generated by building hostapd and printing LOCAL_CFLAGS. |
| 72 | cflags: [ |
| 73 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 74 | "-DANDROID_LOG_NAME=\"hostapd\"", |
| 75 | "-DANDROID_P2P", |
| 76 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\"", |
| 77 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\"", |
| 78 | "-DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/vendor/wifi/hostapd\"", |
| 79 | "-DHOSTAPD", |
| 80 | "-DHOSTAPD_DUMP_STATE", |
| 81 | "-DCONFIG_NO_RADIUS", |
| 82 | "-DCONFIG_NO_ACCOUNTING", |
| 83 | "-DCONFIG_CTRL_IFACE", |
| 84 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 85 | "-DCONFIG_SUITEB", |
| 86 | "-DCONFIG_SUITEB192", |
| 87 | "-DCONFIG_IEEE80211R", |
| 88 | "-DCONFIG_IEEE80211R_AP", |
| 89 | "-DCONFIG_ETH_P_OUI", |
| 90 | "-DCONFIG_SAE", |
| 91 | "-DCONFIG_SAE_PK", |
| 92 | "-DCONFIG_OWE", |
| 93 | "-DCONFIG_FILS", |
| 94 | "-DCONFIG_WNM", |
| 95 | "-DCONFIG_WNM_AP", |
| 96 | "-DCONFIG_IEEE80211AC", |
| 97 | "-DCONFIG_MBO", |
| 98 | "-DCONFIG_WEP", |
| 99 | "-DCONFIG_DRIVER_NL80211", |
| 100 | "-DEAP_SERVER_MD5", |
| 101 | "-DEAP_SERVER_TLS", |
| 102 | "-DEAP_SERVER_PEAP", |
| 103 | "-DEAP_SERVER_TTLS", |
| 104 | "-DEAP_SERVER_MSCHAPV2", |
| 105 | "-DEAP_SERVER_GTC", |
| 106 | "-DEAP_SERVER_SIM", |
| 107 | "-DEAP_SERVER_AKA", |
| 108 | "-DEAP_SERVER_AKA_PRIME", |
| 109 | "-DEAP_SERVER_PWD", |
| 110 | "-DCONFIG_WPS", |
| 111 | "-DEAP_SERVER_WSC", |
| 112 | "-DCONFIG_WPS_NFC", |
| 113 | "-DCONFIG_WPS_OOB", |
| 114 | "-DCONFIG_DPP", |
| 115 | "-DCONFIG_DPP2", |
| 116 | "-DEAP_SERVER_IDENTITY", |
| 117 | "-DEAP_SERVER", |
| 118 | "-DPKCS12_FUNCS", |
| 119 | "-DEAP_TLS_FUNCS", |
| 120 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 121 | "-DCONFIG_SHA256", |
| 122 | "-DCONFIG_SHA384", |
| 123 | "-DCONFIG_SHA512", |
| 124 | "-DCONFIG_ECC", |
| 125 | "-DCONFIG_NO_RANDOM_POOL", |
| 126 | "-DCONFIG_IPV6", |
| 127 | "-DCONFIG_JSON", |
| 128 | "-DNEED_AP_MLME", |
| 129 | "-DCONFIG_HS20", |
| 130 | "-DCONFIG_INTERWORKING", |
| 131 | "-DCONFIG_PROXYARP", |
| 132 | "-DCONFIG_ACS", |
| 133 | "-DCONFIG_ANDROID_LOG", |
| 134 | "-DCONFIG_CTRL_IFACE_AIDL", |
| 135 | "-Wall", |
| 136 | "-Werror", |
| 137 | "-Wno-unused-parameter", |
| 138 | "-Wno-unused-variable", |
| 139 | "-Wno-macro-redefined", |
Cole Faust | 0b99b52 | 2024-08-20 15:34:57 -0700 | [diff] [blame] | 140 | ] + |
| 141 | // Devices that include this module should set these soong config vars appropriately. |
| 142 | // For example: |
| 143 | // $(call soong_config_set, hostapd, platform_version, $(PLATFORM_VERSION)) |
| 144 | // $(call soong_config_set, hostapd, nl80211_driver, CONFIG_DRIVER_NL80211_QCA) |
| 145 | select(soong_config_variable("hostapd", "platform_version"), { |
| 146 | any @ version: ["-DVERSION_STR_POSTFIX=\"-" + version + "\""], |
| 147 | default: ["-DVERSION_STR_POSTFIX=\"-Android\""], |
| 148 | }) + |
| 149 | select(soong_config_variable("hostapd", "nl80211_driver"), { |
| 150 | any @ driver: ["-D" + driver], |
| 151 | // Flag is optional, so no default value provided. |
| 152 | default: [], |
| 153 | }), |
| 154 | |
Chih-Hung Hsieh | f3cee1d | 2022-12-02 13:06:22 -0800 | [diff] [blame] | 155 | // Similar to suppressing clang compiler warnings, here we |
| 156 | // suppress clang-tidy warnings to reduce noises in Android build.log. |
| 157 | tidy_checks: [ |
| 158 | "-android-cloexec-*", |
| 159 | "-bugprone-branch-clone", |
| 160 | "-bugprone-macro-parentheses", |
| 161 | "-bugprone-misplaced-widening-cast", |
| 162 | "-bugprone-signal-handler", |
| 163 | "-bugprone-signed-char-misuse", |
| 164 | "-bugprone-sizeof-expression", |
| 165 | "-bugprone-suspicious-string-compare", |
| 166 | "-bugprone-too-small-loop-variable", |
| 167 | "-cert-err34-c", |
| 168 | "-cert-msc30-c", |
| 169 | "-cert-msc50-cpp", |
| 170 | "-cert-msc54-cpp", |
| 171 | "-cert-sig30-c", |
| 172 | "-cert-str34-c", |
| 173 | "-clang-analyzer-core.NullDereference", |
| 174 | "-clang-analyzer-core.UndefinedBinaryOperatorResult", |
| 175 | "-clang-analyzer-deadcode.DeadStores", |
| 176 | "-clang-analyzer-optin.performance.Padding", |
| 177 | "-clang-analyzer-optin.portability.UnixAPI", |
| 178 | "-clang-analyzer-security.insecureAPI.UncheckedReturn", |
| 179 | "-clang-analyzer-unix.cstring.NullArg", |
| 180 | "-clang-analyzer-unix.Malloc", |
| 181 | "-clang-diagnostic-unused-but-set-variable", |
| 182 | "-misc-redundant-expression", |
| 183 | ], |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 184 | } |
| 185 | |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 186 | // Generated by building hostapd and printing LOCAL_SRC_FILES. |
| 187 | filegroup { |
| 188 | name: "hostapd_srcs", |
| 189 | srcs: [ |
| 190 | "main.c", |
| 191 | "config_file.c", |
| 192 | "ctrl_iface.c", |
| 193 | "eap_register.c", |
| 194 | "src/ap/hostapd.c", |
| 195 | "src/ap/wpa_auth_glue.c", |
| 196 | "src/ap/drv_callbacks.c", |
| 197 | "src/ap/ap_drv_ops.c", |
| 198 | "src/ap/utils.c", |
| 199 | "src/ap/authsrv.c", |
| 200 | "src/ap/ieee802_1x.c", |
| 201 | "src/ap/ap_config.c", |
| 202 | "src/ap/eap_user_db.c", |
| 203 | "src/ap/ieee802_11_auth.c", |
| 204 | "src/ap/sta_info.c", |
| 205 | "src/ap/wpa_auth.c", |
| 206 | "src/ap/tkip_countermeasures.c", |
| 207 | "src/ap/ap_mlme.c", |
| 208 | "src/ap/wpa_auth_ie.c", |
| 209 | "src/ap/preauth_auth.c", |
| 210 | "src/ap/pmksa_cache_auth.c", |
| 211 | "src/ap/ieee802_11_shared.c", |
| 212 | "src/ap/beacon.c", |
| 213 | "src/ap/bss_load.c", |
| 214 | "src/ap/neighbor_db.c", |
| 215 | "src/ap/rrm.c", |
| 216 | "src/drivers/drivers.c", |
| 217 | "src/utils/eloop.c", |
| 218 | "src/utils/common.c", |
| 219 | "src/utils/wpa_debug.c", |
| 220 | "src/utils/wpabuf.c", |
| 221 | "src/utils/os_unix.c", |
| 222 | "src/utils/ip_addr.c", |
| 223 | "src/utils/crc32.c", |
| 224 | "src/common/ieee802_11_common.c", |
| 225 | "src/common/wpa_common.c", |
| 226 | "src/common/hw_features_common.c", |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 227 | "src/common/ptksa_cache.c", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 228 | "src/eapol_auth/eapol_auth_sm.c", |
| 229 | "src/eapol_auth/eapol_auth_dump.c", |
| 230 | "src/ap/vlan_init.c", |
| 231 | "src/ap/vlan_ifconfig.c", |
| 232 | "src/ap/vlan.c", |
| 233 | "src/common/ctrl_iface_common.c", |
| 234 | "src/ap/ctrl_iface_ap.c", |
| 235 | "src/ap/wpa_auth_ft.c", |
| 236 | "src/ap/eth_p_oui.c", |
| 237 | "src/common/sae.c", |
| 238 | "src/common/sae_pk.c", |
| 239 | "src/ap/fils_hlp.c", |
| 240 | "src/ap/wnm_ap.c", |
| 241 | "src/ap/mbo_ap.c", |
| 242 | "src/drivers/driver_nl80211.c", |
| 243 | "src/drivers/driver_nl80211_android.c", |
| 244 | "src/drivers/driver_nl80211_capa.c", |
| 245 | "src/drivers/driver_nl80211_event.c", |
| 246 | "src/drivers/driver_nl80211_monitor.c", |
| 247 | "src/drivers/driver_nl80211_scan.c", |
| 248 | "src/drivers/netlink.c", |
| 249 | "src/drivers/rfkill.c", |
| 250 | "src/utils/radiotap.c", |
| 251 | "src/drivers/linux_ioctl.c", |
| 252 | "src/l2_packet/l2_packet_linux.c", |
| 253 | "src/eap_server/eap_server_md5.c", |
| 254 | "src/eap_server/eap_server_tls.c", |
| 255 | "src/eap_server/eap_server_peap.c", |
| 256 | "src/eap_common/eap_peap_common.c", |
| 257 | "src/eap_server/eap_server_ttls.c", |
| 258 | "src/eap_server/eap_server_mschapv2.c", |
| 259 | "src/eap_server/eap_server_gtc.c", |
| 260 | "src/eap_server/eap_server_sim.c", |
| 261 | "src/eap_server/eap_server_aka.c", |
| 262 | "src/eap_common/eap_sim_common.c", |
| 263 | "src/eap_server/eap_sim_db.c", |
| 264 | "src/eap_server/eap_server_pwd.c", |
| 265 | "src/eap_common/eap_pwd_common.c", |
| 266 | "src/utils/uuid.c", |
| 267 | "src/ap/wps_hostapd.c", |
| 268 | "src/eap_server/eap_server_wsc.c", |
| 269 | "src/eap_common/eap_wsc_common.c", |
| 270 | "src/wps/wps.c", |
| 271 | "src/wps/wps_common.c", |
| 272 | "src/wps/wps_attr_parse.c", |
| 273 | "src/wps/wps_attr_build.c", |
| 274 | "src/wps/wps_attr_process.c", |
| 275 | "src/wps/wps_dev_attr.c", |
| 276 | "src/wps/wps_enrollee.c", |
| 277 | "src/wps/wps_registrar.c", |
| 278 | "src/wps/ndef.c", |
| 279 | "src/common/dpp.c", |
| 280 | "src/common/dpp_auth.c", |
| 281 | "src/common/dpp_backup.c", |
| 282 | "src/common/dpp_crypto.c", |
| 283 | "src/common/dpp_pkex.c", |
| 284 | "src/common/dpp_reconfig.c", |
| 285 | "src/common/dpp_tcp.c", |
| 286 | "src/ap/dpp_hostapd.c", |
| 287 | "src/ap/gas_query_ap.c", |
| 288 | "src/eap_server/eap_server.c", |
| 289 | "src/eap_common/eap_common.c", |
| 290 | "src/eap_server/eap_server_methods.c", |
| 291 | "src/eap_server/eap_server_identity.c", |
| 292 | "src/common/dragonfly.c", |
| 293 | "src/crypto/ms_funcs.c", |
| 294 | "src/eap_common/chap.c", |
| 295 | "src/eap_server/eap_server_tls_common.c", |
| 296 | "src/crypto/tls_openssl.c", |
| 297 | "src/crypto/tls_openssl_ocsp.c", |
| 298 | "src/crypto/crypto_openssl.c", |
| 299 | "src/crypto/fips_prf_openssl.c", |
| 300 | "src/crypto/aes-siv.c", |
| 301 | "src/crypto/aes-ctr.c", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 302 | "src/crypto/sha1-prf.c", |
| 303 | "src/crypto/sha1-tlsprf.c", |
| 304 | "src/crypto/sha256-prf.c", |
| 305 | "src/crypto/sha256-tlsprf.c", |
| 306 | "src/crypto/sha256-kdf.c", |
| 307 | "src/crypto/sha384-kdf.c", |
| 308 | "src/crypto/sha512-kdf.c", |
| 309 | "src/crypto/sha384-prf.c", |
| 310 | "src/crypto/sha512-prf.c", |
| 311 | "src/tls/asn1.c", |
| 312 | "src/crypto/dh_groups.c", |
| 313 | "src/utils/base64.c", |
| 314 | "src/utils/json.c", |
| 315 | "src/ap/wmm.c", |
| 316 | "src/ap/ap_list.c", |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 317 | "src/ap/comeback_token.c", |
| 318 | "src/pasn/pasn_responder.c", |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 319 | "src/pasn/pasn_common.c", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 320 | "src/ap/ieee802_11.c", |
| 321 | "src/ap/hw_features.c", |
| 322 | "src/ap/dfs.c", |
| 323 | "src/ap/ieee802_11_ht.c", |
| 324 | "src/ap/ieee802_11_vht.c", |
| 325 | "src/ap/hs20.c", |
| 326 | "src/common/gas.c", |
| 327 | "src/ap/gas_serv.c", |
| 328 | "src/ap/x_snoop.c", |
| 329 | "src/ap/dhcp_snoop.c", |
| 330 | "src/ap/ndisc_snoop.c", |
| 331 | "src/drivers/driver_common.c", |
| 332 | "src/ap/acs.c", |
| 333 | ], |
| 334 | |
| 335 | } |
Jeongik Cha | d4cfa12 | 2022-11-18 15:09:34 +0900 | [diff] [blame] | 336 | |
| 337 | // This manifest can used by a vendor apex module for hostapd as well. |
Kiyoung Kim | b853dac | 2024-08-12 08:18:33 +0000 | [diff] [blame] | 338 | vintf_fragment { |
Jeongik Cha | d4cfa12 | 2022-11-18 15:09:34 +0900 | [diff] [blame] | 339 | name: "android.hardware.wifi.hostapd.xml", |
Kiyoung Kim | b853dac | 2024-08-12 08:18:33 +0000 | [diff] [blame] | 340 | src: "android.hardware.wifi.hostapd.xml", |
| 341 | soc_specific: true, |
Jeongik Cha | d4cfa12 | 2022-11-18 15:09:34 +0900 | [diff] [blame] | 342 | } |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 343 | |
| 344 | // Generated by building hostapd_cli and printing LOCAL_SRC_FILES |
| 345 | filegroup { |
| 346 | name: "hostapd_cli_srcs", |
| 347 | srcs: [ |
| 348 | "hostapd_cli.c", |
| 349 | "src/common/cli.c", |
| 350 | "src/common/wpa_ctrl.c", |
| 351 | "src/utils/common.c", |
| 352 | "src/utils/edit.c", |
| 353 | "src/utils/eloop.c", |
| 354 | "src/utils/os_unix.c", |
| 355 | "src/utils/wpa_debug.c", |
| 356 | ], |
| 357 | } |
Deyao Ren | 84db0e2 | 2024-09-17 00:06:27 +0000 | [diff] [blame] | 358 | |
| 359 | prebuilt_etc { |
| 360 | name: "android.hardware.wifi.hostapd.xml.prebuilt", |
| 361 | src: "android.hardware.wifi.hostapd.xml", |
| 362 | relative_install_path: "vintf", |
| 363 | installable: false, |
| 364 | } |
Bill Yang | 08f249a | 2024-10-08 07:00:08 +0000 | [diff] [blame] | 365 | |
| 366 | // For converting the default to soong |
| 367 | cc_defaults { |
| 368 | name: "hostapd_driver_srcs_default", |
| 369 | srcs: [ |
| 370 | "src/drivers/driver_nl80211.c", |
| 371 | "src/drivers/driver_nl80211_android.c", |
| 372 | "src/drivers/driver_nl80211_capa.c", |
| 373 | "src/drivers/driver_nl80211_event.c", |
| 374 | "src/drivers/driver_nl80211_monitor.c", |
| 375 | "src/drivers/driver_nl80211_scan.c", |
| 376 | "src/drivers/linux_ioctl.c", |
| 377 | "src/drivers/netlink.c", |
| 378 | "src/drivers/rfkill.c", |
| 379 | "src/utils/radiotap.c", |
| 380 | ], |
| 381 | } |
| 382 | |
| 383 | cc_defaults { |
| 384 | name: "hostapd_driver_cflags_default", |
| 385 | cflags: [ |
| 386 | "-DCONFIG_DRIVER_NL80211", |
| 387 | ] + select(soong_config_variable("wpa_supplicant_8", "board_wlan_device"), { |
| 388 | "bcmdhd": ["-DCONFIG_DRIVER_NL80211_BRCM"], |
| 389 | "synadhd": ["-DCONFIG_DRIVER_NL80211_SYNA"], |
| 390 | default: ["-DCONFIG_DRIVER_NL80211_QCA"], |
| 391 | }), |
| 392 | } |
| 393 | |
| 394 | soong_config_module_type { |
| 395 | name: "hostapd_cc_defaults_type", |
| 396 | module_type: "cc_defaults", |
| 397 | config_namespace: "wpa_supplicant_8", |
| 398 | value_variables: [ |
| 399 | "platform_version", |
| 400 | ], |
| 401 | properties: ["cflags"], |
| 402 | } |
| 403 | |
| 404 | // Hostap related module share the same CFLAGS |
| 405 | hostapd_cc_defaults_type { |
| 406 | name: "hostapd_cflags_default", |
| 407 | cflags: [ |
| 408 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 409 | "-DANDROID_LOG_NAME=\"hostapd\"", |
| 410 | "-Wall", |
| 411 | "-Werror", |
| 412 | "-Wno-unused-parameter", |
| 413 | "-Wno-unused-variable", |
| 414 | "-Wno-macro-redefined", |
| 415 | "-DANDROID_P2P", |
| 416 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\"", |
| 417 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\"", |
| 418 | "-DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/vendor/wifi/hostapd\"", |
| 419 | "-DHOSTAPD", |
| 420 | "-DHOSTAPD_DUMP_STATE", |
| 421 | "-DCONFIG_NO_RADIUS", |
| 422 | "-DCONFIG_NO_ACCOUNTING", |
| 423 | "-DCONFIG_CTRL_IFACE", |
| 424 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 425 | "-DCONFIG_SAE", |
| 426 | "-DCONFIG_IEEE80211AC", |
| 427 | "-DCONFIG_WEP", |
| 428 | "-DCONFIG_WPS", |
| 429 | "-DEAP_SERVER_WSC", |
| 430 | "-DCONFIG_DPP", |
| 431 | "-DEAP_SERVER_IDENTITY", |
| 432 | "-DEAP_SERVER", |
| 433 | "-DPKCS12_FUNCS", |
| 434 | "-DCRYPTO_RSA_OAEP_SHA256", |
| 435 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 436 | "-DCONFIG_SHA256", |
| 437 | "-DCONFIG_SHA384", |
| 438 | "-DCONFIG_SHA512", |
| 439 | "-DCONFIG_ECC", |
| 440 | "-DCONFIG_NO_RANDOM_POOL", |
| 441 | "-DCONFIG_IPV6", |
| 442 | "-DCONFIG_JSON", |
| 443 | "-DNEED_AP_MLME", |
| 444 | "-DCONFIG_INTERWORKING", |
| 445 | "-DCONFIG_ACS", |
| 446 | "-DCONFIG_ANDROID_LOG", |
| 447 | "-DCONFIG_CTRL_IFACE_AIDL", |
| 448 | ] + select(soong_config_variable("wpa_supplicant_8", "hostapd_use_stub_lib"), { |
| 449 | true: ["-DANDROID_LIB_STUB"], |
| 450 | default: [], |
| 451 | }) + select(soong_config_variable("wpa_supplicant_8", "hostapd_11ax"), { |
| 452 | true: ["-DCONFIG_IEEE80211AX"], |
| 453 | default: [], |
| 454 | }) + select(soong_config_variable("wpa_supplicant_8", "board_hostapd_config_80211w_mfp_optional"), { |
| 455 | true: ["-DENABLE_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL"], |
| 456 | default: [], |
| 457 | }) + select(soong_config_variable("wpa_supplicant_8", "board_hostapd_private_lib_event"), { |
| 458 | true: ["-DANDROID_LIB_EVENT"], |
| 459 | default: [], |
| 460 | }), |
| 461 | arch: { |
| 462 | arm: { |
| 463 | cflags: [ |
| 464 | "-mabi=aapcs-linux", |
| 465 | ], |
| 466 | }, |
| 467 | }, |
| 468 | defaults: [ |
| 469 | "hostapd_driver_cflags_default", |
| 470 | ], |
| 471 | soong_config_variables: { |
| 472 | platform_version: { |
| 473 | cflags: ["-DVERSION_STR_POSTFIX=\"-%s\""], |
| 474 | }, |
| 475 | }, |
| 476 | enabled: select(soong_config_variable("wpa_supplicant_8", "wpa_build_hostapd"), { |
| 477 | true: true, |
| 478 | default: false, |
| 479 | }), |
| 480 | } |
| 481 | |
| 482 | cc_defaults { |
| 483 | name: "hostapd_includes_default", |
| 484 | local_include_dirs: [ |
| 485 | ".", |
| 486 | "src", |
| 487 | "src/utils", |
| 488 | ], |
| 489 | include_dirs: [ |
| 490 | // There's an if condition for external/libnl but current code base should always have this. |
| 491 | "external/libnl/include", |
| 492 | "system/security/keystore/include", |
| 493 | ], |
| 494 | } |
| 495 | |
| 496 | cc_defaults { |
| 497 | name: "hostapd_srcs_default", |
| 498 | srcs: [ |
| 499 | "main.c", |
| 500 | "config_file.c", |
| 501 | "src/ap/hostapd.c", |
| 502 | "src/ap/wpa_auth_glue.c", |
| 503 | "src/ap/drv_callbacks.c", |
| 504 | "src/ap/ap_drv_ops.c", |
| 505 | "src/ap/utils.c", |
| 506 | "src/ap/authsrv.c", |
| 507 | "src/ap/ieee802_1x.c", |
| 508 | "src/ap/ap_config.c", |
| 509 | "src/ap/eap_user_db.c", |
| 510 | "src/ap/ieee802_11_auth.c", |
| 511 | "src/ap/sta_info.c", |
| 512 | "src/ap/wpa_auth.c", |
| 513 | "src/ap/tkip_countermeasures.c", |
| 514 | "src/ap/ap_mlme.c", |
| 515 | "src/ap/wpa_auth_ie.c", |
| 516 | "src/ap/preauth_auth.c", |
| 517 | "src/ap/pmksa_cache_auth.c", |
| 518 | "src/ap/ieee802_11_shared.c", |
| 519 | "src/ap/beacon.c", |
| 520 | "src/ap/bss_load.c", |
| 521 | "src/ap/neighbor_db.c", |
| 522 | "src/ap/rrm.c", |
| 523 | "src/drivers/drivers.c", |
| 524 | "src/utils/eloop.c", |
| 525 | "src/utils/common.c", |
| 526 | "src/utils/wpa_debug.c", |
| 527 | "src/utils/wpabuf.c", |
| 528 | "src/utils/os_unix.c", |
| 529 | "src/utils/ip_addr.c", |
| 530 | "src/utils/crc32.c", |
| 531 | "src/common/ieee802_11_common.c", |
| 532 | "src/common/wpa_common.c", |
| 533 | "src/common/hw_features_common.c", |
| 534 | "src/common/ptksa_cache.c", |
| 535 | "src/eapol_auth/eapol_auth_sm.c", |
| 536 | "src/eapol_auth/eapol_auth_dump.c", |
| 537 | "src/ap/vlan_init.c", |
| 538 | "src/ap/vlan_ifconfig.c", |
| 539 | "src/ap/vlan.c", |
| 540 | "src/common/ctrl_iface_common.c", |
| 541 | "ctrl_iface.c", |
| 542 | "src/ap/ctrl_iface_ap.c", |
| 543 | "src/common/sae.c", |
| 544 | "src/l2_packet/l2_packet_none.c", |
| 545 | "src/utils/uuid.c", |
| 546 | "src/ap/wps_hostapd.c", |
| 547 | "src/eap_server/eap_server_wsc.c", |
| 548 | "src/eap_common/eap_wsc_common.c", |
| 549 | "src/wps/wps.c", |
| 550 | "src/wps/wps_common.c", |
| 551 | "src/wps/wps_attr_parse.c", |
| 552 | "src/wps/wps_attr_build.c", |
| 553 | "src/wps/wps_attr_process.c", |
| 554 | "src/wps/wps_dev_attr.c", |
| 555 | "src/wps/wps_enrollee.c", |
| 556 | "src/wps/wps_registrar.c", |
| 557 | "src/common/dpp.c", |
| 558 | "src/common/dpp_auth.c", |
| 559 | "src/common/dpp_backup.c", |
| 560 | "src/common/dpp_crypto.c", |
| 561 | "src/common/dpp_pkex.c", |
| 562 | "src/common/dpp_reconfig.c", |
| 563 | "src/common/dpp_tcp.c", |
| 564 | "src/ap/dpp_hostapd.c", |
| 565 | "src/ap/gas_query_ap.c", |
| 566 | "eap_register.c", |
| 567 | "src/eap_server/eap_server.c", |
| 568 | "src/eap_common/eap_common.c", |
| 569 | "src/eap_server/eap_server_methods.c", |
| 570 | "src/eap_server/eap_server_identity.c", |
| 571 | "src/common/dragonfly.c", |
| 572 | "src/crypto/crypto_openssl.c", |
| 573 | "src/crypto/tls_none.c", |
| 574 | "src/crypto/aes-siv.c", |
| 575 | "src/crypto/aes-ctr.c", |
| 576 | "src/crypto/sha1-prf.c", |
| 577 | "src/crypto/sha256-prf.c", |
| 578 | "src/crypto/sha256-tlsprf.c", |
| 579 | "src/crypto/sha256-kdf.c", |
| 580 | "src/crypto/sha384-kdf.c", |
| 581 | "src/crypto/sha512-kdf.c", |
| 582 | "src/crypto/sha384-prf.c", |
| 583 | "src/crypto/sha512-prf.c", |
| 584 | "src/tls/asn1.c", |
| 585 | "src/crypto/dh_groups.c", |
| 586 | "src/utils/base64.c", |
| 587 | "src/utils/json.c", |
| 588 | "src/ap/wmm.c", |
| 589 | "src/ap/ap_list.c", |
| 590 | "src/ap/comeback_token.c", |
| 591 | "src/pasn/pasn_common.c", |
| 592 | "src/pasn/pasn_responder.c", |
| 593 | "src/ap/ieee802_11.c", |
| 594 | "src/ap/hw_features.c", |
| 595 | "src/ap/dfs.c", |
| 596 | "src/ap/ieee802_11_ht.c", |
| 597 | "src/ap/ieee802_11_vht.c", |
| 598 | "src/common/gas.c", |
| 599 | "src/ap/gas_serv.c", |
| 600 | "src/drivers/driver_common.c", |
| 601 | "src/ap/acs.c", |
| 602 | ] + select(soong_config_variable("wpa_supplicant_8", "hostapd_11ax"), { |
| 603 | true: ["src/ap/ieee802_11_he.c"], |
| 604 | default: [], |
| 605 | }), |
| 606 | defaults: [ |
| 607 | "hostapd_driver_srcs_default", |
| 608 | ], |
| 609 | } |
| 610 | |
| 611 | cc_binary { |
| 612 | name: "hostapd_cli", |
| 613 | proprietary: true, |
| 614 | srcs: [ |
| 615 | "hostapd_cli.c", |
| 616 | "src/common/cli.c", |
| 617 | "src/common/wpa_ctrl.c", |
| 618 | "src/utils/common.c", |
| 619 | "src/utils/edit.c", |
| 620 | "src/utils/eloop.c", |
| 621 | "src/utils/os_unix.c", |
| 622 | "src/utils/wpa_debug.c", |
| 623 | ], |
| 624 | shared_libs: [ |
| 625 | "libc", |
| 626 | "libcutils", |
| 627 | "liblog", |
| 628 | ], |
| 629 | defaults: [ |
| 630 | "hostapd_cflags_default", |
| 631 | "hostapd_includes_default", |
| 632 | ], |
| 633 | } |
| 634 | |
| 635 | soong_config_module_type { |
| 636 | name: "hostapd_cc_binary", |
| 637 | module_type: "cc_binary", |
| 638 | config_namespace: "wpa_supplicant_8", |
| 639 | value_variables: [ |
| 640 | "board_hostapd_private_lib", |
| 641 | ], |
| 642 | properties: ["static_libs"], |
| 643 | } |
| 644 | |
| 645 | hostapd_cc_binary { |
| 646 | name: "hostapd", |
| 647 | proprietary: true, |
| 648 | relative_install_path: "hw", |
| 649 | //vintf_fragments: ["android.hardware.wifi.hostapd.xml"], |
| 650 | required: [ |
| 651 | "android.hardware.wifi.hostapd.xml", |
| 652 | ], |
| 653 | static_libs: [ |
| 654 | "libhostapd_aidl", |
| 655 | ], |
| 656 | shared_libs: [ |
| 657 | "libc", |
| 658 | "libcutils", |
| 659 | "liblog", |
| 660 | "libcrypto", |
| 661 | "libssl", |
| 662 | "libnl", |
| 663 | "android.hardware.wifi.hostapd-V3-ndk", |
| 664 | "android.hardware.wifi.common-V2-ndk", |
| 665 | "libbase", |
| 666 | "libutils", |
| 667 | "libbinder_ndk", |
| 668 | ], |
| 669 | init_rc: ["hostapd.android.rc"], |
| 670 | defaults: [ |
| 671 | "hostapd_srcs_default", |
| 672 | "hostapd_cflags_default", |
| 673 | "hostapd_includes_default", |
| 674 | ], |
| 675 | soong_config_variables: { |
| 676 | board_hostapd_private_lib: { |
| 677 | static_libs: ["%s"], |
| 678 | }, |
| 679 | }, |
| 680 | } |
| 681 | |
| 682 | cc_library_static { |
| 683 | name: "libhostapd_aidl", |
| 684 | soc_specific: true, |
| 685 | srcs: [ |
| 686 | "aidl/aidl.cpp", |
| 687 | "aidl/hostapd.cpp", |
| 688 | ], |
| 689 | shared_libs: [ |
| 690 | "android.hardware.wifi.hostapd-V3-ndk", |
| 691 | "android.hardware.wifi.common-V2-ndk", |
| 692 | "libbinder_ndk", |
| 693 | "libbase", |
| 694 | "libutils", |
| 695 | "liblog", |
| 696 | ], |
| 697 | export_include_dirs: ["aidl"], |
| 698 | cppflags: [ |
| 699 | "-Wall", |
| 700 | "-Werror", |
| 701 | ], |
| 702 | defaults: [ |
| 703 | "hostapd_cflags_default", |
| 704 | "hostapd_includes_default", |
| 705 | ], |
| 706 | } |