diff options
author | Jooyung Han <jooyung@google.com> | 2023-03-07 16:44:22 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2023-04-26 06:49:14 +0000 |
commit | 60ab6fc1bbc1538abc015a4f688c58e034473fe0 (patch) | |
tree | f3ca7e73dfec9528f3ed148328bb9ffdd9757cde | |
parent | a6cff5308e091e1ab7c1f304a093e79de4cd889b (diff) | |
download | wlan-60ab6fc1bbc1538abc015a4f688c58e034473fe0.tar.gz |
Migrate libwifi-hal-syna to Android.bpplatform-tools-34.0.4main-16k
Bug: 271952010
Test: m libwifi-hal (for a target BOARD_WLAN_DEVICE=synadhd)
Merged-In: I58668f9573f718a6fb79c2cd7df687756ffcb578
Change-Id: I58668f9573f718a6fb79c2cd7df687756ffcb578
(cherry picked from commit 432d78ce817826de3580555c7d984bc8c1cef267)
-rw-r--r-- | synadhd/wifi_hal/Android.bp | 93 | ||||
-rwxr-xr-x | synadhd/wifi_hal/Android.mk | 69 | ||||
-rwxr-xr-x | synadhd/wifi_hal/common.cpp | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/common.h | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/cpp_bindings.cpp | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/cpp_bindings.h | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/gscan.cpp | 2 | ||||
-rw-r--r-- | synadhd/wifi_hal/link_layer_stats.cpp | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/nan.cpp | 2 | ||||
-rw-r--r-- | synadhd/wifi_hal/rtt.cpp | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/twt.cpp | 2 | ||||
-rwxr-xr-x | synadhd/wifi_hal/wifi_hal.cpp | 4 | ||||
-rwxr-xr-x | synadhd/wifi_hal/wifi_logger.cpp | 2 | ||||
-rw-r--r-- | synadhd/wifi_hal/wifi_offload.cpp | 2 |
14 files changed, 106 insertions, 82 deletions
diff --git a/synadhd/wifi_hal/Android.bp b/synadhd/wifi_hal/Android.bp new file mode 100644 index 0000000..b7a2c49 --- /dev/null +++ b/synadhd/wifi_hal/Android.bp @@ -0,0 +1,93 @@ +// Copyright (C) 2011 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. + +// Make the HAL library +// ============================================================ +package { + // See: http://go/android-license-faq + default_applicable_licenses: [ + "Android-Apache-2.0", + ], +} + +soong_config_module_type_import { + from: "frameworks/opt/net/wifi/libwifi_hal/Android.bp", + module_types: ["wifi_cc_defaults"], +} + +wifi_cc_defaults { + name: "libwifi-hal-syna-defaults", + soong_config_variables: { + google_wifi_config_lib: { + shared_libs: ["google_wifi_firmware_config_version_c_wrapper"], + cflags: [ + "-DGOOGLE_WIFI_FW_CONFIG_VERSION_C_WRAPPER", + // only for pixel feature + "-DRING_DUMP", + ], + }, + }, +} + +cc_library_static { + name: "libwifi-hal-syna", + + defaults: [ + "libwifi-hal-syna-defaults", + ], + + cflags: [ + "-Wall", + "-Werror", + "-Wno-format", + "-Wno-reorder", + "-Wno-unused-function", + "-Wno-unused-parameter", + "-Wno-unused-private-field", + "-Wno-unused-variable", + "-Wno-unused-parameter", + ], + + header_libs: [ + "libhardware_legacy_headers", + "liblog_headers", + "libnetlink_iface_headers", + "libutils_headers", + ], + + shared_libs: [ + // added for libwifi-hal-syna + "libcrypto", + // shared_libs in libwifi-hal + "liblog", + "libnl", + "libutils", + ], + + srcs: [ + "wifi_hal.cpp", + "rtt.cpp", + "common.cpp", + "cpp_bindings.cpp", + "gscan.cpp", + "nan.cpp", + "link_layer_stats.cpp", + "wifi_logger.cpp", + "wifi_offload.cpp", + "twt.cpp", + ], + + proprietary: true, + +} diff --git a/synadhd/wifi_hal/Android.mk b/synadhd/wifi_hal/Android.mk deleted file mode 100755 index a3dc4a3..0000000 --- a/synadhd/wifi_hal/Android.mk +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (C) 2011 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. - -LOCAL_PATH := $(call my-dir) - -# Make the HAL library -# ============================================================ -include $(CLEAR_VARS) - -LOCAL_CFLAGS := \ - -Wall \ - -Werror \ - -Wno-format \ - -Wno-reorder \ - -Wno-unused-function \ - -Wno-unused-parameter \ - -Wno-unused-private-field \ - -Wno-unused-variable \ - -Wno-unused-parameter - -LOCAL_C_INCLUDES += \ - external/libnl/include \ - $(call include-path-for, libhardware_legacy)/hardware_legacy \ - external/wpa_supplicant_8/src/drivers - -LOCAL_C_INCLUDES += \ - external/boringssl/include \ - external/boringssl/src/crypto/digest \ - external/boringssl/src/crypto/evp/ - -LOCAL_HEADER_LIBRARIES := libutils_headers liblog_headers - -ifneq ($(wildcard vendor/google/libraries/GoogleWifiConfigLib),) -LOCAL_SHARED_LIBRARIES += \ - google_wifi_firmware_config_version_c_wrapper -LOCAL_CFLAGS += -DGOOGLE_WIFI_FW_CONFIG_VERSION_C_WRAPPER -#only for pixel feature -LOCAL_CFLAGS += -DRING_DUMP -endif - -LOCAL_SRC_FILES := \ - wifi_hal.cpp \ - rtt.cpp \ - common.cpp \ - cpp_bindings.cpp \ - gscan.cpp \ - nan.cpp \ - link_layer_stats.cpp \ - wifi_logger.cpp \ - wifi_offload.cpp \ - twt.cpp - -LOCAL_MODULE := libwifi-hal-syna -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_PROPRIETARY_MODULE := true - -include $(BUILD_STATIC_LIBRARY) diff --git a/synadhd/wifi_hal/common.cpp b/synadhd/wifi_hal/common.cpp index 5a9d5ab..1a55aac 100755 --- a/synadhd/wifi_hal/common.cpp +++ b/synadhd/wifi_hal/common.cpp @@ -33,7 +33,7 @@ #include <netlink/socket.h> #include <netlink/handlers.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/common.h b/synadhd/wifi_hal/common.h index ebf6cb3..248ba1f 100755 --- a/synadhd/wifi_hal/common.h +++ b/synadhd/wifi_hal/common.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #ifndef __WIFI_HAL_COMMON_H__ #define __WIFI_HAL_COMMON_H__ diff --git a/synadhd/wifi_hal/cpp_bindings.cpp b/synadhd/wifi_hal/cpp_bindings.cpp index 5311e6e..de0c27c 100755 --- a/synadhd/wifi_hal/cpp_bindings.cpp +++ b/synadhd/wifi_hal/cpp_bindings.cpp @@ -36,7 +36,7 @@ #include <ctype.h> #include <errno.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/cpp_bindings.h b/synadhd/wifi_hal/cpp_bindings.h index 8b5600a..cc1c662 100755 --- a/synadhd/wifi_hal/cpp_bindings.h +++ b/synadhd/wifi_hal/cpp_bindings.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "sync.h" diff --git a/synadhd/wifi_hal/gscan.cpp b/synadhd/wifi_hal/gscan.cpp index 995c989..19bab2b 100755 --- a/synadhd/wifi_hal/gscan.cpp +++ b/synadhd/wifi_hal/gscan.cpp @@ -40,7 +40,7 @@ #include <log/log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/link_layer_stats.cpp b/synadhd/wifi_hal/link_layer_stats.cpp index 8de7acd..ee7b468 100644 --- a/synadhd/wifi_hal/link_layer_stats.cpp +++ b/synadhd/wifi_hal/link_layer_stats.cpp @@ -39,7 +39,7 @@ #include <utils/Log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/nan.cpp b/synadhd/wifi_hal/nan.cpp index 8fea66b..9cd01c5 100755 --- a/synadhd/wifi_hal/nan.cpp +++ b/synadhd/wifi_hal/nan.cpp @@ -40,7 +40,7 @@ #include <utils/Log.h> #include <log/log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" #include "netinet/in.h" diff --git a/synadhd/wifi_hal/rtt.cpp b/synadhd/wifi_hal/rtt.cpp index 6bb0a49..9716c0e 100644 --- a/synadhd/wifi_hal/rtt.cpp +++ b/synadhd/wifi_hal/rtt.cpp @@ -43,7 +43,7 @@ #include <log/log.h> #include <utils/String8.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/twt.cpp b/synadhd/wifi_hal/twt.cpp index 15bb738..e3dd5bd 100755 --- a/synadhd/wifi_hal/twt.cpp +++ b/synadhd/wifi_hal/twt.cpp @@ -39,7 +39,7 @@ #include <utils/Log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" diff --git a/synadhd/wifi_hal/wifi_hal.cpp b/synadhd/wifi_hal/wifi_hal.cpp index c7f31d4..fa0d6f6 100755 --- a/synadhd/wifi_hal/wifi_hal.cpp +++ b/synadhd/wifi_hal/wifi_hal.cpp @@ -47,10 +47,10 @@ #define LOG_TAG "WifiHAL" #include <log/log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> +#include <hardware_legacy/rtt.h> #include "common.h" #include "cpp_bindings.h" -#include "rtt.h" #include "syna_version.h" #include <stdio.h> #include <string> diff --git a/synadhd/wifi_hal/wifi_logger.cpp b/synadhd/wifi_hal/wifi_logger.cpp index c1a6f26..fdd4e00 100755 --- a/synadhd/wifi_hal/wifi_logger.cpp +++ b/synadhd/wifi_hal/wifi_logger.cpp @@ -45,7 +45,7 @@ #include <log/log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" #include <sys/stat.h> diff --git a/synadhd/wifi_hal/wifi_offload.cpp b/synadhd/wifi_hal/wifi_offload.cpp index 1702ffd..a24a882 100644 --- a/synadhd/wifi_hal/wifi_offload.cpp +++ b/synadhd/wifi_hal/wifi_offload.cpp @@ -42,7 +42,7 @@ #include <log/log.h> -#include "wifi_hal.h" +#include <hardware_legacy/wifi_hal.h> #include "common.h" #include "cpp_bindings.h" |