Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [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: [ |
Bob Badour | 618e16c | 2022-02-14 12:41:29 -0800 | [diff] [blame] | 17 | // Inherits SPDX-license-identifier-BSD-3-Clause |
| 18 | "external_wpa_supplicant_8_license", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 19 | ], |
| 20 | } |
| 21 | |
Bob Badour | 618e16c | 2022-02-14 12:41:29 -0800 | [diff] [blame] | 22 | // See: http://go/android-license-faq |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 23 | license { |
Bob Badour | 618e16c | 2022-02-14 12:41:29 -0800 | [diff] [blame] | 24 | name: "external_wpa_supplicant_8_wpa_supplicant_icons_license", |
| 25 | license_kinds: ["SPDX-license-identifier-CC0-1.0"], |
| 26 | license_text: ["wpa_gui-qt4/icons/LICENSE"], |
| 27 | } |
| 28 | |
| 29 | // Ostensibly unused. |
| 30 | filegroup { |
| 31 | name: "wpa_supplicant_gui_qt4_icons", |
| 32 | srcs: ["wpa_gui-qt4/icons/*.svg"], |
| 33 | licenses: [ |
| 34 | "external_wpa_supplicant_8_license", |
| 35 | "external_wpa_supplicant_8_wpa_supplicant_icons_license", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 36 | ], |
| 37 | } |
| 38 | |
| 39 | cc_library_headers { |
| 40 | name: "wpa_supplicant_headers", |
| 41 | export_include_dirs: [ |
| 42 | ".", |
| 43 | "src", |
| 44 | "src/common", |
| 45 | "src/drivers", |
| 46 | "src/eap_common", |
| 47 | "src/eapol_supp", |
| 48 | "src/eap_peer", |
| 49 | "src/eap_server", |
| 50 | "src/l2_packet", |
| 51 | "src/radius", |
| 52 | "src/rsn_supp", |
| 53 | "src/tls", |
| 54 | "src/utils", |
| 55 | "src/wps", |
| 56 | ], |
| 57 | soc_specific: true, |
| 58 | } |
| 59 | |
| 60 | filegroup { |
| 61 | name: "wpa_supplicant_template.conf", |
| 62 | srcs: ["wpa_supplicant_template.conf"], |
| 63 | } |
| 64 | |
| 65 | cc_defaults { |
| 66 | name: "wpa_supplicant_defaults", |
| 67 | defaults: ["wpa_supplicant_cflags_defaults"], |
| 68 | srcs: [":wpa_supplicant_srcs"], |
| 69 | shared_libs: [ |
Sunil Ravi | c1ac7ed | 2024-09-18 04:46:34 +0000 | [diff] [blame] | 70 | "android.hardware.wifi.supplicant-V4-ndk", |
Gabriel Biren | 6b4e827 | 2022-12-14 23:07:53 +0000 | [diff] [blame] | 71 | "android.system.keystore2-V1-ndk", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 72 | "libbase", |
Gabriel Biren | 57ededa | 2021-09-03 16:08:50 +0000 | [diff] [blame] | 73 | "libbinder_ndk", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 74 | "libc", |
| 75 | "libcrypto", |
| 76 | "libcutils", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 77 | "libkeystore-engine-wifi-hidl", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 78 | "liblog", |
| 79 | "libnl", |
| 80 | "libssl", |
| 81 | "libutils", |
| 82 | ], |
| 83 | relative_install_path: "hw", |
| 84 | soc_specific: true, |
| 85 | static_libs: [ |
Gabriel Biren | 57ededa | 2021-09-03 16:08:50 +0000 | [diff] [blame] | 86 | "libwpa_aidl_bp", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 87 | ], |
| 88 | header_libs: [ |
| 89 | "wpa_supplicant_headers", |
Gabriel Biren | 57ededa | 2021-09-03 16:08:50 +0000 | [diff] [blame] | 90 | "libwpa_aidl_headers", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 91 | ], |
| 92 | } |
| 93 | |
Cole Faust | 0b99b52 | 2024-08-20 15:34:57 -0700 | [diff] [blame] | 94 | cc_defaults { |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 95 | name: "wpa_supplicant_cflags_defaults", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 96 | // Generated by building wpa_supplicant and printing LOCAL_CFLAGS. |
| 97 | cflags: [ |
| 98 | "-DANDROID_LOG_NAME=\"wpa_supplicant\"", |
| 99 | "-DANDROID_P2P", |
| 100 | "-DCONFIG_ACS", |
| 101 | "-DCONFIG_ANDROID_LOG", |
| 102 | "-DCONFIG_AP", |
| 103 | "-DCONFIG_BACKEND_FILE", |
| 104 | "-DCONFIG_CTRL_IFACE", |
| 105 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
| 106 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
Gabriel Biren | 57ededa | 2021-09-03 16:08:50 +0000 | [diff] [blame] | 107 | "-DCONFIG_CTRL_IFACE_AIDL", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 108 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 109 | "-DCONFIG_DPP", |
| 110 | "-DCONFIG_DPP2", |
| 111 | "-DCONFIG_DRIVER_NL80211", |
| 112 | "-DCONFIG_ECC", |
| 113 | "-DCONFIG_ERP", |
| 114 | "-DCONFIG_FILS", |
| 115 | "-DCONFIG_GAS", |
| 116 | "-DCONFIG_GAS_SERVER", |
Sundong Ahn | 4f6ca3a | 2021-12-02 01:04:41 +0000 | [diff] [blame] | 117 | "-DCONFIG_AIDL", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 118 | "-DCONFIG_HMAC_SHA256_KDF", |
| 119 | "-DCONFIG_HMAC_SHA384_KDF", |
| 120 | "-DCONFIG_HMAC_SHA512_KDF", |
| 121 | "-DCONFIG_HS20", |
| 122 | "-DCONFIG_IEEE80211AC", |
| 123 | "-DCONFIG_IEEE80211R", |
| 124 | "-DCONFIG_INTERWORKING", |
| 125 | "-DCONFIG_IPV6", |
| 126 | "-DCONFIG_JSON", |
| 127 | "-DCONFIG_MBO", |
| 128 | "-DCONFIG_NO_ACCOUNTING", |
| 129 | "-DCONFIG_NO_RADIUS", |
| 130 | "-DCONFIG_NO_RADIUS", |
| 131 | "-DCONFIG_NO_RANDOM_POOL", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 132 | "-DCONFIG_NO_VLAN", |
| 133 | "-DCONFIG_OFFCHANNEL", |
| 134 | "-DCONFIG_OWE", |
| 135 | "-DCONFIG_P2P", |
| 136 | "-DCONFIG_SAE", |
| 137 | "-DCONFIG_SAE_PK", |
| 138 | "-DCONFIG_SHA256", |
| 139 | "-DCONFIG_SHA384", |
| 140 | "-DCONFIG_SHA512", |
| 141 | "-DCONFIG_SMARTCARD", |
| 142 | "-DCONFIG_SME", |
| 143 | "-DCONFIG_SUITEB", |
| 144 | "-DCONFIG_SUITEB192", |
| 145 | "-DCONFIG_TDLS", |
| 146 | "-DCONFIG_WEP", |
| 147 | "-DCONFIG_WIFI_DISPLAY", |
| 148 | "-DCONFIG_WNM", |
| 149 | "-DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/vendor/wifi/wpa\"", |
| 150 | "-DCONFIG_WPS", |
| 151 | "-DCONFIG_WPS_ER", |
| 152 | "-DCONFIG_WPS_NFC", |
| 153 | "-DCONFIG_WPS_OOB", |
| 154 | "-DCONFIG_WPS_UPNP", |
| 155 | "-DEAP_AKA", |
| 156 | "-DEAP_AKA_PRIME", |
| 157 | "-DEAP_GTC", |
| 158 | "-DEAP_LEAP", |
| 159 | "-DEAP_MD5", |
| 160 | "-DEAP_MSCHAPv2", |
| 161 | "-DEAP_OTP", |
| 162 | "-DEAP_PEAP", |
Vinay Gannevaram | e008ff3 | 2024-07-17 18:53:59 +0530 | [diff] [blame] | 163 | "-DCONFIG_PTKSA_CACHE", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 164 | "-DEAP_PWD", |
| 165 | "-DEAP_SERVER", |
| 166 | "-DEAP_SERVER_IDENTITY", |
| 167 | "-DEAP_SERVER_WSC", |
| 168 | "-DEAP_SIM", |
| 169 | "-DEAP_TLS", |
| 170 | "-DEAP_TLS_OPENSSL", |
| 171 | "-DEAP_TTLS", |
| 172 | "-DEAP_WSC", |
| 173 | "-DIEEE8021X_EAPOL", |
| 174 | "-DNEED_AP_MLME", |
| 175 | "-DPKCS12_FUNCS", |
| 176 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 177 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 178 | "-Wall", |
| 179 | "-Werror", |
| 180 | "-Wno-error=sometimes-uninitialized", |
| 181 | "-Wno-incompatible-pointer-types", |
| 182 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
| 183 | "-Wno-macro-redefined", |
| 184 | "-Wno-parentheses-equality", |
| 185 | "-Wno-sign-compare", |
| 186 | "-Wno-unused-function", |
| 187 | "-Wno-unused-parameter", |
| 188 | "-Wno-unused-variable", |
Cole Faust | 0b99b52 | 2024-08-20 15:34:57 -0700 | [diff] [blame] | 189 | ] + |
| 190 | // Devices that include this module should set these soong config vars appropriately. |
| 191 | // For example: |
| 192 | // $(call soong_config_set, wpa_supplicant, platform_version, $(PLATFORM_VERSION)) |
| 193 | // $(call soong_config_set, wpa_supplicant, nl80211_driver, CONFIG_DRIVER_NL80211_QCA) |
| 194 | select(soong_config_variable("wpa_supplicant", "platform_version"), { |
| 195 | any @ version: ["-DVERSION_STR_POSTFIX=\"-" + version + "\""], |
| 196 | default: ["-DVERSION_STR_POSTFIX=\"-Android\""], |
| 197 | }) + |
| 198 | select(soong_config_variable("wpa_supplicant", "nl80211_driver"), { |
| 199 | any @ driver: ["-D" + driver], |
| 200 | // Flag is optional, so no default value provided. |
| 201 | default: [], |
Matthew Wang | b129714 | 2024-09-25 16:08:47 +0000 | [diff] [blame] | 202 | }) + |
| 203 | select(soong_config_variable("wpa_supplicant", "roaming"), { |
| 204 | true: [], |
| 205 | default: ["-DCONFIG_NO_ROAMING"], |
Matthew Wang | 532c598 | 2024-10-10 12:23:20 +0000 | [diff] [blame] | 206 | }) + |
| 207 | select(soong_config_variable("wpa_supplicant", "pasn"), { |
| 208 | false: [], |
| 209 | default: ["-DCONFIG_PASN"], |
| 210 | }) + |
| 211 | select(soong_config_variable("wpa_supplicant", "bgscan_simple"), { |
| 212 | true: [ |
| 213 | "-DCONFIG_BGSCAN", |
| 214 | "-DCONFIG_BGSCAN_SIMPLE", |
| 215 | ], |
| 216 | default: [], |
Cole Faust | 0b99b52 | 2024-08-20 15:34:57 -0700 | [diff] [blame] | 217 | }), |
Chih-Hung Hsieh | f3cee1d | 2022-12-02 13:06:22 -0800 | [diff] [blame] | 218 | // Similar to suppressing clang compiler warnings, here we |
| 219 | // suppress clang-tidy warnings to reduce noises in Android build.log. |
| 220 | tidy_checks: [ |
| 221 | "-android-cloexec-*", |
| 222 | "-bugprone-branch-clone", |
| 223 | "-bugprone-macro-parentheses", |
| 224 | "-bugprone-misplaced-widening-cast", |
| 225 | "-bugprone-signal-handler", |
| 226 | "-bugprone-signed-char-misuse", |
| 227 | "-bugprone-sizeof-expression", |
| 228 | "-bugprone-suspicious-string-compare", |
| 229 | "-bugprone-too-small-loop-variable", |
| 230 | "-cert-err34-c", |
| 231 | "-cert-msc30-c", |
| 232 | "-cert-msc50-cpp", |
| 233 | "-cert-msc54-cpp", |
| 234 | "-cert-sig30-c", |
| 235 | "-cert-str34-c", |
| 236 | "-clang-analyzer-core.NullDereference", |
| 237 | "-clang-analyzer-core.UndefinedBinaryOperatorResult", |
| 238 | "-clang-analyzer-deadcode.DeadStores", |
| 239 | "-clang-analyzer-optin.performance.Padding", |
| 240 | "-clang-analyzer-optin.portability.UnixAPI", |
| 241 | "-clang-analyzer-security.insecureAPI.UncheckedReturn", |
| 242 | "-clang-analyzer-unix.cstring.NullArg", |
| 243 | "-clang-analyzer-unix.Malloc", |
| 244 | "-clang-diagnostic-unused-but-set-variable", |
| 245 | "-misc-redundant-expression", |
| 246 | ], |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | // Generated by building wpa_supplicant and printing LOCAL_SRC_FILES. |
| 250 | filegroup { |
| 251 | name: "wpa_supplicant_srcs", |
| 252 | srcs: [ |
| 253 | "ap.c", |
| 254 | "bss.c", |
| 255 | "bssid_ignore.c", |
| 256 | "config.c", |
| 257 | "config_file.c", |
| 258 | "ctrl_iface.c", |
| 259 | "ctrl_iface_unix.c", |
| 260 | "dpp_supplicant.c", |
| 261 | "eap_register.c", |
| 262 | "events.c", |
| 263 | "gas_query.c", |
| 264 | "hs20_supplicant.c", |
| 265 | "interworking.c", |
| 266 | "main.c", |
| 267 | "mbo.c", |
| 268 | "notify.c", |
| 269 | "offchannel.c", |
| 270 | "op_classes.c", |
| 271 | "p2p_supplicant.c", |
| 272 | "p2p_supplicant_sd.c", |
| 273 | "robust_av.c", |
| 274 | "rrm.c", |
| 275 | "scan.c", |
| 276 | "sme.c", |
| 277 | "src/ap/acs.c", |
| 278 | "src/ap/ap_config.c", |
| 279 | "src/ap/ap_drv_ops.c", |
| 280 | "src/ap/ap_list.c", |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 281 | "src/ap/comeback_token.c", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 282 | "src/ap/ap_mlme.c", |
| 283 | "src/ap/authsrv.c", |
| 284 | "src/ap/beacon.c", |
| 285 | "src/ap/bss_load.c", |
| 286 | "src/ap/ctrl_iface_ap.c", |
| 287 | "src/ap/dfs.c", |
| 288 | "src/ap/dpp_hostapd.c", |
| 289 | "src/ap/drv_callbacks.c", |
| 290 | "src/ap/eap_user_db.c", |
| 291 | "src/ap/fils_hlp.c", |
| 292 | "src/ap/gas_query_ap.c", |
| 293 | "src/ap/gas_serv.c", |
| 294 | "src/ap/hostapd.c", |
| 295 | "src/ap/hs20.c", |
| 296 | "src/ap/hw_features.c", |
| 297 | "src/ap/ieee802_11_auth.c", |
| 298 | "src/ap/ieee802_11.c", |
| 299 | "src/ap/ieee802_11_ht.c", |
| 300 | "src/ap/ieee802_11_shared.c", |
| 301 | "src/ap/ieee802_11_vht.c", |
| 302 | "src/ap/ieee802_1x.c", |
| 303 | "src/ap/mbo_ap.c", |
| 304 | "src/ap/neighbor_db.c", |
| 305 | "src/ap/p2p_hostapd.c", |
| 306 | "src/ap/pmksa_cache_auth.c", |
| 307 | "src/ap/rrm.c", |
| 308 | "src/ap/sta_info.c", |
| 309 | "src/ap/tkip_countermeasures.c", |
| 310 | "src/ap/utils.c", |
| 311 | "src/ap/wmm.c", |
| 312 | "src/ap/wpa_auth.c", |
| 313 | "src/ap/wpa_auth_glue.c", |
| 314 | "src/ap/wpa_auth_ie.c", |
| 315 | "src/ap/wps_hostapd.c", |
| 316 | "src/common/ctrl_iface_common.c", |
| 317 | "src/common/dpp_auth.c", |
| 318 | "src/common/dpp_backup.c", |
| 319 | "src/common/dpp.c", |
| 320 | "src/common/dpp_crypto.c", |
| 321 | "src/common/dpp_pkex.c", |
| 322 | "src/common/dpp_reconfig.c", |
| 323 | "src/common/dpp_tcp.c", |
| 324 | "src/common/dragonfly.c", |
| 325 | "src/common/gas.c", |
| 326 | "src/common/gas_server.c", |
| 327 | "src/common/hw_features_common.c", |
| 328 | "src/common/ieee802_11_common.c", |
| 329 | "src/common/sae.c", |
| 330 | "src/common/sae_pk.c", |
| 331 | "src/common/wpa_common.c", |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 332 | "src/common/ptksa_cache.c", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 333 | "src/crypto/aes-ctr.c", |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 334 | "src/crypto/aes-encblock.c", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 335 | "src/crypto/aes-siv.c", |
| 336 | "src/crypto/crypto_openssl.c", |
| 337 | "src/crypto/dh_groups.c", |
| 338 | "src/crypto/fips_prf_openssl.c", |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 339 | "src/crypto/milenage.c", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 340 | "src/crypto/ms_funcs.c", |
| 341 | "src/crypto/sha1-prf.c", |
| 342 | "src/crypto/sha1-tlsprf.c", |
| 343 | "src/crypto/sha256-kdf.c", |
| 344 | "src/crypto/sha256-prf.c", |
| 345 | "src/crypto/sha256-tlsprf.c", |
| 346 | "src/crypto/sha384-kdf.c", |
| 347 | "src/crypto/sha384-prf.c", |
| 348 | "src/crypto/sha512-kdf.c", |
| 349 | "src/crypto/sha512-prf.c", |
| 350 | "src/crypto/tls_openssl.c", |
| 351 | "src/crypto/tls_openssl_ocsp.c", |
| 352 | "src/drivers/driver_common.c", |
| 353 | "src/drivers/driver_nl80211_android.c", |
| 354 | "src/drivers/driver_nl80211.c", |
| 355 | "src/drivers/driver_nl80211_capa.c", |
| 356 | "src/drivers/driver_nl80211_event.c", |
| 357 | "src/drivers/driver_nl80211_monitor.c", |
| 358 | "src/drivers/driver_nl80211_scan.c", |
| 359 | "src/drivers/drivers.c", |
| 360 | "src/drivers/linux_ioctl.c", |
| 361 | "src/drivers/netlink.c", |
| 362 | "src/drivers/rfkill.c", |
| 363 | "src/eap_common/chap.c", |
| 364 | "src/eap_common/eap_common.c", |
| 365 | "src/eap_common/eap_peap_common.c", |
| 366 | "src/eap_common/eap_pwd_common.c", |
| 367 | "src/eap_common/eap_sim_common.c", |
| 368 | "src/eap_common/eap_wsc_common.c", |
| 369 | "src/eapol_auth/eapol_auth_sm.c", |
| 370 | "src/eapol_supp/eapol_supp_sm.c", |
| 371 | "src/eap_peer/eap_aka.c", |
| 372 | "src/eap_peer/eap.c", |
| 373 | "src/eap_peer/eap_gtc.c", |
| 374 | "src/eap_peer/eap_leap.c", |
| 375 | "src/eap_peer/eap_md5.c", |
| 376 | "src/eap_peer/eap_methods.c", |
| 377 | "src/eap_peer/eap_mschapv2.c", |
| 378 | "src/eap_peer/eap_otp.c", |
| 379 | "src/eap_peer/eap_peap.c", |
| 380 | "src/eap_peer/eap_pwd.c", |
| 381 | "src/eap_peer/eap_sim.c", |
| 382 | "src/eap_peer/eap_tls.c", |
| 383 | "src/eap_peer/eap_tls_common.c", |
| 384 | "src/eap_peer/eap_ttls.c", |
| 385 | "src/eap_peer/eap_wsc.c", |
| 386 | "src/eap_peer/mschapv2.c", |
| 387 | "src/eap_server/eap_server.c", |
| 388 | "src/eap_server/eap_server_identity.c", |
| 389 | "src/eap_server/eap_server_methods.c", |
| 390 | "src/eap_server/eap_server_wsc.c", |
| 391 | "src/l2_packet/l2_packet_linux.c", |
| 392 | "src/p2p/p2p_build.c", |
| 393 | "src/p2p/p2p.c", |
| 394 | "src/p2p/p2p_dev_disc.c", |
| 395 | "src/p2p/p2p_go_neg.c", |
| 396 | "src/p2p/p2p_group.c", |
| 397 | "src/p2p/p2p_invitation.c", |
| 398 | "src/p2p/p2p_parse.c", |
| 399 | "src/p2p/p2p_pd.c", |
| 400 | "src/p2p/p2p_sd.c", |
| 401 | "src/p2p/p2p_utils.c", |
| 402 | "src/rsn_supp/pmksa_cache.c", |
| 403 | "src/rsn_supp/preauth.c", |
| 404 | "src/rsn_supp/tdls.c", |
| 405 | "src/rsn_supp/wpa.c", |
| 406 | "src/rsn_supp/wpa_ft.c", |
| 407 | "src/rsn_supp/wpa_ie.c", |
| 408 | "src/tls/asn1.c", |
| 409 | "src/utils/base64.c", |
| 410 | "src/utils/bitfield.c", |
| 411 | "src/utils/common.c", |
| 412 | "src/utils/config.c", |
| 413 | "src/utils/crc32.c", |
| 414 | "src/utils/eloop.c", |
| 415 | "src/utils/ip_addr.c", |
| 416 | "src/utils/json.c", |
| 417 | "src/utils/os_unix.c", |
| 418 | "src/utils/radiotap.c", |
| 419 | "src/utils/uuid.c", |
| 420 | "src/utils/wpabuf.c", |
| 421 | "src/utils/wpa_debug.c", |
| 422 | "src/wps/http_client.c", |
| 423 | "src/wps/httpread.c", |
| 424 | "src/wps/http_server.c", |
| 425 | "src/wps/ndef.c", |
| 426 | "src/wps/upnp_xml.c", |
| 427 | "src/wps/wps_attr_build.c", |
| 428 | "src/wps/wps_attr_parse.c", |
| 429 | "src/wps/wps_attr_process.c", |
| 430 | "src/wps/wps.c", |
| 431 | "src/wps/wps_common.c", |
| 432 | "src/wps/wps_dev_attr.c", |
| 433 | "src/wps/wps_enrollee.c", |
| 434 | "src/wps/wps_er.c", |
| 435 | "src/wps/wps_er_ssdp.c", |
| 436 | "src/wps/wps_registrar.c", |
| 437 | "src/wps/wps_upnp_ap.c", |
| 438 | "src/wps/wps_upnp.c", |
| 439 | "src/wps/wps_upnp_event.c", |
| 440 | "src/wps/wps_upnp_ssdp.c", |
| 441 | "src/wps/wps_upnp_web.c", |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 442 | "twt.c", |
Daniel Norman | 1f2ba85 | 2021-10-04 16:14:43 -0700 | [diff] [blame] | 443 | "wifi_display.c", |
| 444 | "wmm_ac.c", |
| 445 | "wnm_sta.c", |
| 446 | "wpas_glue.c", |
| 447 | "wpa_supplicant.c", |
| 448 | "wps_supplicant.c", |
Matthew Wang | 532c598 | 2024-10-10 12:23:20 +0000 | [diff] [blame] | 449 | ] + |
| 450 | select(soong_config_variable("wpa_supplicant", "bgscan_simple"), { |
| 451 | true: [ |
| 452 | "bgscan.c", |
| 453 | "bgscan_simple.c", |
| 454 | ], |
| 455 | default: [], |
| 456 | }) + |
| 457 | select(soong_config_variable("wpa_supplicant", "pasn"), { |
| 458 | false: [], |
| 459 | default: [ |
| 460 | "pasn_supplicant.c", |
| 461 | "src/pasn/pasn_initiator.c", |
| 462 | "src/pasn/pasn_responder.c", |
| 463 | "src/pasn/pasn_common.c", |
| 464 | ], |
| 465 | }), |
| 466 | |
Sunil Ravi | 3db35ff | 2023-11-06 23:23:30 +0000 | [diff] [blame] | 467 | } |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 468 | |
| 469 | // Generated by building wpa_cli and printing LOCAL_SRC_FILES |
| 470 | filegroup { |
| 471 | name: "wpa_cli_srcs", |
| 472 | srcs: [ |
| 473 | "src/common/cli.c", |
Gabriel Biren | c69c43d | 2024-05-24 16:58:00 +0000 | [diff] [blame] | 474 | "src/common/wpa_ctrl.c", |
chao.meng | 4c248f0 | 2023-11-18 16:55:52 +0800 | [diff] [blame] | 475 | "src/utils/common.c", |
| 476 | "src/utils/edit.c", |
| 477 | "src/utils/eloop.c", |
| 478 | "src/utils/os_unix.c", |
| 479 | "src/utils/wpa_debug.c", |
| 480 | "wpa_cli.c", |
| 481 | ], |
| 482 | } |
| 483 | |
| 484 | // Generated by building libwpa_client and printing LOCAL_SRC_FILES |
| 485 | filegroup { |
| 486 | name: "libwpa_client_srcs", |
| 487 | srcs: [ |
| 488 | "src/common/wpa_ctrl.c", |
| 489 | "src/utils/os_unix.c", |
| 490 | ], |
| 491 | } |
| 492 | |
| 493 | cc_library_headers { |
| 494 | name: "libwpa_client_headers", |
| 495 | export_include_dirs: [ |
| 496 | ".", |
| 497 | "wpa_client_include/libwpa_client", |
| 498 | ], |
| 499 | soc_specific: true, |
| 500 | } |
Vinay Gannevaram | 97e30ce | 2024-04-04 11:37:19 +0530 | [diff] [blame] | 501 | |
| 502 | cc_library { |
| 503 | name: "libpasn", |
| 504 | vendor: true, |
| 505 | cflags: [ |
| 506 | "-DANDROID_LOG_NAME=\"libpasn\"", |
| 507 | "-DANDROID_P2P", |
| 508 | "-DCONFIG_ACS", |
| 509 | "-DCONFIG_ANDROID_LOG", |
| 510 | "-DCONFIG_AP", |
| 511 | "-DCONFIG_BACKEND_FILE", |
| 512 | "-DCONFIG_CTRL_IFACE", |
| 513 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
| 514 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
| 515 | "-DCONFIG_CTRL_IFACE_AIDL", |
| 516 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 517 | "-DCONFIG_DPP", |
| 518 | "-DCONFIG_DPP2", |
| 519 | "-DCONFIG_DRIVER_NL80211", |
| 520 | "-DCONFIG_ECC", |
| 521 | "-DCONFIG_ERP", |
| 522 | "-DCONFIG_FILS", |
| 523 | "-DCONFIG_GAS", |
| 524 | "-DCONFIG_GAS_SERVER", |
| 525 | "-DCONFIG_AIDL", |
| 526 | "-DCONFIG_HMAC_SHA256_KDF", |
| 527 | "-DCONFIG_HMAC_SHA384_KDF", |
| 528 | "-DCONFIG_HMAC_SHA512_KDF", |
| 529 | "-DCONFIG_HS20", |
| 530 | "-DCONFIG_IEEE80211AC", |
| 531 | "-DCONFIG_IEEE80211R", |
| 532 | "-DCONFIG_INTERWORKING", |
| 533 | "-DCONFIG_IPV6", |
| 534 | "-DCONFIG_JSON", |
| 535 | "-DCONFIG_MBO", |
| 536 | "-DCONFIG_NO_ACCOUNTING", |
| 537 | "-DCONFIG_NO_RADIUS", |
| 538 | "-DCONFIG_NO_RADIUS", |
| 539 | "-DCONFIG_NO_RANDOM_POOL", |
| 540 | "-DCONFIG_NO_ROAMING", |
| 541 | "-DCONFIG_NO_VLAN", |
| 542 | "-DCONFIG_OFFCHANNEL", |
| 543 | "-DCONFIG_OWE", |
| 544 | "-DCONFIG_P2P", |
| 545 | "-DCONFIG_SAE", |
| 546 | "-DCONFIG_SAE_PK", |
| 547 | "-DCONFIG_SHA256", |
| 548 | "-DCONFIG_SHA384", |
| 549 | "-DCONFIG_SHA512", |
| 550 | "-DCONFIG_SMARTCARD", |
| 551 | "-DCONFIG_SME", |
| 552 | "-DCONFIG_SUITEB", |
| 553 | "-DCONFIG_SUITEB192", |
| 554 | "-DCONFIG_TDLS", |
| 555 | "-DCONFIG_WEP", |
| 556 | "-DCONFIG_WIFI_DISPLAY", |
| 557 | "-DCONFIG_WNM", |
| 558 | "-DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/vendor/wifi/wpa\"", |
| 559 | "-DCONFIG_WPS", |
| 560 | "-DCONFIG_WPS_ER", |
| 561 | "-DCONFIG_WPS_NFC", |
| 562 | "-DCONFIG_WPS_OOB", |
| 563 | "-DCONFIG_WPS_UPNP", |
| 564 | "-DEAP_AKA", |
| 565 | "-DEAP_AKA_PRIME", |
| 566 | "-DEAP_GTC", |
| 567 | "-DEAP_LEAP", |
| 568 | "-DEAP_MD5", |
| 569 | "-DEAP_MSCHAPv2", |
| 570 | "-DEAP_OTP", |
| 571 | "-DEAP_PEAP", |
| 572 | "-DCONFIG_PASN", |
| 573 | "-DCONFIG_PTKSA_CACHE", |
| 574 | "-DEAP_PWD", |
| 575 | "-DEAP_SERVER", |
| 576 | "-DEAP_SERVER_IDENTITY", |
| 577 | "-DEAP_SERVER_WSC", |
| 578 | "-DEAP_SIM", |
| 579 | "-DEAP_TLS", |
| 580 | "-DEAP_TLS_OPENSSL", |
| 581 | "-DEAP_TTLS", |
| 582 | "-DEAP_WSC", |
| 583 | "-DIEEE8021X_EAPOL", |
| 584 | "-DNEED_AP_MLME", |
| 585 | "-DPKCS12_FUNCS", |
| 586 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 587 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 588 | "-Wall", |
| 589 | "-Werror", |
| 590 | "-Wno-error=sometimes-uninitialized", |
| 591 | "-Wno-incompatible-pointer-types", |
| 592 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
| 593 | "-Wno-macro-redefined", |
| 594 | "-Wno-parentheses-equality", |
| 595 | "-Wno-sign-compare", |
| 596 | "-Wno-unused-function", |
| 597 | "-Wno-unused-parameter", |
| 598 | "-Wno-unused-variable", |
| 599 | ], |
| 600 | product_variables: { |
| 601 | debuggable: { |
| 602 | cflags: ["-DLOG_NDEBUG=0"], |
| 603 | }, |
| 604 | }, |
| 605 | local_include_dirs: [ |
| 606 | ".", |
| 607 | "src", |
| 608 | "src/common", |
| 609 | "src/drivers", |
| 610 | "src/eap_common", |
| 611 | "src/eapol_supp", |
| 612 | "src/eap_peer", |
| 613 | "src/eap_server", |
| 614 | "src/l2_packet", |
| 615 | "src/radius", |
| 616 | "src/rsn_supp", |
| 617 | "src/tls", |
| 618 | "src/utils", |
| 619 | "src/wps", |
| 620 | ], |
| 621 | srcs: [ |
| 622 | "src/utils/eloop.c", |
| 623 | "src/utils/wpa_debug.c", |
| 624 | "src/utils/wpabuf.c", |
| 625 | "src/utils/os_unix.c", |
| 626 | "src/utils/config.c", |
| 627 | "src/utils/common.c", |
| 628 | "src/utils/base64.c", |
| 629 | "src/common/sae.c", |
| 630 | "src/common/sae_pk.c", |
| 631 | "src/common/wpa_common.c", |
| 632 | "src/common/ieee802_11_common.c", |
| 633 | "src/common/dragonfly.c", |
| 634 | "src/common/ptksa_cache.c", |
| 635 | "src/rsn_supp/pmksa_cache.c", |
| 636 | "src/rsn_supp/wpa_ie.c", |
| 637 | "src/ap/comeback_token.c", |
| 638 | "src/ap/pmksa_cache_auth.c", |
| 639 | "src/eap_common/eap_common.c", |
| 640 | "src/eap_common/chap.c", |
| 641 | "src/eap_peer/eap.c", |
| 642 | "src/eap_peer/eap_methods.c", |
| 643 | "src/eapol_supp/eapol_supp_sm.c", |
| 644 | "src/crypto/crypto_openssl.c", |
| 645 | "src/crypto/tls_openssl.c", |
| 646 | "src/crypto/tls_openssl_ocsp.c", |
| 647 | "src/crypto/sha256-tlsprf.c", |
| 648 | "src/crypto/sha512-prf.c", |
| 649 | "src/crypto/sha384-prf.c", |
| 650 | "src/crypto/sha256-prf.c", |
| 651 | "src/crypto/sha512-kdf.c", |
| 652 | "src/crypto/sha384-kdf.c", |
| 653 | "src/crypto/sha256-kdf.c", |
| 654 | "src/crypto/dh_groups.c", |
| 655 | "src/crypto/aes-siv.c", |
| 656 | "src/crypto/aes-ctr.c", |
| 657 | "src/crypto/sha1-prf.c", |
| 658 | "src/crypto/sha1-tlsprf.c", |
| 659 | "src/pasn/pasn_initiator.c", |
| 660 | "src/pasn/pasn_responder.c", |
| 661 | "src/pasn/pasn_common.c", |
| 662 | ], |
| 663 | shared_libs: [ |
| 664 | "libc", |
| 665 | "libcutils", |
| 666 | "liblog", |
| 667 | "libcrypto", |
| 668 | "libssl", |
| 669 | "libkeystore-engine-wifi-hidl", |
| 670 | ], |
| 671 | sanitize: { |
| 672 | misc_undefined: [ |
| 673 | "unsigned-integer-overflow", |
| 674 | "signed-integer-overflow", |
| 675 | ], |
| 676 | cfi: true, |
| 677 | }, |
| 678 | } |
Bill Yang | 08f249a | 2024-10-08 07:00:08 +0000 | [diff] [blame^] | 679 | |
| 680 | // For converting the default to soong |
| 681 | cc_defaults { |
| 682 | name: "wpa_supplicant_driver_srcs_default", |
| 683 | srcs: [ |
| 684 | "src/drivers/driver_nl80211.c", |
| 685 | "src/drivers/driver_nl80211_android.c", |
| 686 | "src/drivers/driver_nl80211_capa.c", |
| 687 | "src/drivers/driver_nl80211_event.c", |
| 688 | "src/drivers/driver_nl80211_monitor.c", |
| 689 | "src/drivers/driver_nl80211_scan.c", |
| 690 | "src/drivers/linux_ioctl.c", |
| 691 | "src/drivers/netlink.c", |
| 692 | "src/drivers/rfkill.c", |
| 693 | "src/utils/radiotap.c", |
| 694 | ], |
| 695 | } |
| 696 | |
| 697 | cc_defaults { |
| 698 | name: "wpa_supplicant_driver_cflags_default", |
| 699 | cflags: [ |
| 700 | "-DCONFIG_DRIVER_NL80211", |
| 701 | // Because the original Android.mk will call hostapd's Android.mk first and it |
| 702 | // will make the flag share with wpa_supplicant, keep the original logic in hostapd. |
| 703 | ] + select(soong_config_variable("wpa_supplicant_8", "board_wlan_device"), { |
| 704 | "bcmdhd": ["-DCONFIG_DRIVER_NL80211_BRCM"], |
| 705 | "synadhd": ["-DCONFIG_DRIVER_NL80211_SYNA"], |
| 706 | "qcwcn": ["-DCONFIG_DRIVER_NL80211_QCA"], |
| 707 | default: ["-DCONFIG_DRIVER_NL80211_QCA"], |
| 708 | }), |
| 709 | } |
| 710 | |
| 711 | cc_defaults { |
| 712 | name: "wpa_supplicant_includes_default", |
| 713 | local_include_dirs: [ |
| 714 | ".", |
| 715 | "src", |
| 716 | "src/common", |
| 717 | "src/drivers", |
| 718 | "src/eap_common", |
| 719 | "src/eap_peer", |
| 720 | "src/eap_server", |
| 721 | "src/eapol_supp", |
| 722 | "src/l2_packet", |
| 723 | "src/pasn", |
| 724 | "src/radius", |
| 725 | "src/rsn_supp", |
| 726 | "src/tls", |
| 727 | "src/utils", |
| 728 | "src/wps", |
| 729 | ], |
| 730 | include_dirs: [ |
| 731 | // There's an if condition for external/libnl but current code base should always have this. |
| 732 | "external/libnl/include", |
| 733 | "system/security/keystore/include", |
| 734 | ], |
| 735 | } |
| 736 | |
| 737 | soong_config_module_type { |
| 738 | name: "wpa_supplicant_cc_defaults_type", |
| 739 | module_type: "cc_defaults", |
| 740 | config_namespace: "wpa_supplicant_8", |
| 741 | value_variables: [ |
| 742 | "platform_version", |
| 743 | ], |
| 744 | properties: ["cflags"], |
| 745 | } |
| 746 | |
| 747 | // Hostap related module share the same CFLAGS |
| 748 | wpa_supplicant_cc_defaults_type { |
| 749 | name: "wpa_supplicant_no_aidl_cflags_default", |
| 750 | cflags: [ |
| 751 | "-DANDROID_LOG_NAME=\"wpa_supplicant\"", |
| 752 | "-DANDROID_P2P", |
| 753 | "-DCONFIG_ACS", |
| 754 | "-DCONFIG_ANDROID_LOG", |
| 755 | "-DCONFIG_AP", |
| 756 | "-DCONFIG_BACKEND_FILE", |
| 757 | "-DCONFIG_CTRL_IFACE", |
| 758 | "-DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
| 759 | "-DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/wpa/sockets\"", |
| 760 | "-DCONFIG_CTRL_IFACE_UNIX", |
| 761 | "-DCONFIG_DPP", |
| 762 | "-DCONFIG_DPP2", |
| 763 | "-DCONFIG_DRIVER_NL80211", |
| 764 | "-DCONFIG_DRIVER_NL80211_QCA", |
| 765 | "-DCONFIG_ECC", |
| 766 | "-DCONFIG_ERP", |
| 767 | "-DCONFIG_FILS", |
| 768 | "-DCONFIG_GAS", |
| 769 | "-DCONFIG_GAS_SERVER", |
| 770 | "-DCONFIG_HMAC_SHA256_KDF", |
| 771 | "-DCONFIG_HMAC_SHA384_KDF", |
| 772 | "-DCONFIG_HMAC_SHA512_KDF", |
| 773 | "-DCONFIG_HS20", |
| 774 | "-DCONFIG_IEEE80211AC", |
| 775 | "-DCONFIG_IEEE80211R", |
| 776 | "-DCONFIG_INTERWORKING", |
| 777 | "-DCONFIG_IPV6", |
| 778 | "-DCONFIG_JSON", |
| 779 | "-DCONFIG_MBO", |
| 780 | "-DCONFIG_NO_ACCOUNTING", |
| 781 | "-DCONFIG_NO_RADIUS", |
| 782 | "-DCONFIG_NO_RADIUS", |
| 783 | "-DCONFIG_NO_RANDOM_POOL", |
| 784 | "-DCONFIG_NO_ROAMING", |
| 785 | "-DCONFIG_NO_VLAN", |
| 786 | "-DCONFIG_OFFCHANNEL", |
| 787 | "-DCONFIG_OWE", |
| 788 | "-DCONFIG_P2P", |
| 789 | "-DCONFIG_PASN", |
| 790 | "-DCONFIG_PTKSA_CACHE", |
| 791 | "-DCONFIG_SAE", |
| 792 | "-DCONFIG_SAE_PK", |
| 793 | "-DCONFIG_SHA256", |
| 794 | "-DCONFIG_SHA384", |
| 795 | "-DCONFIG_SHA512", |
| 796 | "-DCONFIG_SMARTCARD", |
| 797 | "-DCONFIG_SME", |
| 798 | "-DCONFIG_SUITEB", |
| 799 | "-DCONFIG_SUITEB192", |
| 800 | "-DCONFIG_TDLS", |
| 801 | "-DCONFIG_WEP", |
| 802 | "-DCONFIG_WIFI_DISPLAY", |
| 803 | "-DCONFIG_WNM", |
| 804 | "-DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/vendor/wifi/wpa\"", |
| 805 | "-DCONFIG_WPS", |
| 806 | "-DCONFIG_WPS_ER", |
| 807 | "-DCONFIG_WPS_NFC", |
| 808 | "-DCONFIG_WPS_OOB", |
| 809 | "-DCONFIG_WPS_UPNP", |
| 810 | "-DCRYPTO_RSA_OAEP_SHA256", |
| 811 | "-DEAP_AKA", |
| 812 | "-DEAP_AKA_PRIME", |
| 813 | "-DEAP_GTC", |
| 814 | "-DEAP_LEAP", |
| 815 | "-DEAP_MD5", |
| 816 | "-DEAP_MSCHAPv2", |
| 817 | "-DEAP_OTP", |
| 818 | "-DEAP_PEAP", |
| 819 | "-DEAP_PWD", |
| 820 | "-DEAP_SERVER", |
| 821 | "-DEAP_SERVER_IDENTITY", |
| 822 | "-DEAP_SERVER_WSC", |
| 823 | "-DEAP_SIM", |
| 824 | "-DEAP_TLS", |
| 825 | "-DEAP_TLSV1_3", |
| 826 | "-DEAP_TLS_OPENSSL", |
| 827 | "-DEAP_TTLS", |
| 828 | "-DEAP_WSC", |
| 829 | "-DIEEE8021X_EAPOL", |
| 830 | "-DNEED_AP_MLME", |
| 831 | "-DPKCS12_FUNCS", |
| 832 | "-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"", |
| 833 | "-DWPA_IGNORE_CONFIG_ERRORS", |
| 834 | "-Wall", |
| 835 | "-Werror", |
| 836 | "-Wno-error=sometimes-uninitialized", |
| 837 | "-Wno-incompatible-pointer-types", |
| 838 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
| 839 | "-Wno-macro-redefined", |
| 840 | "-Wno-parentheses-equality", |
| 841 | "-Wno-sign-compare", |
| 842 | "-Wno-unused-function", |
| 843 | "-Wno-unused-parameter", |
| 844 | "-Wno-unused-variable", |
| 845 | ] + select(soong_config_variable("wpa_supplicant_8", "wpa_supplicant_use_stub_lib"), { |
| 846 | true: ["-DANDROID_LIB_STUB"], |
| 847 | default: [], |
| 848 | }) + select(soong_config_variable("wpa_supplicant_8", "board_hostapd_config_80211w_mfp_optional"), { |
| 849 | true: ["-DENABLE_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL"], |
| 850 | default: [], |
| 851 | }) + select(soong_config_variable("wpa_supplicant_8", "board_wpa_supplicant_private_lib_event"), { |
| 852 | true: ["-DANDROID_LIB_EVENT"], |
| 853 | default: [], |
| 854 | }) + select(soong_config_variable("wpa_supplicant_8", "wifi_priv_cmd_update_mbo_cell_status"), { |
| 855 | true: ["-DENABLE_PRIV_CMD_UPDATE_MBO_CELL_STATUS"], |
| 856 | default: [], |
| 857 | }) + select(soong_config_variable("wpa_supplicant_8", "hostapd_11ax"), { |
| 858 | true: ["-DCONFIG_IEEE80211AX"], |
| 859 | default: [], |
| 860 | }) + select(soong_config_variable("wpa_supplicant_8", "wifi_brcm_open_source_multi_akm"), { |
| 861 | true: ["-DWIFI_BRCM_OPEN_SOURCE_MULTI_AKM"], |
| 862 | default: [], |
| 863 | }), |
| 864 | arch: { |
| 865 | arm: { |
| 866 | cflags: [ |
| 867 | "-mabi=aapcs-linux", |
| 868 | ], |
| 869 | }, |
| 870 | }, |
| 871 | defaults: [ |
| 872 | "wpa_supplicant_driver_cflags_default", |
| 873 | ], |
| 874 | soong_config_variables: { |
| 875 | platform_version: { |
| 876 | cflags: ["-DVERSION_STR_POSTFIX=\"-%s\""], |
| 877 | }, |
| 878 | }, |
| 879 | } |
| 880 | |
| 881 | cc_defaults { |
| 882 | name: "wpa_supplicant_cflags_default", |
| 883 | cflags: [ |
| 884 | "-DCONFIG_AIDL", |
| 885 | "-DCONFIG_CTRL_IFACE_AIDL", |
| 886 | ], |
| 887 | defaults: [ |
| 888 | "wpa_supplicant_no_aidl_cflags_default", |
| 889 | ], |
| 890 | } |
| 891 | |
| 892 | cc_defaults { |
| 893 | name: "wpa_supplicant_srcs_default", |
| 894 | srcs: [ |
| 895 | "ap.c", |
| 896 | "bss.c", |
| 897 | "bssid_ignore.c", |
| 898 | "config.c", |
| 899 | "config_file.c", |
| 900 | "ctrl_iface.c", |
| 901 | "ctrl_iface_unix.c", |
| 902 | "dpp_supplicant.c", |
| 903 | "eap_register.c", |
| 904 | "events.c", |
| 905 | "gas_query.c", |
| 906 | "hs20_supplicant.c", |
| 907 | "interworking.c", |
| 908 | "main.c", |
| 909 | "mbo.c", |
| 910 | "notify.c", |
| 911 | "offchannel.c", |
| 912 | "op_classes.c", |
| 913 | "p2p_supplicant.c", |
| 914 | "p2p_supplicant_sd.c", |
| 915 | "pasn_supplicant.c", |
| 916 | "robust_av.c", |
| 917 | "rrm.c", |
| 918 | "scan.c", |
| 919 | "sme.c", |
| 920 | "twt.c", |
| 921 | "wifi_display.c", |
| 922 | "wmm_ac.c", |
| 923 | "wnm_sta.c", |
| 924 | "wpa_supplicant.c", |
| 925 | "wpas_glue.c", |
| 926 | "wps_supplicant.c", |
| 927 | "src/ap/acs.c", |
| 928 | "src/ap/ap_config.c", |
| 929 | "src/ap/ap_drv_ops.c", |
| 930 | "src/ap/ap_list.c", |
| 931 | "src/ap/ap_mlme.c", |
| 932 | "src/ap/authsrv.c", |
| 933 | "src/ap/beacon.c", |
| 934 | "src/ap/bss_load.c", |
| 935 | "src/ap/comeback_token.c", |
| 936 | "src/ap/ctrl_iface_ap.c", |
| 937 | "src/ap/dfs.c", |
| 938 | "src/ap/dpp_hostapd.c", |
| 939 | "src/ap/drv_callbacks.c", |
| 940 | "src/ap/eap_user_db.c", |
| 941 | "src/ap/fils_hlp.c", |
| 942 | "src/ap/gas_query_ap.c", |
| 943 | "src/ap/gas_serv.c", |
| 944 | "src/ap/hostapd.c", |
| 945 | "src/ap/hs20.c", |
| 946 | "src/ap/hw_features.c", |
| 947 | "src/ap/ieee802_11.c", |
| 948 | "src/ap/ieee802_11_auth.c", |
| 949 | "src/ap/ieee802_11_ht.c", |
| 950 | "src/ap/ieee802_11_shared.c", |
| 951 | "src/ap/ieee802_11_vht.c", |
| 952 | "src/ap/ieee802_1x.c", |
| 953 | "src/ap/mbo_ap.c", |
| 954 | "src/ap/neighbor_db.c", |
| 955 | "src/ap/p2p_hostapd.c", |
| 956 | "src/ap/pmksa_cache_auth.c", |
| 957 | "src/ap/rrm.c", |
| 958 | "src/ap/sta_info.c", |
| 959 | "src/ap/tkip_countermeasures.c", |
| 960 | "src/ap/utils.c", |
| 961 | "src/ap/wmm.c", |
| 962 | "src/ap/wpa_auth.c", |
| 963 | "src/ap/wpa_auth_glue.c", |
| 964 | "src/ap/wpa_auth_ie.c", |
| 965 | "src/ap/wps_hostapd.c", |
| 966 | "src/common/ctrl_iface_common.c", |
| 967 | "src/common/dpp.c", |
| 968 | "src/common/dpp_auth.c", |
| 969 | "src/common/dpp_backup.c", |
| 970 | "src/common/dpp_crypto.c", |
| 971 | "src/common/dpp_pkex.c", |
| 972 | "src/common/dpp_reconfig.c", |
| 973 | "src/common/dpp_tcp.c", |
| 974 | "src/common/dragonfly.c", |
| 975 | "src/common/gas.c", |
| 976 | "src/common/gas_server.c", |
| 977 | "src/common/hw_features_common.c", |
| 978 | "src/common/ieee802_11_common.c", |
| 979 | "src/common/ptksa_cache.c", |
| 980 | "src/common/sae.c", |
| 981 | "src/common/sae_pk.c", |
| 982 | "src/common/wpa_common.c", |
| 983 | "src/crypto/aes-ctr.c", |
| 984 | "src/crypto/aes-siv.c", |
| 985 | "src/crypto/crypto_openssl.c", |
| 986 | "src/crypto/dh_groups.c", |
| 987 | "src/crypto/fips_prf_openssl.c", |
| 988 | "src/crypto/ms_funcs.c", |
| 989 | "src/crypto/sha1-prf.c", |
| 990 | "src/crypto/sha1-tlsprf.c", |
| 991 | "src/crypto/sha256-kdf.c", |
| 992 | "src/crypto/sha256-prf.c", |
| 993 | "src/crypto/sha256-tlsprf.c", |
| 994 | "src/crypto/sha384-kdf.c", |
| 995 | "src/crypto/sha384-prf.c", |
| 996 | "src/crypto/sha512-kdf.c", |
| 997 | "src/crypto/sha512-prf.c", |
| 998 | "src/crypto/tls_openssl.c", |
| 999 | "src/crypto/tls_openssl_ocsp.c", |
| 1000 | "src/drivers/driver_common.c", |
| 1001 | "src/drivers/driver_nl80211.c", |
| 1002 | "src/drivers/driver_nl80211_android.c", |
| 1003 | "src/drivers/driver_nl80211_capa.c", |
| 1004 | "src/drivers/driver_nl80211_event.c", |
| 1005 | "src/drivers/driver_nl80211_monitor.c", |
| 1006 | "src/drivers/driver_nl80211_scan.c", |
| 1007 | "src/drivers/drivers.c", |
| 1008 | "src/drivers/linux_ioctl.c", |
| 1009 | "src/drivers/netlink.c", |
| 1010 | "src/drivers/rfkill.c", |
| 1011 | "src/eap_common/chap.c", |
| 1012 | "src/eap_common/eap_common.c", |
| 1013 | "src/eap_common/eap_peap_common.c", |
| 1014 | "src/eap_common/eap_pwd_common.c", |
| 1015 | "src/eap_common/eap_sim_common.c", |
| 1016 | "src/eap_common/eap_wsc_common.c", |
| 1017 | "src/eap_peer/eap.c", |
| 1018 | "src/eap_peer/eap_aka.c", |
| 1019 | "src/eap_peer/eap_gtc.c", |
| 1020 | "src/eap_peer/eap_leap.c", |
| 1021 | "src/eap_peer/eap_md5.c", |
| 1022 | "src/eap_peer/eap_methods.c", |
| 1023 | "src/eap_peer/eap_mschapv2.c", |
| 1024 | "src/eap_peer/eap_otp.c", |
| 1025 | "src/eap_peer/eap_peap.c", |
| 1026 | "src/eap_peer/eap_pwd.c", |
| 1027 | "src/eap_peer/eap_sim.c", |
| 1028 | "src/eap_peer/eap_tls.c", |
| 1029 | "src/eap_peer/eap_tls_common.c", |
| 1030 | "src/eap_peer/eap_ttls.c", |
| 1031 | "src/eap_peer/eap_wsc.c", |
| 1032 | "src/eap_peer/mschapv2.c", |
| 1033 | "src/eap_server/eap_server.c", |
| 1034 | "src/eap_server/eap_server_identity.c", |
| 1035 | "src/eap_server/eap_server_methods.c", |
| 1036 | "src/eap_server/eap_server_wsc.c", |
| 1037 | "src/eapol_auth/eapol_auth_sm.c", |
| 1038 | "src/eapol_supp/eapol_supp_sm.c", |
| 1039 | "src/l2_packet/l2_packet_linux.c", |
| 1040 | "src/p2p/p2p.c", |
| 1041 | "src/p2p/p2p_build.c", |
| 1042 | "src/p2p/p2p_dev_disc.c", |
| 1043 | "src/p2p/p2p_go_neg.c", |
| 1044 | "src/p2p/p2p_group.c", |
| 1045 | "src/p2p/p2p_invitation.c", |
| 1046 | "src/p2p/p2p_parse.c", |
| 1047 | "src/p2p/p2p_pd.c", |
| 1048 | "src/p2p/p2p_sd.c", |
| 1049 | "src/p2p/p2p_utils.c", |
| 1050 | "src/pasn/pasn_common.c", |
| 1051 | "src/pasn/pasn_initiator.c", |
| 1052 | "src/pasn/pasn_responder.c", |
| 1053 | "src/rsn_supp/pmksa_cache.c", |
| 1054 | "src/rsn_supp/preauth.c", |
| 1055 | "src/rsn_supp/tdls.c", |
| 1056 | "src/rsn_supp/wpa.c", |
| 1057 | "src/rsn_supp/wpa_ft.c", |
| 1058 | "src/rsn_supp/wpa_ie.c", |
| 1059 | "src/tls/asn1.c", |
| 1060 | "src/utils/base64.c", |
| 1061 | "src/utils/bitfield.c", |
| 1062 | "src/utils/common.c", |
| 1063 | "src/utils/config.c", |
| 1064 | "src/utils/crc32.c", |
| 1065 | "src/utils/eloop.c", |
| 1066 | "src/utils/ip_addr.c", |
| 1067 | "src/utils/json.c", |
| 1068 | "src/utils/os_unix.c", |
| 1069 | "src/utils/radiotap.c", |
| 1070 | "src/utils/uuid.c", |
| 1071 | "src/utils/wpa_debug.c", |
| 1072 | "src/utils/wpabuf.c", |
| 1073 | "src/wps/http_client.c", |
| 1074 | "src/wps/http_server.c", |
| 1075 | "src/wps/httpread.c", |
| 1076 | "src/wps/ndef.c", |
| 1077 | "src/wps/upnp_xml.c", |
| 1078 | "src/wps/wps.c", |
| 1079 | "src/wps/wps_attr_build.c", |
| 1080 | "src/wps/wps_attr_parse.c", |
| 1081 | "src/wps/wps_attr_process.c", |
| 1082 | "src/wps/wps_common.c", |
| 1083 | "src/wps/wps_dev_attr.c", |
| 1084 | "src/wps/wps_enrollee.c", |
| 1085 | "src/wps/wps_er.c", |
| 1086 | "src/wps/wps_er_ssdp.c", |
| 1087 | "src/wps/wps_registrar.c", |
| 1088 | "src/wps/wps_upnp.c", |
| 1089 | "src/wps/wps_upnp_ap.c", |
| 1090 | "src/wps/wps_upnp_event.c", |
| 1091 | "src/wps/wps_upnp_ssdp.c", |
| 1092 | "src/wps/wps_upnp_web.c", |
| 1093 | ] + select(soong_config_variable("wpa_supplicant_8", "hostapd_11ax"), { |
| 1094 | true: ["src/ap/ieee802_11_he.c"], |
| 1095 | default: [], |
| 1096 | }), |
| 1097 | defaults: [ |
| 1098 | "wpa_supplicant_driver_srcs_default", |
| 1099 | ], |
| 1100 | } |
| 1101 | |
| 1102 | cc_binary { |
| 1103 | name: "wpa_cli", |
| 1104 | proprietary: true, |
| 1105 | srcs: [ |
| 1106 | "wpa_cli.c", |
| 1107 | "src/common/cli.c", |
| 1108 | "src/common/wpa_ctrl.c", |
| 1109 | "src/utils/common.c", |
| 1110 | "src/utils/edit.c", |
| 1111 | "src/utils/eloop.c", |
| 1112 | "src/utils/os_unix.c", |
| 1113 | "src/utils/wpa_debug.c", |
| 1114 | ], |
| 1115 | shared_libs: [ |
| 1116 | "libcutils", |
| 1117 | "liblog", |
| 1118 | ], |
| 1119 | defaults: [ |
| 1120 | "wpa_supplicant_cflags_default", |
| 1121 | "wpa_supplicant_includes_default", |
| 1122 | ], |
| 1123 | } |
| 1124 | |
| 1125 | soong_config_module_type { |
| 1126 | name: "wpa_supplicant_cc_binary", |
| 1127 | module_type: "cc_binary", |
| 1128 | config_namespace: "wpa_supplicant_8", |
| 1129 | value_variables: [ |
| 1130 | "board_wpa_supplicant_private_lib", |
| 1131 | ], |
| 1132 | bool_variables: [ |
| 1133 | "wifi_hidl_unified_supplicant_service_rc_entry", |
| 1134 | ], |
| 1135 | properties: [ |
| 1136 | "init_rc", |
| 1137 | "static_libs", |
| 1138 | ], |
| 1139 | } |
| 1140 | |
| 1141 | wpa_supplicant_cc_binary { |
| 1142 | name: "wpa_supplicant", |
| 1143 | proprietary: true, |
| 1144 | relative_install_path: "hw", |
| 1145 | // vintf_fragments: wpa_supplicant only |
| 1146 | // vintf_fragments: ["aidl/android.hardware.wifi.supplicant.xml"], |
| 1147 | required: [ |
| 1148 | "android.hardware.wifi.supplicant.xml", |
| 1149 | ], |
| 1150 | // wpa_supplicant only |
| 1151 | static_libs: [ |
| 1152 | "libwpa_aidl", |
| 1153 | ], |
| 1154 | shared_libs: [ |
| 1155 | // Share between wpa_supplicant and wpa_supplicant_macsec |
| 1156 | "libc", |
| 1157 | "libcrypto", |
| 1158 | "libcutils", |
| 1159 | "libkeystore-engine-wifi-hidl", |
| 1160 | "liblog", |
| 1161 | "libnl", |
| 1162 | "libssl", |
| 1163 | ] + [ |
| 1164 | // wpa_supplicant only |
| 1165 | "android.hardware.wifi.supplicant-V4-ndk", |
| 1166 | "android.system.keystore2-V1-ndk", |
| 1167 | "libbase", |
| 1168 | "libbinder_ndk", |
| 1169 | "libutils", |
| 1170 | ], |
| 1171 | defaults: [ |
| 1172 | "wpa_supplicant_srcs_default", |
| 1173 | "wpa_supplicant_cflags_default", |
| 1174 | "wpa_supplicant_includes_default", |
| 1175 | ], |
| 1176 | soong_config_variables: { |
| 1177 | board_wpa_supplicant_private_lib: { |
| 1178 | static_libs: ["%s"], |
| 1179 | }, |
| 1180 | // init_rc: wpa_supplicant only |
| 1181 | wifi_hidl_unified_supplicant_service_rc_entry: { |
| 1182 | init_rc: ["aidl/android.hardware.wifi.supplicant-service.rc"], |
| 1183 | }, |
| 1184 | }, |
| 1185 | } |
| 1186 | |
| 1187 | wpa_supplicant_cc_binary { |
| 1188 | name: "wpa_supplicant_macsec", |
| 1189 | proprietary: true, |
| 1190 | relative_install_path: "hw", |
| 1191 | srcs: [ |
| 1192 | // wpa_supplicant_macsec only |
| 1193 | ":wpa_supplicant_macsec_extra_driver_srcs", |
| 1194 | "wpas_kay.c", |
| 1195 | "src/ap/wpa_auth_kay.c", |
| 1196 | "src/pae/ieee802_1x_cp.c", |
| 1197 | "src/pae/ieee802_1x_kay.c", |
| 1198 | "src/pae/ieee802_1x_key.c", |
| 1199 | "src/pae/ieee802_1x_secy_ops.c", |
| 1200 | "src/pae/aidl/aidl_psk.cpp", |
| 1201 | ], |
| 1202 | shared_libs: [ |
| 1203 | // Share between wpa_supplicant and wpa_supplicant_macsec |
| 1204 | "libc", |
| 1205 | "libcrypto", |
| 1206 | "libcutils", |
| 1207 | "libkeystore-engine-wifi-hidl", |
| 1208 | "liblog", |
| 1209 | "libnl", |
| 1210 | "libssl", |
| 1211 | ] + [ |
| 1212 | // wpa_supplicant_macsec only |
| 1213 | "android.hardware.macsec-V1-ndk", |
| 1214 | "libbinder_ndk", |
| 1215 | ], |
| 1216 | cflags: [ |
| 1217 | "-DCONFIG_AIDL_MACSEC_PSK_METHODS", |
| 1218 | "-DCONFIG_DRIVER_MACSEC_LINUX", |
| 1219 | "-DCONFIG_MACSEC", |
| 1220 | ], |
| 1221 | local_include_dirs: [ |
| 1222 | // wpa_supplicant_macsec only |
| 1223 | "aidl", |
| 1224 | ], |
| 1225 | defaults: [ |
| 1226 | "wpa_supplicant_srcs_default", |
| 1227 | "wpa_supplicant_includes_default", |
| 1228 | "wpa_supplicant_no_aidl_cflags_default", |
| 1229 | ], |
| 1230 | soong_config_variables: { |
| 1231 | board_wpa_supplicant_private_lib: { |
| 1232 | static_libs: ["%s"], |
| 1233 | }, |
| 1234 | }, |
| 1235 | } |
| 1236 | |
| 1237 | cc_library_shared { |
| 1238 | name: "libwpa_client", |
| 1239 | proprietary: true, |
| 1240 | srcs: [ |
| 1241 | "src/common/wpa_ctrl.c", |
| 1242 | "src/utils/os_unix.c", |
| 1243 | ], |
| 1244 | shared_libs: [ |
| 1245 | "libc", |
| 1246 | "libcutils", |
| 1247 | "liblog", |
| 1248 | ], |
| 1249 | defaults: [ |
| 1250 | "wpa_supplicant_cflags_default", |
| 1251 | "wpa_supplicant_includes_default", |
| 1252 | ], |
| 1253 | } |
| 1254 | |
| 1255 | //## Aidl service library ### |
| 1256 | //####################### |
| 1257 | cc_library_static { |
| 1258 | name: "libwpa_aidl", |
| 1259 | vendor: true, |
| 1260 | cppflags: [ |
| 1261 | "-Wall", |
| 1262 | "-Werror", |
| 1263 | "-Wno-unused-parameter", |
| 1264 | "-Wno-unused-private-field", |
| 1265 | "-Wno-unused-variable", |
| 1266 | ], |
| 1267 | srcs: [ |
| 1268 | "aidl/aidl.cpp", |
| 1269 | "aidl/aidl_manager.cpp", |
| 1270 | "aidl/certificate_utils.cpp", |
| 1271 | "aidl/iface_config_utils.cpp", |
| 1272 | "aidl/p2p_iface.cpp", |
| 1273 | "aidl/p2p_network.cpp", |
| 1274 | "aidl/sta_iface.cpp", |
| 1275 | "aidl/sta_network.cpp", |
| 1276 | "aidl/supplicant.cpp", |
| 1277 | ], |
| 1278 | shared_libs: [ |
| 1279 | "android.hardware.wifi.supplicant-V4-ndk", |
| 1280 | "android.system.keystore2-V1-ndk", |
| 1281 | "libbinder_ndk", |
| 1282 | "libbase", |
| 1283 | "libutils", |
| 1284 | "liblog", |
| 1285 | "libssl", |
| 1286 | ], |
| 1287 | export_include_dirs: ["aidl"], |
| 1288 | defaults: [ |
| 1289 | "wpa_supplicant_cflags_default", |
| 1290 | "wpa_supplicant_includes_default", |
| 1291 | ], |
| 1292 | } |