summaryrefslogtreecommitdiffstats
path: root/libwifi_system
Commit message (Collapse)AuthorAgeFilesLines
* [LSC] Add LOCAL_LICENSE_KINDS to frameworks/opt/net/wifiandroid-s-preview-1Bob Badour2021-02-121-0/+4
| | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: libs/WifiTrackerLib/Android.bp libs/WifiTrackerLib/tests/Android.bp libwifi_hal/Android.mk libwifi_system/Android.bp libwifi_system_iface/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I11fdd71c841bd97b9d7b874bf7c6998e7bf92899
* [VTS] Add more time for wpa_supplicant to stopHai Shalom2019-05-311-1/+1
| | | | | | | | | | | Failure in the bug may be related to the fact that the phone's CPU was busy and supplicant daemon was not killed within 5 seconds. This change increases the timeout to 20 seconds, similarly to the wait time for starting the daemon. Bug: 134090626 Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_2Host Change-Id: I02a577a8ecdd839a94a4a56a5ad9a7abe2d14e8f
* SupplicantManager: Remove |ensure_config_file_exists|Roshan Pius2018-02-131-97/+0
| | | | | | | | | | This is now done inside the HIDL interface. Bug: 36645291 Test: Device boots up and connects to wifi networks on upgrade/fresh builds. Change-Id: Iacd981a3d181d351b852f93b61ae854b9e0f32c7
* libwifi-system: Remove unused methods from HostapdManagerRoshan Pius2018-01-126-354/+0
| | | | | | | | This functionality has been migrated to the HIDL interface. Bug: 36646171 Test: Compiles Change-Id: If3fb7a016459fa5ddf33c4df064250cc543a0d5d
* Revert "Enable acs for hotspot channel selection"mukesh agrawal2018-01-124-47/+20
| | | | | | | | | | | | | | | | | This reverts commit b8b86ec1082f38402d74ab51553adb42ef8e8ff3. Bug: 71878020 Test: tests/wifitests/runtests.sh (on walleye) Test: manual (on walleye) Manual test ----------- - enable 5 GHz wifi hotspot from settings $ adb logcat -d -b main hostapd '*:S' -e 'ACS' | wc -l 0 - verify that another phone shows walleye's softap in scan results Change-Id: I12b80a874ec859ef166f94bf5bb26442fcdba1eb
* Enable acs for hotspot channel selectionNingyuan Wang2018-01-094-20/+47
| | | | | | | | | | | | | | | | | | Bug: 69065316 Test: tests/wifitests/runtests.sh (on walleye) Test: manual Test: wifi sanity (http://b/71636949) Manual test ----------- - enable wifi hotspot from settings $ adb logcat -b main hostapd '*:S' -e 'ACS' 01-04 18:03:53.482 3040 3040 I hostapd : ACS: Automatic channel selection started, this may take a bit 01-04 18:03:53.482 3040 3040 I hostapd : ACS: Offloading to driver 01-04 18:03:53.827 3040 3040 I hostapd : nl80211: ACS Results: PCH: 6 SCH: 0 BW: 20 VHT0: 0 VHT1: 0 HW_MODE: 1 01-04 18:03:53.827 3040 3040 I hostapd : wlan0: ACS-COMPLETED freq=2437 channel=6 Change-Id: I66782e5921db9063acc1dc8433b42edda120278e
* wifi_supplicant: deprecate entropy.binJeff Vander Stoep2017-12-012-52/+0
|\ | | | | | | | | | | am: bef8d2a2c6 Change-Id: I95fc824d2e5b8040b69dd4772ac29611a6d2436a
| * wifi_supplicant: deprecate entropy.binJeff Vander Stoep2017-11-302-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | Wpa_supplicant's random pool is not necessary on Android. Randomness is already provided by the entropymixer service which ensures sufficient entropy is maintained across reboots. Commit b410eb1913 'Initialize /dev/urandom earlier in boot' seeds /dev/urandom with that entropy before either wpa_supplicant or hostapd are run. Bug: 34980020 Test: Use wifi and wifi tethering on Taimen. Change-Id: I5c9bde6cd1de14ff56d68f5e03c5b102a6b052ff
| * Remove hostapd.conf before starting TetheringDaisuke Niwa2017-10-051-0/+4
| |\ | | | | | | | | | | | | | | | am: dc24ed7ffb Change-Id: I06bcd9c340231fa716860577763e00c432df705a
| | * Remove hostapd.conf before starting TetheringDaisuke Niwa2017-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fails to start Wi-Fi Tethering at first boot after OS version up from Android N to O. It is caused by permission. Owner of hostapd.conf is "system" on Android N. However, it is "wifi" on Android O. hostapd.conf doesn't need to be handed over because it is created again when Tethering is started. Bug: 67351973 Change-Id: Ia7c87ab1f2040434963f6e0670ccd02cdd84bee7
* | | Remove hostapd.conf before starting TetheringDaisuke Niwa2017-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fails to start Wi-Fi Tethering at first boot after OS version up from Android N to O. It is caused by permission. Owner of hostapd.conf is "system" on Android N. However, it is "wifi" on Android O. hostapd.conf doesn't need to be handed over because it is created again when Tethering is started. Bug: 67351973 Test: manually run tethering Change-Id: Ia7c87ab1f2040434963f6e0670ccd02cdd84bee7
* | | Refactor hostapd manager unit testsNingyuan Wang2017-08-151-48/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to expand hotstapd manager, we might introduce new parameters to hostapd config file. This CL refactors hostapd manager unit tests, allowing the unit tests to be more scalable. Bug: 34669770 Test: compile, unit tests Change-Id: I97d946d6bbf011691d2ef72e05819f0ee71137b3
* | | Use cc_library for libwifi_system[_iface].Tri Vo2017-08-041-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Both static and shared versions are now available. These libs are dependencies of VtsHalWifiSupplicantV1_0TargetTest, but are not guaranteed to be on the device. So the static versions are needed for testing. Bug: 64040096 Test: compiles Change-Id: Ia1e551f5a90bfe8f06c245c4102be375de8f3f26
* | Add missing gmock.h includes for mock class headersNingyuan Wang2017-06-263-0/+3
| | | | | | | | | | | | | | | | | | | | Mock class headers should include gmock.h, otherwise it imposes a requirement that anyone who uses the mock class header should include gmock.h before that. Bug: 62961379 Test: compile, unittests Change-Id: I788badd961de04dc6a0c584e08264c94692250b5
* | Merge "Improve logging for supplicant config file" into oc-devNingyuan Wang2017-06-151-8/+14
|\| | | | | | | | | | | am: 619693476e Change-Id: I0eee0a03535f531ccd1cf6f7062a2f981e85df09
| * Merge "Improve logging for supplicant config file" into oc-devTreeHugger Robot2017-06-151-8/+14
| |\
| | * Improve logging for supplicant config fileNingyuan Wang2017-06-011-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Supplicant config could be in either /system or /vendor, we should only log error if we can't find it in both places. Bug: 62268780 Test: compile, unit tests, manual test Change-Id: I5a66ef27385aee79f3ec6fdcaafc46c8cda793d8
* | | Merge "Print stat() info on hostapd config file error" into oc-devNingyuan Wang2017-06-121-0/+8
|\| | | | | | | | | | | | | | | | | am: 706ca6ce2d Change-Id: I99bb100cf91e03ca1a57923ccf6477ac27ca81ca
| * | Print stat() info on hostapd config file errorNingyuan Wang2017-06-081-0/+8
| |/ | | | | | | | | | | | | | | | | | | This infomration will be helpful for debugging on writing hostapd file error. Bug: 37535105 Test: compile, manual test Change-Id: Iee07a02227601adcf1e8d6ed3aad86b19251184f
* | Split InterfaceTool from libwifi-system.soLogan Chien2017-04-264-192/+0
| | | | | | | | | | | | | | | | | | | | | | This commit extracts InterfaceTool from libwifi-system.so into a new library named libwifi-system-iface.so. libwifi-system-iface.so will be vendor_available because it will be used by both wificond and android.hardware.wifi@1.0-service. Bug: 37429084 Test: Sailfish builds, boots, and wifi works. Change-Id: Iad93c6d258507df3bbb97228814ff5ce5cc2a2f9
* | Convert Android.mk to Android.bpLogan Chien2017-04-262-76/+77
|/ | | | | | | | | | | This commit converts Android.mk to Android.bp. Besides, during the transition, we found that $(wificond_cpp_flags) should be $(wifi_system_cflags). Bug: 37429084 Test: Sailfish builds, boots, and wifi works. Change-Id: Ida255cd6ac0cd9434bd95f1ae570683dccb0388e
* lib-wifisystem: Remove unused dependenciesNingyuan Wang2017-03-316-476/+52
| | | | | | | | | | | | This removes ununsed libwpa_client, libnetutils, libnl from libwifi-system. This also removes wifi.h and wifi.cpp. The only useful function ensure_entropy_file_exists() is moved to SupplicantManager. Bug: 36697996 Test: compile, manual test: wifi works with toggling Change-Id: I1f55813ee43a821d18d2368c1cc28a3bf95b6c93
* Merge "wpa_supplicant.conf can be in either /system or /vendor"TreeHugger Robot2017-03-141-5/+13
|\
| * wpa_supplicant.conf can be in either /system or /vendorJiyong Park2017-03-101-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | wpa_supplicant.conf is not generic and thus it should be moved to /vendor/etc/wifi. However because we currently have many non-generic products that put the file in /system/etc/wifi, supplicant_manager is modified to read both places; /vendor/etc/wifi is accessed if it can't read the file under /system/etc/wifi. Bug: 36015569 Test: have wpa_supplicant.conf under /vendor/etc/wifi and not under /system/etc/wifi. Wifi should work. Change-Id: I4d6969ab4b224e5aaee132ccf6f64cdc9b56f48a
* | HalTool: Move haltool out of libwifi-systemRoshan Pius2017-03-103-620/+1
|/ | | | | | | | | | 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 "Enable libwifi-hal-common, libwifi_system in the PDK"Dan Willemsen2016-12-131-4/+0
|\
| * Enable libwifi-hal-common, libwifi_system in the PDKDan Willemsen2016-12-121-4/+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
* | Remove obsoleted HAL API set_bssid_blacklistRandy Pan2016-12-121-7/+0
|/ | | | | | | Bug: 32907214 Test: Bulid Change-Id: Ibeedb6f95349ce8f225228ba02cdd4eedc599074 Merged-In: Ibeedb6f95349ce8f225228ba02cdd4eedc599074
* Add a helper to read the interface stateChristopher Wiley2016-09-223-9/+38
| | | | | | | | | | This helper doesn't really distinguish between "I failed to read the state" and "state is down" but I think that if we cannot observe the interface to be up, it may as well be down. Bug: 31337216 Test: Compiles Change-Id: Id48968844fea120bc0a4c439693db58d72feb4a1
* Remove superfluous definition of wpa_ctrl_cleanupChristopher Wiley2016-08-251-1/+0
| | | | | | | | | We no longer use this in wifi.cpp, and the two definitions cause problems at link time on platforms without supplicant. Bug: 29620309 Change-Id: I97bf827ec114343d0885a2b148e5f9adc4510a62 Test: Should fix build on mac
* Move supplicant management functions to delegateChristopher Wiley2016-08-256-190/+319
| | | | | | | | | This makes them easier to mock out in unit testing. Bug: 29620309 Test: wificond integration tests continue to pass Change-Id: I5b794b9b5c7fb291d253e28ca5f60cd69f39c280
* Allow wificond to run as wifi:wifiChristopher Wiley2016-08-222-13/+1
| | | | | | | | | | | | | | 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
* Remove hostapd pid manipulationChristopher Wiley2016-08-222-42/+0
| | | | | | | | | This is no longer needed now that we can clean up after unclean shutdowns. Bug: 31023120 Change-Id: I459d62d3f199c8acd35a139fa4f8ca60042d6bbf Test: wificond unit and integration tests pass
* Rely on wificond to start/stop supplicantChristopher Wiley2016-08-121-4/+2
| | | | | | | Bug: 30666540 Test: Still able to connect via WiFi Change-Id: Ia8a706db70be18b2d4b4687400d9a06d0819690e
* Always start/stop wpa_supplicant service on requestChristopher Wiley2016-08-122-46/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | For a given product, P2P is either supported or not supported, depending on the product configuration and hardware support. Because of this, on a given product, we do not need to determine which wpa_supplicant configuration to run, we can just use "whatever the given product supports." We've changed init files to define a single service "wpa_supplicant". In places where there were both p2p_supplicant and wpa_supplicant services defined, we have removed the wpa_supplicant service, and replaced it with the definition of p2p_supplicant. Above the supplicant we choose for a given platform, we still keep the hooks that allow optional P2P support in the framework, since the framework needs to support hardware with P2P support, and hardware without. Bug: 30816535 Test: unit tests pass on bullhead Test: cts-tradefed run cts-dev \ --module=CtsNetTestCases \ --test=android.net.wifi.cts.ConcurrencyTest passes Change-Id: I6ea65fde1707f65e70b41c94ca823bb2318d81f0
* Set SOCK_CLOEXEC on libwifi-system interface socketChristopher Wiley2016-08-021-1/+1
| | | | | | This is more hygienic, although not especially necessary. Change-Id: I68d4e19c2daa0a2231b6ae2d0cffd2833a4f7913
* Merge "Use android-base/logging.h in libwifi-system"TreeHugger Robot2016-08-022-8/+11
|\
| * Use android-base/logging.h in libwifi-systemChristopher Wiley2016-08-012-8/+11
| | | | | | | | | | | | | | This allows log messages to properly inherit the log tag of the logging process. Change-Id: Ib40b991842ea741cce33f20db2253723d3fdbef1
* | Merge "Track hostapd's life via pid files"Christopher Wiley2016-08-022-14/+39
|\ \
| * | Track hostapd's life via pid filesChristopher Wiley2016-08-012-14/+39
| |/ | | | | | | | | | | | | | | | | | | init now writes hostapd's pid to a file. We can use this information to check if there is a process that looks like hostapd running. Bug: 30311493 Change-Id: I3ad24b5fa70ae963c1aa0d4b1c11d00f60dff8d1 Test: with a patch to wificond, hostapd starts and stops reliably on bullhead
* / Fix libwifi-system unit testsChristopher Wiley2016-07-291-1/+1
|/ | | | | | Bug: 30311493 Change-Id: I117433e486d65e408ed523a4d5f10d0c49562399 Test: These pass again.
* Give hostapd its own directory for control socketsChristopher Wiley2016-07-271-1/+1
| | | | | | | | | | hostapd likes to create/remove this directory when it starts up. This is especially true when hostapd encounters an error, and tries to remove the control socket directory. Bug: 30311493 Change-Id: Ifce67d54e510b39918a2141ececf569daf0e82af Test: hostapd starts up/shuts down (even on error) without avc denials
* Add MockHostapdManager class declarationChristopher Wiley2016-07-211-0/+46
| | | | | | | | | Having this mock in a shared location helps us not duplicate it across different binaries linking libwifi-system. Bug: 30040724 Change-Id: I5ea4c84d1af29f9eb1c1da8339b45a6c135b6920 Test: Unit tests using this class pass.
* Move hostapd management logic to libwifi-systemChristopher Wiley2016-07-185-0/+475
| | | | | | | | | | | | | | | | | This is the logic that existed in netd, but moved into a mockable C++ object and formulated to support unittesting the config file generation. Bug: 30040724 Test: unit tests pass, data for tests extracted from config files generated by existing netd code. Test: netd continues to be able to set up APs for tethering using libwifi-system rather than previous code. Test: No SELinux policy violations during/after setup. Test: Can sign in to network backed by hostapd started by netd using libwifi-system. Change-Id: I1156c494fc889a3fdf14182b11c7697d93fdf586
* Add mocks for wifi librariesChristopher Wiley2016-06-283-5/+95
| | | | | | Bug: 29634806 Change-Id: I2383f4a6294a8ee9e86564ad21c99b539de62eec Test: wificond tests can use these headers
* Allow libwifi-system to be mockedChristopher Wiley2016-06-275-24/+38
| | | | | | | Bug: 29634806 Test: Compiles, unittests pass on bullhead Change-Id: Ic3baf86961be077231d40ae1732b127d668e9589
* clang-format libwifi-systemChristopher Wiley2016-06-222-435/+425
| | | | | | | | | | | | | | | The only changes in this CL are the result of: find . -name "*.cpp" | xargs clang-format \ -style='{BasedOnStyle: Google, DerivePointerAlignment: false, PointerAlignment: Left}' -i A similar command for headers makes no edits. Bug: 29418225 Change-Id: Ifcf8be88cb5c95fb6f35615f25ec83e1421ba343
* Move basic HAL init code to libwifi_systemChristopher Wiley2016-06-213-1/+620
| | | | | | | | | | While here, fix a bug where the conditional for "do we support getting valid channels" was reversed in the implementation. Bug: 29417819 Test: Compiles, Wifi continues to associate on angler Change-Id: Ife3eee3aa25dfaf62589b395c74c4f8473238758
* Move set_iface_flags to libwifi-systemChristopher Wiley2016-06-203-1/+119
| | | | | | | | | | | | | Rename to the more accurate set_iface_up(). Expose an alias to encode assumptions about global iface names. Return an error when buffer overflow is averted. Handle EINTR from ioctls. Wrap socket fd in a scoped closer. Minor refactors to clean up logic and remove dead logging. Bug: 29417819 Change-Id: Ib1fde6dae5e3068643950d0905f5761d0c9b6daf Test: Compiles, WiFi still associates on bullhead.
* Make wifi.c code a little more C++Christopher Wiley2016-06-203-132/+146
| | | | | | | | | | | | Compile functionality as C++. Put everything in namespaces. Remove string #defines from the header. Reorder public function definitions to match the header. Bug: 29418225 Test: Compiles Change-Id: I5461f5cfe0db24e338c24489df511eea2257dc39