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: [ |
Gabriel Biren | 3c3347e | 2023-10-09 19:41:16 +0000 | [diff] [blame] | 47 | "android.hardware.wifi.hostapd-V2-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 | |
| 69 | soong_config_module_type { |
| 70 | name: "hostapd_cflags_cc_defaults", |
| 71 | module_type: "cc_defaults", |
| 72 | config_namespace: "hostapd", |
| 73 | value_variables: [ |
| 74 | "platform_version", |
| 75 | "nl80211_driver", |
| 76 | ], |
| 77 | properties: ["cflags"], |
| 78 | } |
| 79 | |
| 80 | hostapd_cflags_cc_defaults { |
| 81 | name: "hostapd_cflags_defaults", |
| 82 | soong_config_variables: { |
| 83 | // Devices that include this module should set these soong config vars appropriately. |
| 84 | // For example: |
| 85 | // $(call add_soong_config_namespace, wpa_supplicant) |
| 86 | // $(call add_soong_config_var_value, wpa_supplicant, platform_version, $(PLATFORM_VERSION)) |
| 87 | // $(call add_soong_config_var_value, wpa_supplicant, nl80211_driver, CONFIG_DRIVER_NL80211_QCA) |
| 88 | platform_version: { |
| 89 | cflags: ["-DVERSION_STR_POSTFIX=\"-%s\""], |
| 90 | conditions_default: { |
| 91 | // Default value |
| 92 | cflags: ["-DVERSION_STR_POSTFIX=\"-Android\""], |
| 93 | }, |
| 94 | }, |
| 95 | nl80211_driver: { |
| 96 | cflags: ["-D%s"], |
| 97 | // Flag is optional, so no default value provided. |
| 98 | }, |
| 99 | }, |
| 100 | // Generated by building hostapd and printing LOCAL_CFLAGS. |
| 101 | cflags: [ |
| 102 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 103 | "-DANDROID_LOG_NAME=\"hostapd\"", |
| 104 | "-DANDROID_P2P", |
| 105 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\"", |
| 106 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\"", |
| 107 | "-DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/vendor/wifi/hostapd\"", |
| 108 | "-DHOSTAPD", |
| 109 | "-DHOSTAPD_DUMP_STATE", |
| 110 | "-DCONFIG_NO_RADIUS", |
| 111 | "-DCONFIG_NO_ACCOUNTING", |
| 112 | "-DCONFIG_CTRL_IFACE", |
| 113 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 114 | "-DCONFIG_SUITEB", |
| 115 | "-DCONFIG_SUITEB192", |
| 116 | "-DCONFIG_IEEE80211R", |
| 117 | "-DCONFIG_IEEE80211R_AP", |
| 118 | "-DCONFIG_ETH_P_OUI", |
| 119 | "-DCONFIG_SAE", |
| 120 | "-DCONFIG_SAE_PK", |
| 121 | "-DCONFIG_OWE", |
| 122 | "-DCONFIG_FILS", |
| 123 | "-DCONFIG_WNM", |
| 124 | "-DCONFIG_WNM_AP", |
| 125 | "-DCONFIG_IEEE80211AC", |
| 126 | "-DCONFIG_MBO", |
| 127 | "-DCONFIG_WEP", |
| 128 | "-DCONFIG_DRIVER_NL80211", |
| 129 | "-DEAP_SERVER_MD5", |
| 130 | "-DEAP_SERVER_TLS", |
| 131 | "-DEAP_SERVER_PEAP", |
| 132 | "-DEAP_SERVER_TTLS", |
| 133 | "-DEAP_SERVER_MSCHAPV2", |
| 134 | "-DEAP_SERVER_GTC", |
| 135 | "-DEAP_SERVER_SIM", |
| 136 | "-DEAP_SERVER_AKA", |
| 137 | "-DEAP_SERVER_AKA_PRIME", |
| 138 | "-DEAP_SERVER_PWD", |
| 139 | "-DCONFIG_WPS", |
| 140 | "-DEAP_SERVER_WSC", |
| 141 | "-DCONFIG_WPS_NFC", |
| 142 | "-DCONFIG_WPS_OOB", |
| 143 | "-DCONFIG_DPP", |
| 144 | "-DCONFIG_DPP2", |
| 145 | "-DEAP_SERVER_IDENTITY", |
| 146 | "-DEAP_SERVER", |
| 147 | "-DPKCS12_FUNCS", |
| 148 | "-DEAP_TLS_FUNCS", |
| 149 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 150 | "-DCONFIG_SHA256", |
| 151 | "-DCONFIG_SHA384", |
| 152 | "-DCONFIG_SHA512", |
| 153 | "-DCONFIG_ECC", |
| 154 | "-DCONFIG_NO_RANDOM_POOL", |
| 155 | "-DCONFIG_IPV6", |
| 156 | "-DCONFIG_JSON", |
| 157 | "-DNEED_AP_MLME", |
| 158 | "-DCONFIG_HS20", |
| 159 | "-DCONFIG_INTERWORKING", |
| 160 | "-DCONFIG_PROXYARP", |
| 161 | "-DCONFIG_ACS", |
| 162 | "-DCONFIG_ANDROID_LOG", |
| 163 | "-DCONFIG_CTRL_IFACE_AIDL", |
| 164 | "-Wall", |
| 165 | "-Werror", |
| 166 | "-Wno-unused-parameter", |
| 167 | "-Wno-unused-variable", |
| 168 | "-Wno-macro-redefined", |
| 169 | ], |
Chih-Hung Hsieh | f3cee1d | 2022-12-02 13:06:22 -0800 | [diff] [blame] | 170 | // Similar to suppressing clang compiler warnings, here we |
| 171 | // suppress clang-tidy warnings to reduce noises in Android build.log. |
| 172 | tidy_checks: [ |
| 173 | "-android-cloexec-*", |
| 174 | "-bugprone-branch-clone", |
| 175 | "-bugprone-macro-parentheses", |
| 176 | "-bugprone-misplaced-widening-cast", |
| 177 | "-bugprone-signal-handler", |
| 178 | "-bugprone-signed-char-misuse", |
| 179 | "-bugprone-sizeof-expression", |
| 180 | "-bugprone-suspicious-string-compare", |
| 181 | "-bugprone-too-small-loop-variable", |
| 182 | "-cert-err34-c", |
| 183 | "-cert-msc30-c", |
| 184 | "-cert-msc50-cpp", |
| 185 | "-cert-msc54-cpp", |
| 186 | "-cert-sig30-c", |
| 187 | "-cert-str34-c", |
| 188 | "-clang-analyzer-core.NullDereference", |
| 189 | "-clang-analyzer-core.UndefinedBinaryOperatorResult", |
| 190 | "-clang-analyzer-deadcode.DeadStores", |
| 191 | "-clang-analyzer-optin.performance.Padding", |
| 192 | "-clang-analyzer-optin.portability.UnixAPI", |
| 193 | "-clang-analyzer-security.insecureAPI.UncheckedReturn", |
| 194 | "-clang-analyzer-unix.cstring.NullArg", |
| 195 | "-clang-analyzer-unix.Malloc", |
| 196 | "-clang-diagnostic-unused-but-set-variable", |
| 197 | "-misc-redundant-expression", |
| 198 | ], |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 199 | } |
| 200 | |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 201 | // Generated by building hostapd and printing LOCAL_SRC_FILES. |
| 202 | filegroup { |
| 203 | name: "hostapd_srcs", |
| 204 | srcs: [ |
| 205 | "main.c", |
| 206 | "config_file.c", |
| 207 | "ctrl_iface.c", |
| 208 | "eap_register.c", |
| 209 | "src/ap/hostapd.c", |
| 210 | "src/ap/wpa_auth_glue.c", |
| 211 | "src/ap/drv_callbacks.c", |
| 212 | "src/ap/ap_drv_ops.c", |
| 213 | "src/ap/utils.c", |
| 214 | "src/ap/authsrv.c", |
| 215 | "src/ap/ieee802_1x.c", |
| 216 | "src/ap/ap_config.c", |
| 217 | "src/ap/eap_user_db.c", |
| 218 | "src/ap/ieee802_11_auth.c", |
| 219 | "src/ap/sta_info.c", |
| 220 | "src/ap/wpa_auth.c", |
| 221 | "src/ap/tkip_countermeasures.c", |
| 222 | "src/ap/ap_mlme.c", |
| 223 | "src/ap/wpa_auth_ie.c", |
| 224 | "src/ap/preauth_auth.c", |
| 225 | "src/ap/pmksa_cache_auth.c", |
| 226 | "src/ap/ieee802_11_shared.c", |
| 227 | "src/ap/beacon.c", |
| 228 | "src/ap/bss_load.c", |
| 229 | "src/ap/neighbor_db.c", |
| 230 | "src/ap/rrm.c", |
| 231 | "src/drivers/drivers.c", |
| 232 | "src/utils/eloop.c", |
| 233 | "src/utils/common.c", |
| 234 | "src/utils/wpa_debug.c", |
| 235 | "src/utils/wpabuf.c", |
| 236 | "src/utils/os_unix.c", |
| 237 | "src/utils/ip_addr.c", |
| 238 | "src/utils/crc32.c", |
| 239 | "src/common/ieee802_11_common.c", |
| 240 | "src/common/wpa_common.c", |
| 241 | "src/common/hw_features_common.c", |
| 242 | "src/eapol_auth/eapol_auth_sm.c", |
| 243 | "src/eapol_auth/eapol_auth_dump.c", |
| 244 | "src/ap/vlan_init.c", |
| 245 | "src/ap/vlan_ifconfig.c", |
| 246 | "src/ap/vlan.c", |
| 247 | "src/common/ctrl_iface_common.c", |
| 248 | "src/ap/ctrl_iface_ap.c", |
| 249 | "src/ap/wpa_auth_ft.c", |
| 250 | "src/ap/eth_p_oui.c", |
| 251 | "src/common/sae.c", |
| 252 | "src/common/sae_pk.c", |
| 253 | "src/ap/fils_hlp.c", |
| 254 | "src/ap/wnm_ap.c", |
| 255 | "src/ap/mbo_ap.c", |
| 256 | "src/drivers/driver_nl80211.c", |
| 257 | "src/drivers/driver_nl80211_android.c", |
| 258 | "src/drivers/driver_nl80211_capa.c", |
| 259 | "src/drivers/driver_nl80211_event.c", |
| 260 | "src/drivers/driver_nl80211_monitor.c", |
| 261 | "src/drivers/driver_nl80211_scan.c", |
| 262 | "src/drivers/netlink.c", |
| 263 | "src/drivers/rfkill.c", |
| 264 | "src/utils/radiotap.c", |
| 265 | "src/drivers/linux_ioctl.c", |
| 266 | "src/l2_packet/l2_packet_linux.c", |
| 267 | "src/eap_server/eap_server_md5.c", |
| 268 | "src/eap_server/eap_server_tls.c", |
| 269 | "src/eap_server/eap_server_peap.c", |
| 270 | "src/eap_common/eap_peap_common.c", |
| 271 | "src/eap_server/eap_server_ttls.c", |
| 272 | "src/eap_server/eap_server_mschapv2.c", |
| 273 | "src/eap_server/eap_server_gtc.c", |
| 274 | "src/eap_server/eap_server_sim.c", |
| 275 | "src/eap_server/eap_server_aka.c", |
| 276 | "src/eap_common/eap_sim_common.c", |
| 277 | "src/eap_server/eap_sim_db.c", |
| 278 | "src/eap_server/eap_server_pwd.c", |
| 279 | "src/eap_common/eap_pwd_common.c", |
| 280 | "src/utils/uuid.c", |
| 281 | "src/ap/wps_hostapd.c", |
| 282 | "src/eap_server/eap_server_wsc.c", |
| 283 | "src/eap_common/eap_wsc_common.c", |
| 284 | "src/wps/wps.c", |
| 285 | "src/wps/wps_common.c", |
| 286 | "src/wps/wps_attr_parse.c", |
| 287 | "src/wps/wps_attr_build.c", |
| 288 | "src/wps/wps_attr_process.c", |
| 289 | "src/wps/wps_dev_attr.c", |
| 290 | "src/wps/wps_enrollee.c", |
| 291 | "src/wps/wps_registrar.c", |
| 292 | "src/wps/ndef.c", |
| 293 | "src/common/dpp.c", |
| 294 | "src/common/dpp_auth.c", |
| 295 | "src/common/dpp_backup.c", |
| 296 | "src/common/dpp_crypto.c", |
| 297 | "src/common/dpp_pkex.c", |
| 298 | "src/common/dpp_reconfig.c", |
| 299 | "src/common/dpp_tcp.c", |
| 300 | "src/ap/dpp_hostapd.c", |
| 301 | "src/ap/gas_query_ap.c", |
| 302 | "src/eap_server/eap_server.c", |
| 303 | "src/eap_common/eap_common.c", |
| 304 | "src/eap_server/eap_server_methods.c", |
| 305 | "src/eap_server/eap_server_identity.c", |
| 306 | "src/common/dragonfly.c", |
| 307 | "src/crypto/ms_funcs.c", |
| 308 | "src/eap_common/chap.c", |
| 309 | "src/eap_server/eap_server_tls_common.c", |
| 310 | "src/crypto/tls_openssl.c", |
| 311 | "src/crypto/tls_openssl_ocsp.c", |
| 312 | "src/crypto/crypto_openssl.c", |
| 313 | "src/crypto/fips_prf_openssl.c", |
| 314 | "src/crypto/aes-siv.c", |
| 315 | "src/crypto/aes-ctr.c", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 316 | "src/crypto/sha1-prf.c", |
| 317 | "src/crypto/sha1-tlsprf.c", |
| 318 | "src/crypto/sha256-prf.c", |
| 319 | "src/crypto/sha256-tlsprf.c", |
| 320 | "src/crypto/sha256-kdf.c", |
| 321 | "src/crypto/sha384-kdf.c", |
| 322 | "src/crypto/sha512-kdf.c", |
| 323 | "src/crypto/sha384-prf.c", |
| 324 | "src/crypto/sha512-prf.c", |
| 325 | "src/tls/asn1.c", |
| 326 | "src/crypto/dh_groups.c", |
| 327 | "src/utils/base64.c", |
| 328 | "src/utils/json.c", |
| 329 | "src/ap/wmm.c", |
| 330 | "src/ap/ap_list.c", |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 331 | "src/ap/comeback_token.c", |
| 332 | "src/pasn/pasn_responder.c", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 333 | "src/ap/ieee802_11.c", |
| 334 | "src/ap/hw_features.c", |
| 335 | "src/ap/dfs.c", |
| 336 | "src/ap/ieee802_11_ht.c", |
| 337 | "src/ap/ieee802_11_vht.c", |
| 338 | "src/ap/hs20.c", |
| 339 | "src/common/gas.c", |
| 340 | "src/ap/gas_serv.c", |
| 341 | "src/ap/x_snoop.c", |
| 342 | "src/ap/dhcp_snoop.c", |
| 343 | "src/ap/ndisc_snoop.c", |
| 344 | "src/drivers/driver_common.c", |
| 345 | "src/ap/acs.c", |
| 346 | ], |
| 347 | |
| 348 | } |
Jeongik Cha | d4cfa12 | 2022-11-18 15:09:34 +0900 | [diff] [blame] | 349 | |
| 350 | // This manifest can used by a vendor apex module for hostapd as well. |
| 351 | filegroup { |
| 352 | name: "android.hardware.wifi.hostapd.xml", |
| 353 | srcs: ["android.hardware.wifi.hostapd.xml"], |
| 354 | } |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 355 | |
| 356 | // Generated by building hostapd_cli and printing LOCAL_SRC_FILES |
| 357 | filegroup { |
| 358 | name: "hostapd_cli_srcs", |
| 359 | srcs: [ |
| 360 | "hostapd_cli.c", |
| 361 | "src/common/cli.c", |
| 362 | "src/common/wpa_ctrl.c", |
| 363 | "src/utils/common.c", |
| 364 | "src/utils/edit.c", |
| 365 | "src/utils/eloop.c", |
| 366 | "src/utils/os_unix.c", |
| 367 | "src/utils/wpa_debug.c", |
| 368 | ], |
| 369 | } |