1// Copyright (C) 2011 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// See: http://go/android-license-faq 16package { 17 default_applicable_licenses: ["wlan_wcn6740_qcwcn_license"], 18} 19 20license { 21 name: "wlan_wcn6740_qcwcn_license", 22 visibility: [":__subpackages__"], 23 license_kinds: [ 24 "SPDX-license-identifier-Apache-2.0", 25 "SPDX-license-identifier-BSD", 26 "legacy_not_a_contribution", 27 ], 28} 29 30// Control APIs used by clients to communicate with HAL. 31// ============================================================ 32cc_library_shared { 33 name: "libwifi-hal-ctrl", 34 vendor: true, 35 cflags: [ 36 "-Wno-unused-parameter", 37 "-Wall", 38 "-Werror", 39 ], 40 local_include_dirs: ["wifi_hal_ctrl"], 41 srcs: ["wifi_hal_ctrl/wifi_hal_ctrl.c"], 42 header_libs: ["libcutils_headers"], 43} 44 45cc_library_headers { 46 name: "libwifi-hal-ctrl_headers", 47 vendor: true, 48 header_libs: ["libcutils_headers"], 49 export_include_dirs: ["wifi_hal_ctrl"], 50} 51 52soong_config_module_type { 53 name: "wifi_hal_cc_defaults", 54 module_type: "cc_defaults", 55 config_namespace: "wifi", 56 bool_variables: [ 57 "target_uses_aosp_for_wlan", // TARGET_USES_AOSP_FOR_WLAN 58 ], 59 value_variables: [ 60 "driver_state_ctrl_param", // WIFI_DRIVER_STATE_CTRL_PARAM 61 "driver_state_on", // WIFI_DRIVER_STATE_ON 62 ], 63 properties: [ 64 "cflags", 65 "cppflags", 66 ], 67} 68 69wifi_hal_cc_defaults { 70 name: "libwifi-hal-qcom-defaults", 71 soong_config_variables: { 72 driver_state_ctrl_param: { 73 cflags: ["-DWIFI_DRIVER_STATE_CTRL_PARAM=%s"], 74 }, 75 driver_state_on: { 76 cflags: ["-DWIFI_DRIVER_STATE_ON=%s"], 77 }, 78 target_uses_aosp_for_wlan: { 79 conditions_default: { 80 cflags: ["-DWCNSS_QTI_AOSP"], 81 }, 82 }, 83 }, 84} 85 86// Make the HAL library 87// ============================================================ 88cc_library { 89 name: "libwifi-hal-qcom", 90 vendor: true, 91 defaults: [ 92 "libwifi-hal-qcom-defaults", 93 ], 94 cflags: [ 95 "-Wno-unused-parameter", 96 "-Wall", 97 "-Werror", 98 // gscan.cpp: address of array 'cached_results[i].results' will always evaluate to 'true' 99 "-Wno-pointer-bool-conversion", 100 ], 101 product_variables: { 102 debuggable: { 103 cflags: ["-DLOG_NDEBUG=0"], 104 }, 105 }, 106 header_libs: [ 107 "libcld80211_headers", 108 "libcutils_headers", 109 "libnetlink_iface_headers", 110 "libutils_headers", 111 "libwifi-hal-ctrl_headers", 112 "wifi_legacy_headers", 113 ], 114 local_include_dirs: ["."], 115 srcs: [ 116 "common.cpp", 117 "cpp_bindings.cpp", 118 "gscan_event_handler.cpp", 119 "gscan.cpp", 120 "ifaceeventhandler.cpp", 121 "list.cpp", 122 "llstats.cpp", 123 "nan_ind.cpp", 124 "nan_req.cpp", 125 "nan_rsp.cpp", 126 "nan.cpp", 127 "radio_mode.cpp", 128 "rb_wrapper.cpp", 129 "ring_buffer.cpp", 130 "roam.cpp", 131 "rssi_monitor.cpp", 132 "rtt.cpp", 133 "tcp_params_update.cpp", 134 "tdls.cpp", 135 "wifi_hal.cpp", 136 "wificonfig.cpp", 137 "wifihal_vendor.cpp", 138 "wifilogger_diag.cpp", 139 "wifilogger.cpp", 140 ], 141 shared_libs: [ 142 "libcld80211", 143 "libcrypto", 144 "liblog", 145 "libnetutils", 146 "libnl", 147 "libwifi-hal-ctrl", 148 ], 149 sanitize: { 150 cfi: true, 151 }, 152} 153