summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Yu <yujun@marvell.com>2015-11-01 14:34:45 -0800
committerMohammed Habibulla <moch@google.com>2015-11-06 10:08:46 -0800
commitf6076a89a58856363a9b34f594473cd30c09e4a8 (patch)
tree5fbd18fddbbfa074668a3ce96d0b84c019ee1dcf
parentf817656608e32a5c93d92a95e54a2d6afe8c98e9 (diff)
downloadmarvell-f6076a89a58856363a9b34f594473cd30c09e4a8.tar.gz
libMarvellWireless.so: the prebuild library to communicate with marvell wireless daemon
Linked to the old CL: https://partner-android-review.googlesource.com/#/c/488291/ Changed the copy path name from abox to abox_edge in file Android.mk and libwireless.mk BUG=25486837 Change-Id: I0579c750db9cda3515233611ec986edad8af78a6
-rw-r--r--peripheral/libwireless/Android.mk22
-rw-r--r--peripheral/libwireless/marvell_wireless.h44
-rw-r--r--peripheral/libwireless/mwirelessd.rc20
-rw-r--r--soc/iap140/modules/libwireless.mk22
4 files changed, 108 insertions, 0 deletions
diff --git a/peripheral/libwireless/Android.mk b/peripheral/libwireless/Android.mk
new file mode 100644
index 0000000..142ce5e
--- /dev/null
+++ b/peripheral/libwireless/Android.mk
@@ -0,0 +1,22 @@
+# Copyright (C) 2015 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)
+
+include $(CLEAR_VARS)
+LOCAL_PREBUILT_LIBS := ../../../../../vendor/bsp/marvell/device/abox_edge/libs/libMarvellWireless.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_OWNER := marvell
+include $(BUILD_MULTI_PREBUILT)
+
diff --git a/peripheral/libwireless/marvell_wireless.h b/peripheral/libwireless/marvell_wireless.h
new file mode 100644
index 0000000..4c52206
--- /dev/null
+++ b/peripheral/libwireless/marvell_wireless.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2005. Marvell International Ltd
+ *
+ * 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.
+ */
+
+#ifndef __MARVELL_WIRELESS_INTERFACE_
+#define __MARVELL_WIRELESS_INTERFACE_
+
+int wifi_enable(void);
+int wifi_disable(void);
+int wifi_set_drv_arg(const char * wifi_drv_arg);
+int uap_enable(void);
+int uap_disable(void);
+int bluetooth_enable(void);
+int bluetooth_disable(void);
+int bluetooth_poweron(void);
+int bluetooth_poweroff(void);
+int bt_set_drv_arg(const char * bt_drv_arg);
+/* Force marvell wireless chip power off
+ * Return value:
+ * 0 : The command has been implemented;
+ * 1 : The command is not supported(The feadture is disabled).
+ *----------------------------------------------------
+ * To enable/disable the feature, please set the property:
+ * persist.sys.mrvl_wl_recovery
+ * 1: enable; 0: disable.
+ */
+int mrvl_sd8xxx_force_poweroff();
+int wifi_get_fwstate();
+int wifi_get_card_type(char * reply, size_t reply_len);
+
+#endif /*__MARVELL_WIRELESS_INTERFACE_*/
+
diff --git a/peripheral/libwireless/mwirelessd.rc b/peripheral/libwireless/mwirelessd.rc
new file mode 100644
index 0000000..65774a1
--- /dev/null
+++ b/peripheral/libwireless/mwirelessd.rc
@@ -0,0 +1,20 @@
+# Copyright (C) 2015 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.
+
+# The Marvell designed wireless hardware control logic, including wifi and bluetooth
+# The main purpose is to install/uninstall the wifi/bluetooth kernel drivers
+# and configure the wifi/bluetooth driver behavior.
+
+service mwirelessd /system/bin/wireless_daemon
+ class late_start
diff --git a/soc/iap140/modules/libwireless.mk b/soc/iap140/modules/libwireless.mk
new file mode 100644
index 0000000..2c38b48
--- /dev/null
+++ b/soc/iap140/modules/libwireless.mk
@@ -0,0 +1,22 @@
+# Copyright (C) 2015 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.
+
+PRODUCT_COPY_FILES += \
+ $(TOP)/vendor/bsp/marvell/device/abox_edge/hal/wifi/daemons/wireless_daemon:/system/bin/wireless_daemon \
+ $(TOP)/hardware/bsp/marvell/peripheral/libwireless/mwirelessd.rc:/system/etc/init/mwirelessd.rc
+
+PRODUCT_PACKAGES += \
+ libMarvellWireless
+
+BOARD_SEPOLICY_DIRS += hardware/bsp/marvell/peripheral/libwireless/sepolicy