summaryrefslogtreecommitdiffstats
path: root/libwifi_hal/include
diff options
context:
space:
mode:
authorChristopher Wiley <wiley@google.com>2016-06-16 16:31:01 -0700
committerChristopher Wiley <wiley@google.com>2016-06-17 11:50:59 -0700
commita591506fbf1445877fc2f97bca1e00b51ccc3a85 (patch)
treeb06882f46a46c89b8320d6b4e4b5eb89eacbad6c /libwifi_hal/include
parent6579c9dc1d5ebc056ba7dcc6c23aa25732227124 (diff)
downloadandroid_frameworks_opt_net_wifi-a591506fbf1445877fc2f97bca1e00b51ccc3a85.tar.gz
android_frameworks_opt_net_wifi-a591506fbf1445877fc2f97bca1e00b51ccc3a85.tar.bz2
android_frameworks_opt_net_wifi-a591506fbf1445877fc2f97bca1e00b51ccc3a85.zip
Move device dependent functionality to libwifi-hal
Bug: 29418968 Change-Id: I0fa3047972c57af7128ce6384b62960f6f017d93 Test: wifi works/unittests pass on bullhead
Diffstat (limited to 'libwifi_hal/include')
-rw-r--r--libwifi_hal/include/hardware_legacy/wifi.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/libwifi_hal/include/hardware_legacy/wifi.h b/libwifi_hal/include/hardware_legacy/wifi.h
new file mode 100644
index 000000000..defff0a19
--- /dev/null
+++ b/libwifi_hal/include/hardware_legacy/wifi.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#ifndef HARDWARE_LEGACY_WIFI_H
+#define HARDWARE_LEGACY_WIFI_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/**
+ * Load the Wi-Fi driver.
+ *
+ * @return 0 on success, < 0 on failure.
+ */
+int wifi_load_driver();
+
+/**
+ * Unload the Wi-Fi driver.
+ *
+ * @return 0 on success, < 0 on failure.
+ */
+int wifi_unload_driver();
+
+/**
+ * Check if the Wi-Fi driver is loaded.
+ * Check if the Wi-Fi driver is loaded.
+
+ * @return 0 on success, < 0 on failure.
+ */
+int is_wifi_driver_loaded();
+
+/**
+ * Return the path to requested firmware
+ */
+#define WIFI_GET_FW_PATH_STA 0
+#define WIFI_GET_FW_PATH_AP 1
+#define WIFI_GET_FW_PATH_P2P 2
+const char *wifi_get_fw_path(int fw_type);
+
+/**
+ * Change the path to firmware for the wlan driver
+ */
+int wifi_change_fw_path(const char *fwpath);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* HARDWARE_LEGACY_WIFI_H */