• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef HARDWARE_LEGACY_WIFI_H
18 #define HARDWARE_LEGACY_WIFI_H
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif /* __cplusplus */
24 
25 /**
26  * Load the Wi-Fi driver.
27  *
28  * @return 0 on success, < 0 on failure.
29  */
30 int wifi_load_driver();
31 
32 /**
33  * Unload the Wi-Fi driver.
34  *
35  * @return 0 on success, < 0 on failure.
36  */
37 int wifi_unload_driver();
38 
39 /**
40  * Check if the Wi-Fi driver is loaded.
41  * Check if the Wi-Fi driver is loaded.
42 
43  * @return 0 on success, < 0 on failure.
44  */
45 int is_wifi_driver_loaded();
46 
47 /**
48  * Return the path to requested firmware
49  */
50 #define WIFI_GET_FW_PATH_STA  0
51 #define WIFI_GET_FW_PATH_AP 1
52 #define WIFI_GET_FW_PATH_P2P  2
53 const char *wifi_get_fw_path(int fw_type);
54 
55 /**
56  * Change the path to firmware for the wlan driver
57  */
58 int wifi_change_fw_path(const char *fwpath);
59 
60 #ifdef __cplusplus
61 }
62 #endif /* __cplusplus */
63 
64 #endif  /* HARDWARE_LEGACY_WIFI_H */
65