summaryrefslogtreecommitdiffstats
path: root/libwifi_hal
Commit message (Collapse)AuthorAgeFilesLines
* libwifi_hal: Remove sleep in wifi_unload_driverRoshan Pius2019-04-041-1/+0
| | | | | | | Bug: 129860164 Test: Will send for regression tests Test: Manual tests on Pixel 3 Change-Id: I9bac5ba876e5352c7ec47e7d7299064236bc8346
* Wifi: Add ether_type to sending offloaded packetAhmed ElArabawy2019-03-181-2/+3
| | | | | | | | | | | This commit is part of the addition of the ether_type as an argument to the legacy hal function to send an offloaded packet. Files in this commit are to upadate the stub function for vendor implementation. Bug: 122487582 Test: Manual Change-Id: Iafa40857bb2299ee1037cd5871bbae8d15093e24
* DLKM: Add recovery for driver state change failureAbhishek Srivastava2019-02-071-1/+13
| | | | | | | | | | | | | | | | With DLKM (WIFI_DRIVER_MODULE_PATH) set, the driver state change for WIFI_DRIVER_STATE_ON is checked after the insmod is done. If this driver state is not set to WIFI_DRIVER_STATE_ON due to firmware not ready, there is no recovery with the current implementation. This leaves the driver loaded but not functional and moreover any further attempts to load the driver fails as the driver is already loaded. Address this scenario by removing the driver on the driver state change failure for DLKM drivers. Bug: 123007643 Test: Turn On/Turn Off Wi-Fi multiple times Change-Id: I99e425dee0b1d59ae53e1722a137db3357f5d56e CRs-Fixed: 2214027
* Merge "Add build of Realtek WIFI HAL support" am: 81e8432a1e am: fc730771bbShawn Guo2018-10-181-0/+3
|\ | | | | | | | | | | am: 6e5394a5ee Change-Id: Ie3ae6016bd570c7384a3aea6e5f607babfb8f2a9
| * Add build of Realtek WIFI HAL supportShawn Guo2018-10-171-0/+3
| | | | | | | | | | | | | | Add Realtek WIFI HAL library support for devices that have BOARD_WLAN_DEVICE:=rtl settings. Change-Id: I300c0b6a0217793851d54a12781a73ebcf39c282
* | Wifi HIDL HAL: Removed unused function in DriverToolQuang Luong2018-09-182-42/+0
| | | | | | | | | | | | | | | | Removed DriverTool::TakeOwnershipOfFirmwareReload Bug: 33434584 Test: build, unit tests Change-Id: I2250419a4cd29564d8e2a0ce2a1b16f1d26eaf6c
* | Use getpwnam and getgrnam in libwifi_hal am: bddd3ef5c1 am: a1df98147eColin Cross2018-09-061-2/+27
|\| | | | | | | | | | | am: b12f48bf47 Change-Id: I148977dba7f19dbcacdcedcb3a33bb90adbfd5ac
| * Use getpwnam and getgrnam in libwifi_halColin Cross2018-09-061-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | libwifi_hal is a vendor module, but it was accidentally getting the core version of the libcutils headers which included private/android_filesystem_config.h. Change it to using getpwnam("wifi") and getgrnam("wifi") instead of AID_WIFI. Test: m checkbuild Bug: 63135587 Bug: 114238698 Change-Id: I28f20fd9f4868c0d1e25fda64f477f6d551cc1dd
* | Merge "Wifi: Remove early setting of driver status to ok"Ahmed ElArabawy2018-08-241-5/+17
|\ \
| * | Wifi: Remove early setting of driver status to okAhmed ElArabawy2018-08-201-5/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the wlan.driver.status property is set to 'ok' once the driver is loaded. This is not accurate, cause having the driver loaded does not necessarily means it is ready for operation. This commit removes this early setting of the property. Another change will set it once the driver is fully operational. The 'ok' state is reached when the driver is checked for readiness (which is a vendor specific operation). Bug: 111924712 Test: Manual test Change-Id: I0aba15fa613b52589ce20bbc6209d5775925c8d4 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
* / Fix the DriverTool::IsDriverLoaded()Ahmed ElArabawy2018-08-101-1/+1
|/ | | | | | | | | | | | | In current implementation, the method DriverTool::IsDriverLoaded() implementation calls wifi_unload_driver() which is not right. This method is supposed to just check on the status of the driver, and not change its state. This commit changes this implementation Bug: 112425027 Test: Manual code inspection. Method not called within the code. Change-Id: Icf88a9094f6891753a6d672e41f6ada38656e011
* Implement emulator WiFi vendor HAL libraryBjoern Johansson2018-03-131-0/+2
| | | | | | | | | | | | | The Android emulator has its own WiFi HAL. When building emulator images use that implementation. Bug: 68338427 Test: run cts -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testWifiDownload Exempt-From-Owner-Approval: Change-Id: I2550addedb14c9c9583dee9f43384bd7d17dde27 (cherry picked from commit 53021da028731bb2ff888dc5915dfddb41fc0e40) (cherry picked from commit 602e021b5a0c51ecc72d0a646e521446c6f4abf1)
* WiFi: Add stub for wait_for_driver_ready()Ahmed ElArabawy2018-03-051-0/+5
| | | | | | | | | | | | | This commit is part of the change to add a vendor hal function to wait for the wifi driver ready so frameword does not prematurely start to access it before it is ready for operation. This commit adds the stub for the function for platforms that will not implement this function. Bug: 73482286 Test: Manual Test Change-Id: I5fe646f78cce098e0fc5fd10f20faab06688ac05 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
* Use finit_module syscall to perform insmod operationAjit Kumar2017-11-171-6/+12
| | | | | | | | | Bug: 64383078 Bug: 68050181 Test: Manual Test Change-Id: I57c168a8008de5ce38eb14a3a2bc7d7fdde602a7 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
* [WLAN] Change libcld80211 (vendor-specific) library inclusionEtan Cohen2017-05-031-1/+3
| | | | | | | | | The libcld80211 library is vendor-specific - remove from dependency list. Add as a dependency only for specific vendor. Bug: 37901207 Test: builds and runs Change-Id: I0430c105d613705d88cbe978366e4f3598e953d1
* libwifi-hal-common: Work with BOARD_VNDK_VERSIONSteven Moreland2017-04-171-0/+1
| | | | | | | | | Added explicit cutils header include. Test: works with BOARD_VNDK_VERSION := current Bug: 33241851 Change-Id: I168b682bd5547287f1346008f1256842f3485048
* libwifi-hal-(common|fallback): LOCAL_VENDOR_MODULESteven Moreland2017-04-131-0/+2
| | | | | | | | | | These two static libs are only used by vendor modules and should be marked as such. Bug: 33241851 Test: links Test: try to build with BOARD_VNDK_VERSION := current Change-Id: Ibd3467772861056719e21cffe008174a022f6b32
* Use libhardware_legacy_headersDan Willemsen2017-04-051-3/+4
| | | | | | | | | | Instead of the pathmap or using the global include path (which isn't available when building against the NDK or VNDK). Bug: None Test: mmma -j frameworks/opt/net/wifi/libwifi_hal Change-Id: I8280c9219991c083ca07e7ff7227fd69fe62c2d5 (cherry picked from commit c1c1759c49502d02b712d0c4ffa4b6cc8393df56)
* Merge "Include libcld80211 shared library to resolve linker errors" am: ↵Subhani Shaik2017-03-131-1/+2
|\ | | | | | | | | | | | | | | 49ecbbe78f am: 7e2649ded0 am: 588302913b Change-Id: Iffe512d397abcb03fcfc0519188bc0e7a220ee7e
| * Include libcld80211 shared library to resolve linker errorsSubhani Shaik2017-03-131-1/+2
| | | | | | | | | | | | | | | | WifiHAL uses libcld80211 shared library. Include the same in shared library list wherever libwifi-hal.so is used. Bug: 32775496 Change-Id: Ia40ae22a3afdf8b44635cb930770cb4ad445b259
| * HalTool: Move haltool out of libwifi-systemRoshan Pius2017-03-103-1/+619
| | | | | | | | | | | | | | | | | | | | HalTool is used mainly by test tools and needs to link against libwifi-hal. So, move this out of libwifi-system to libwifi-hal. The libwifi-hal folder will get moved out to hardware/interfaces soon. Bug: 34457880 Test: Compiles & device boots up. Change-Id: I00ce0ed2c271e8c4e1295d004d0b7479365cb8d7
| * Move libwifi-hal and dependencies to /vendorRoshan Pius2017-03-032-0/+53
| | | | | | | | | | | | | | | | | | | | Also, Added a cleanspec to remove the library from /system for incremental builds. Bug: 34457880 Test: Will send for regression tests Change-Id: I8cb2bf54dc48acb7ff9273602e89f071d3e56bb8
| * Cherry-pick: Skip unnecessary wait in driver unloadWei Wang2017-02-031-0/+3
| | | | | | | | | | | | | | | | | | This helps to save the WiFi service start time from 291ms to 58ms measured on marlin. Bug: 33752168 Test: on Marlin Change-Id: I55ab09a2b3605a13cc5c1945986d69ce7ed84170
* | HalTool: Move haltool out of libwifi-systemRoshan Pius2017-03-103-1/+619
| | | | | | | | | | | | | | | | | | | | HalTool is used mainly by test tools and needs to link against libwifi-hal. So, move this out of libwifi-system to libwifi-hal. The libwifi-hal folder will get moved out to hardware/interfaces soon. Bug: 34457880 Test: Compiles & device boots up. Change-Id: I00ce0ed2c271e8c4e1295d004d0b7479365cb8d7
* | Merge "wifi: WIFI_DRIVER_STATE_CTRL_PARAM"TreeHugger Robot2017-02-281-1/+2
|\ \
| * | wifi: WIFI_DRIVER_STATE_CTRL_PARAMKumar Anand2017-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow WIFI_DRIVER_STATE_CTRL_PARAM to be defined even for DLKM cases. A return from insmod (during case of DLKM) does not imply always that driver initialization is complete. During insmod, a driver could merely register the device probe functions and driver operations and return immediately. The real driver initialization can follow later when the device is probed back and firmware is ready. This change allows WIFI_DRIVER_STATE_CTRL_PARAM to be defined even for DLKM case and allows it to block until device is ready for wifi operations. Bug: 35692204 Test: Build success Change-Id: I9b39594178574a76782704aa154bf9df75146949
* | | Move libwifi-hal and dependencies to /vendorRoshan Pius2017-02-282-0/+53
|/ / | | | | | | | | | | | | | | | | | | Also, Added a cleanspec to remove the library from /system for incremental builds. Bug: 34457880 Test: Will send for regression tests Change-Id: I8cb2bf54dc48acb7ff9273602e89f071d3e56bb8
* / Skip unnecessary wait in driver unloadWei Wang2016-12-191-0/+3
|/ | | | | | | | | This helps to save the WiFi service start time from 291ms to 58ms measured on marlin. Bug: 33752168 Test: on Marlin Change-Id: I55ab09a2b3605a13cc5c1945986d69ce7ed84170
* Enable libwifi-hal-common, libwifi_system in the PDKDan Willemsen2016-12-121-3/+0
| | | | | | | | | | | | libwifi-hal-common is required by libhardware_legacy, which does need to build in the PDK. libwifi_system is required by libwificond, which builds in the PDK. Bug: 33451638 Test: With PDK, mmma -j frameworks/opt/net/wifi/libwifi_hal Test: With PDK, mmma -j frameworks/opt/net/wifi/libwifi_system Change-Id: I55a534714e6ce23f39326359cdfaef939fd028df
* driver_tool: query if firmware mode changd is neededRoshan Pius2016-11-172-0/+10
| | | | | | | | This is needed for the HIDL HAL to expose different modes of operation. Bug: 31997422 Test: Compiles Change-Id: I90e552dcaa8d34e2bd3a85439052effc7f060b5f
* Use libbase logging in libwifi_halChristopher Wiley2016-09-092-11/+9
| | | | | | | | | This allows log messages to appear with the global tag of the process using the code, rather than a tag per file. Bug: 31398942 Test: Compiles Change-Id: I90a696eb21764edf1a6430059bcd1903e50bf792
* Run clang-format against libwifi_hal .cpp filesChristopher Wiley2016-09-092-150/+136
| | | | | | | | | Ran clang-format -style=google -i \ wifi_hal_common.cpp \ wifi_hal_fallback.cpp Test: Compiles Change-Id: I5bebc0dfd44ef4a77c3c120f952912c73d9b032a
* Expose a method to take control of firmware pathChristopher Wiley2016-09-093-2/+22
| | | | | | | | | | | | | Rather than exposing the firmware path directly, expose a helper method. This method can be static, since we call it once from wificond's main() and cannot effectively unittest changing filesystem permissions. Hide the firmware path again after this change. Bug: 31225859 Test: Can connect to networks on bullhead with this change. Change-Id: I1b1640f552f78ede2adb7e1273d69cc606543c7b
* Allow wificond to run as wifi:wifiChristopher Wiley2016-08-224-3/+8
| | | | | | | | | | | | | | Expose the firmware path from libwifi_hal. We need to access this at wificond startup to chown the firmware reload path to wifi:wifi. Remove some superfluous chown calls. The callsites should only be used from wificond. Bug: 29870863 Test: wificond unit and integration tests pass Change-Id: If2fa38be252999a01f6d967ca8601d1789318103
* Fix wifi_hal_common for the case where kernel modules are usedAlex Vakulenko2016-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | When WIFI_DRIVER_MODULE_PATH is defined, wifi_hal_common.cpp fails to compile with the following errors: wifi_hal_common.cpp:68: error: undefined reference to 'init_module(void*, unsigned long, char const*)' wifi_hal_common.cpp:81: error: undefined reference to 'delete_module(char const*, unsigned int)' The problem is that this is a C++ source and the extern functions are have C++ name mangling applied to it: $ nm $OUT/obj/STATIC_LIBRARIES/libwifi-hal-common_intermediates/libwifi-hal-common.a | grep _module U _Z11init_modulePvmPKc U _Z13delete_modulePKcj These functions must be declared as extern "C" in order to link successfully with libc.so. BUG=None TEST=m -j32 Change-Id: Ic8f15790b5d92ca40eb14a64ace36fd177cc4ea3
* Merge "Add mocks for wifi libraries"TreeHugger Robot2016-06-292-0/+53
|\
| * Add mocks for wifi librariesChristopher Wiley2016-06-282-0/+53
| | | | | | | | | | | | Bug: 29634806 Change-Id: I2383f4a6294a8ee9e86564ad21c99b539de62eec Test: wificond tests can use these headers
* | Use appropriate CFLAGS when compiling libwifi-halChristopher Wiley2016-06-281-0/+1
|/ | | | Change-Id: I374a7405837031569204bef5912de992acb6e003
* Allow some HAL interactions to be mockedChristopher Wiley2016-06-273-0/+107
| | | | | | | | | | Wrap them in a very thin class to simple mocking. While here, simplify the interface for consumers by exposing simple knobs to change the firmware mode. Bug: 29634806 Change-Id: I49f567f04f0d5b2bcbda3c308ceb4fdd37b3a8b2 Test: Compiles, wificond can consume this code in tests.
* Move device dependent functionality to libwifi-halChristopher Wiley2016-06-173-8/+357
| | | | | | Bug: 29418968 Change-Id: I0fa3047972c57af7128ce6384b62960f6f017d93 Test: wifi works/unittests pass on bullhead
* Wrap vendor provided HAL in libwifi-halChristopher Wiley2016-06-162-0/+86
While here, fix the include paths so that we explicitly refer to the headers in hardware_legacy. Bug: 29396611 Test: Compiles, can associate to an AP on angler/bullhead Test: runtest frameworks-wifi continues to pass Change-Id: Ic76ce613b80eb9b3200699c5e1dd083a43e2b1c5