diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/Android.mk | 84 | ||||
-rw-r--r-- | service/jni/com_android_server_wifi_WifiNative.cpp | 4 | ||||
-rw-r--r-- | service/jni/com_android_server_wifi_nan_WifiNanNative.cpp | 2 | ||||
-rw-r--r-- | service/jni/jni_helper.cpp | 2 | ||||
-rw-r--r-- | service/jni/wifi_hal_stub.h | 2 | ||||
-rw-r--r-- | service/lib/wifi_hal.cpp | 6 | ||||
-rw-r--r-- | service/lib/wifi_hal_stub.cpp | 3 |
7 files changed, 28 insertions, 75 deletions
diff --git a/service/Android.mk b/service/Android.mk index 9b3ed1d17..5c824c886 100644 --- a/service/Android.mk +++ b/service/Android.mk @@ -16,79 +16,39 @@ LOCAL_PATH := $(call my-dir) ifneq ($(TARGET_BUILD_PDK), true) -# Make HAL stub library 1 +# This is the HAL stub library. We initialize the HAL function table +# with functions from here so that we have reasonable "unimplemented" +# fallback behavior when a behavior isn't implemented by a vendor. # ============================================================ - -include $(CLEAR_VARS) - -LOCAL_REQUIRED_MODULES := - -LOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ - -Wunused-variable -Winit-self -Wwrite-strings -Wshadow - -LOCAL_C_INCLUDES += \ - external/libnl-headers \ - $(call include-path-for, libhardware_legacy)/hardware_legacy - -LOCAL_SRC_FILES := \ - lib/wifi_hal.cpp - -LOCAL_MODULE := libwifi-hal - -include $(BUILD_STATIC_LIBRARY) - -# Make HAL stub library 2 -# ============================================================ - include $(CLEAR_VARS) - -LOCAL_REQUIRED_MODULES := - -LOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ - -Wunused-variable -Winit-self -Wwrite-strings -Wshadow - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/jni \ - external/libnl-headers \ - $(call include-path-for, libhardware_legacy)/hardware_legacy - -LOCAL_SRC_FILES := \ - lib/wifi_hal_stub.cpp - LOCAL_MODULE := libwifi-hal-stub - +LOCAL_CFLAGS := \ + -Wall \ + -Werror \ + -Wextra \ + -Wno-unused-parameter \ + -Wno-unused-function \ + -Wunused-variable \ + -Winit-self \ + -Wwrite-strings \ + -Wshadow + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/jni \ + $(call include-path-for, libhardware_legacy) +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES) +LOCAL_SRC_FILES := lib/wifi_hal_stub.cpp include $(BUILD_STATIC_LIBRARY) -# set correct hal library path -# ============================================================ -LIB_WIFI_HAL := libwifi-hal - -ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) - LIB_WIFI_HAL := libwifi-hal-bcm -else ifeq ($(BOARD_WLAN_DEVICE), qcwcn) - LIB_WIFI_HAL := libwifi-hal-qcom -else ifeq ($(BOARD_WLAN_DEVICE), mrvl) - # this is commented because none of the nexus devices - # that sport Marvell's wifi have support for HAL - # LIB_WIFI_HAL := libwifi-hal-mrvl -else ifeq ($(BOARD_WLAN_DEVICE), MediaTek) - # support MTK WIFI HAL - LIB_WIFI_HAL := libwifi-hal-mt66xx -endif - # Make the JNI part # ============================================================ include $(CLEAR_VARS) -LOCAL_REQUIRED_MODULES := libwifi-system - LOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ -Wunused-variable -Winit-self -Wwrite-strings -Wshadow LOCAL_C_INCLUDES += \ $(JNI_H_INCLUDE) \ - $(call include-path-for, libhardware)/hardware \ - $(call include-path-for, libhardware_legacy)/hardware_legacy \ libcore/include LOCAL_SHARED_LIBRARIES += \ @@ -96,13 +56,11 @@ LOCAL_SHARED_LIBRARIES += \ libnativehelper \ libcutils \ libutils \ - libhardware \ - libnl \ libdl \ + libwifi-hal \ libwifi-system -LOCAL_STATIC_LIBRARIES += libwifi-hal-stub -LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) +LOCAL_STATIC_LIBRARIES := libwifi-hal-stub LOCAL_SRC_FILES := \ jni/com_android_server_wifi_WifiNative.cpp \ diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp index 7fd7303f9..f4fadde84 100644 --- a/service/jni/com_android_server_wifi_WifiNative.cpp +++ b/service/jni/com_android_server_wifi_WifiNative.cpp @@ -35,9 +35,9 @@ #include <vector> #include "wifi_system/wifi.h" -#include "wifi_hal.h" +#include "hardware_legacy/wifi_hal.h" #include "jni_helper.h" -#include "rtt.h" +#include "hardware_legacy/rtt.h" #include "wifi_hal_stub.h" #define REPLY_BUF_SIZE (4096 + 1) // wpa_supplicant's maximum size + 1 for nul #define EVENT_BUF_SIZE 2048 diff --git a/service/jni/com_android_server_wifi_nan_WifiNanNative.cpp b/service/jni/com_android_server_wifi_nan_WifiNanNative.cpp index d8dce6b1e..fce4e93a7 100644 --- a/service/jni/com_android_server_wifi_nan_WifiNanNative.cpp +++ b/service/jni/com_android_server_wifi_nan_WifiNanNative.cpp @@ -28,7 +28,7 @@ #include <sys/socket.h> #include <linux/if.h> #include "wifi_system/wifi.h" -#include "wifi_hal.h" +#include "hardware_legacy/wifi_hal.h" #include "jni_helper.h" namespace android { diff --git a/service/jni/jni_helper.cpp b/service/jni/jni_helper.cpp index eb4f80cf9..f80b2bd7a 100644 --- a/service/jni/jni_helper.cpp +++ b/service/jni/jni_helper.cpp @@ -24,7 +24,7 @@ #include <utils/String16.h> #include "wifi_system/wifi.h" -#include "wifi_hal.h" +#include "hardware_legacy/wifi_hal.h" #include "jni_helper.h" namespace android { diff --git a/service/jni/wifi_hal_stub.h b/service/jni/wifi_hal_stub.h index d49aeb707..e853c0ce4 100644 --- a/service/jni/wifi_hal_stub.h +++ b/service/jni/wifi_hal_stub.h @@ -22,7 +22,7 @@ extern "C" { #endif -#include "wifi_hal.h" +#include "hardware_legacy/wifi_hal.h" int init_wifi_stub_hal_func_table(wifi_hal_fn *hal_fn); diff --git a/service/lib/wifi_hal.cpp b/service/lib/wifi_hal.cpp deleted file mode 100644 index 25bb373d9..000000000 --- a/service/lib/wifi_hal.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdint.h> -#include "wifi_hal.h" - -wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn) { - return WIFI_ERROR_NOT_SUPPORTED; -} diff --git a/service/lib/wifi_hal_stub.cpp b/service/lib/wifi_hal_stub.cpp index f4165a066..f4c263fd9 100644 --- a/service/lib/wifi_hal_stub.cpp +++ b/service/lib/wifi_hal_stub.cpp @@ -15,7 +15,8 @@ */ #include <stdint.h> -#include "wifi_hal.h" + +#include "hardware_legacy/wifi_hal.h" #include "wifi_hal_stub.h" wifi_error wifi_initialize_stub(wifi_handle *handle) { |