summaryrefslogtreecommitdiff
path: root/scanning
AgeCommit message (Collapse)Author
2023-02-10Create variables for PNO scan interval in wificondBruno Kremp
Set PNO scan iterations and interval multiplier as variables and get them from modules instead of hard coding in wificond. Co-authored-by: Ziwen Xiao <Ziwen.Xiao@sony.com> Test: manual test Bug: 208172490 Change-Id: I27100d529f32a724ae948e9ab1c7e9325a0e0374
2023-01-19Add vendor ies in scan probe reqShuibing Dai
Bug: 258285219 Test: manually verified the vendor ies in sniffer probe req pkt. Change-Id: I280e0e122d250d8f3aa749a9e7cec6d75b2c3f8f
2022-12-15Provide Scan failure reason codes to applicationSunil Ravi
Bug: 239210046 Test: compile Change-Id: I1ef3e42f5bf83d8bd1f69b76aba6f2442252864b
2022-04-20Filter out invalid frequencies for PNO scanxshu
Make sure the list of frequencies used for PNO scanning is supported by the device, as invalid/unsupported frequencies will cause a PNO scan to fail. Bug: 194311187 Test: Manual testing with set-pno-request WifiShellCommand Change-Id: Ie8b7fa02281fd73d9250d9e5f0286851ef283b50
2022-03-09Rename getMaxNumScanSsids to getMaxSsidsPerScan in wificond.Gabriel Biren
Bug: 223451099 Test: m Change-Id: I90813602a0088aef663209478976dfb8a7978a61
2022-03-08Add API to wificond to retrieve the max numberGabriel Biren
of SSIDs that the driver supports per scan. Bug: 140003257 Test: Manual test - log the proper value in wificond and compare against the value retrieved in the framework using the new API Change-Id: I60b26effcd5edefcd003179f31f8c4328775e6ec
2021-08-11Fallback to default PNO channels if no frequencyKai Shi
PNO scan is sometimes started with an empty channel list. This happens either because there is only suggested network (from mobile carrier) but no saved network or the frequency from saved network is too old or there is an issue with frequency history restore. In the above case, current design is to scan all supported frequencies again and again which results in high power consumption. This defeats the purpose of "preferred network offload" which is supposed to scan only a few channels. The fix to mitigate this issue: Fall back to default scan channel list if the PNO channel list from framework is empty. Bug: 196246332 Bug: 195029545 Test: delete all saved network, add one saved network, turn off screen. wificond starts with the default PNO channels. Test: scanner unit test Change-Id: I153a04cfe9c82a2c9b21f87c10dd46706135cf3f
2021-02-08Skip hidden networks of SSID length exceeding 32 bytes.Sunil Ravi
Skip hidden networks of SSID exceeding 32 bytes in length from list of networks to scan. Bug: 178511692 Test: Manual - Scan and connect Change-Id: Ia63439c1064a09ba4c8e6747cc20e469c73b70ed
2021-01-27Enable 6Ghz RNR in wificondxshu
Set the NL80211_SCAN_FLAG_COLOCATED_6GHZ flag when 6Ghz RNR is enabled. Also fixes a broken pno scan unit test. Bug: 158335433 Test: manually verified scan_flags with adb logcat Change-Id: I16490d16e6aef1c28ef3cfba31e128bde611bf2e
2021-01-13Only append scan frequencies supported by chipYe Jiao
Some Wi-Fi chips only support 2.4G. But wificond may append default scan frequencies (which contains both 2.4G and 5G frequencies) under certain circumstances and causes error in driver.This change queries band info before appending scan frequencies and filters out unsupported frequencies. Bug: 171764123 Test: Manually on device supporting 2.4G & 5G and on device supporting only 2.4G. Scan frequencies were validated by observing lower layer logs. Change-Id: Ic94e2df18b7d7ca002139e7c78da5a144b2dbcfb
2020-05-07Revert "Scanning: Trigger Wi-fi Recovery on consecutive scan failures."Roshan Pius
This reverts commit 61084a9ad8e2ffcc0fcab6bf33066b85f5fe563a. Reason for revert: b/155922002 This is causing too many false positives. Bug: 155922002 Test: Compiles Change-Id: Idd5e46545b76af080f35c4b65f37fb755f277a1d
2020-04-29Change the threshold for scan failure fatal error count from 5 to 10Sunil Ravi
Some driver/firmware implementations have internal logic to restart the wifi without informing the framework. This takes few seconds(10-20 seconds). During this time, driver returns error for all the commands from upper layer, including scan. So to avoid wifi recovery kicking in on consecutive scan failure faster, increase the threshold for continuous scan failure fatal error count(any scan failure return value other than EBUSY) from 5 to 10. Bug: 154942984 Test: Manual - Forcefully crash the modem and check wificond is not crashing. Change-Id: Ic960bd637fdd8b4481ef8699480c96378561a9eb
2020-04-21Scanning: Trigger Wi-fi Recovery on consecutive scan failures.Purushottam Kushwaha
When driver is in inconsistent state or busy, Normal scan and PNO scan would fail. This commit tracks scan failure count and restarts wificond when the threshold is reached. Threshold for continuous EBUSY failure: 10. Threshold for all other continuous failures: 5 Bug: 153852657 Test: Device boots up and connects to wifi network. Change-Id: I9c0a2d0ec6129f6bde6b5944b918c58de749cad7 Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
2020-02-15[WifiNl80211] Rename WifiNl80211Manager namespaceEtan Cohen
Finish the renaming process from wificond -> nl80211. Bug: 149105833 Test: atest android.net.wifi Test: atest com.android.server.wifi Test: system/connectivity/wificond/runtest.sh Change-Id: Ia430e0c669758c46fca407723db30e076a018729
2020-02-10[WIFICOND] PNO timing issue: int -> long conversionEtan Cohen
The service (java) side was converted to a long representation of the PNO duration. But the daemon (C++) wasn't coverted. Fixed. Bug: 149197916 Test: TBD Change-Id: I82ace5e2d6dfe03d37b0fa2f9526baa17e6e5d50
2020-01-14Wifi: revise native pno settings parcel serializationJimmy Chen
There is a new 6G rssi field in PnoSettings parcel, but this field is not serialized/deserialized properly in native implementation. Bug: 145611476 Test: atest wificond_unit_test manual test * connection to an SSID with at least two BSS * turn screen off * turn off the connected BSS * check PNO scan is fired correctly Change-Id: Idf28d6dfd288402f5f5743e7f81c562baa18ed2e
2019-12-20[wificond] Move to wificond namespaceEtan Cohen
Move the rest of the code to the wifi.wificond namespace from the wifi namespace. Cleanup since wificond is outside the Wi-Fi module. Non-functional change. Bug: 140062898 Test: atest android.net.wifi Test: atest com.android.server.wifi Test: ./system/connectivity/wificond/runtests.sh Test: (CTS) atest android.net.wifi.cts Change-Id: I257cabf92f0046214331616b381981f789933a87
2019-12-12wificond: transfer implementation to android.net.wifiEtan Cohen
Move implementation of wificond to frameworks/base (android.net.wifi) in prepration for making into a public API (which will be a wrapper around the AIDL). Bug: 140062898 Test: ./system/connectivity/wificond/runtests.sh Test: associates, soft AP client information received correctly Change-Id: I22f2e926f0320af9bda758b764d99b8d4a350674
2019-12-05Add minRssi for 6GHz band in PnoSettingsAhmed ElArabawy
This commit adds 6GHz band minRssi value in PnoSettings. Note that the value does not take effect in 80211 interface due to lack of support for NL80211_BAND_6GHZ attribute. Bug: 139354972 Test: Manual Change-Id: Ibe82a43dcc4b47cf41db0983058632d755897831
2019-11-27Revert "wificond: convert to stable Parcelables"Etan Cohen
This reverts commit 848f17843e6999cd427db3906a28814bdea65901. Change-Id: If80305bb2f2b74ccb54ee4f19968b3c90c562fb8
2019-11-27Revert "Moved from wificond AIDL to com.android.server.wifi.wificond"Etan Cohen
This reverts commit d61114cd73368044c4d7fa06398f49fcd14c9051. Change-Id: I3adea9db600b44e10d3829e5cc96e644debac350
2019-10-25wificond: Assert failure for three continuous NODEV errorVinay Gannevaram
If scan failed with NODEV error, wificond considers driver in bad state, and asserts failure to notify framework to restart wifi stack. This would happen if the scan is triggered while Wi-Fi framework transiting to disabling state due to WLAN driver unload. In below scenarios there is a probability of this. - Scans issued during DUT reboot - Scans issued during SSR This change is to assert failure after three continuous NODEV error to avoid wificond restarts in such scenarios. Bug: 143340947 Bug: 142378813 Test: boot-up/wifi functional Test: ./system/connectivity/wificond/runtests.sh Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com> Change-Id: I616a172598e67344433fb565f0b12dd34b5ed7dd
2019-08-29Moved from wificond AIDL to com.android.server.wifi.wificondDavid Su
Moved wificond AIDL from android.net.wifi to com.android.server.wifi.wificond since android.net.wifi should only be used for external APIs to apps. Bug: 140062898 Test: ./runtest.sh Change-Id: Ib7cf128ca584e1432073304aa77e8b78eaf663f1
2019-08-29wificond: convert to stable ParcelablesDavid Su
Converted hand-written AIDL Parcelables to auto-generated Stable AIDL Parcelables. Bug: 140062898 Test: ./runtest.sh Change-Id: I867f5082d79735039c7d458079c5eaf2626b39d1
2019-04-24wificond: Remove offload HAL client codeRoshan Pius
This is unused currently & there are no concrete plans to use it in the future. Bug: 130080335 Test: Device boots up & connects to networks. Test: Will send for regression tests Change-Id: Ibe0b31294a63c8e051565a6f3a423d8eba228ca0
2019-03-21wificond: Realign the arguments in StartScheduledScanAjit Vaishya
This commit realigns the arguments in StartScheduledScan to ensure the Boolean types are together. Change-Id: I52b7c40e7d5449448e9ca868d2f313f684e02381 CRs-Fixed: 2412520 Bug: 123009887 (cherry-picked from 934c490b1c25f1f639faa2446aa98a3d4a572e27)
2019-03-14wifi: Check for sched scan's relative_rssi support to use itAjit Vaishya
Current behavior of the framework is to set the attributes of relative_rssi by default in the sched scan request. Kernel returns a failure if the host driver does not support this capability , but the framework sends the respective attributes. Hence,check the driver support of this feature before accessing its functionality. Change-Id: I51001ac1c167e2fd7ad0508b0e1e02fb11ad6677 CRs-fixed: 2308247 Bug: 123009887 (cherry-picked from 0d6125bc809db8ebac203e4118ea0730dc3f2e57)
2018-12-19Remove unused using decls. am: 1d1dc57558 am: e17143a4d2Chih-Hung Hsieh
am: 8aaed7559b Change-Id: Id4b58c3e4111ed130fda2ee30d2c97ca6d870d2f
2018-12-18Remove unused using decls.Chih-Hung Hsieh
Bug: 121209395 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,misc-unused-using-decls Change-Id: I45cb2a1ee87597d99ac46e638d4d47dec130bd75
2018-11-20disable pno scan fallback mechanism for empty listxshu
When no frequencies are received, we should scan all frequencies to be consistent with the old behavior. Bug: 119579228 Test: compile, unit test Test: Trigger pno scan with no frequency data, verify through logcat that all frequencies are being scanned: wificond: Pno scan started for all supported frequencies Change-Id: I776f129df10ef0a87bd60f3aacd4038542bcd762
2018-11-06Merge "wificond: scan all channels as fallback mechanism"Oscar Shu
2018-11-06Merge "wificond: pno scan selected frequencies only"Oscar Shu
2018-10-29wificond: scan all channels as fallback mechanismxshu
It may take a while for devices to build up frequency data for saved networks. Therefore, include a set of widely used frequencies for pno scanning until sufficient frequency data are built up. Bug: 64312268 Test: compile, unit tests Change-Id: Ia5bd2e83f4bb6dab306c4305158d8d4b70b7aa1b
2018-10-17wificond: pno scan selected frequencies onlyxshu
Bug: 64312268 Test: compile, unit test Test: adb logcat | grep wificond, observe printout. Change-Id: Ibba30f011f2f7b7ed8b18c3a648dd1144a658166
2018-10-08Migrate MAC Addresses and BSSIDs from std::vector to std::arrayDavid Su
Since MAC Addresses and BSSIDs are fixed size, it would be more efficient to use a fixed length array to store them. Also, bugs causing MAC Addresses to have the wrong size can be caught more promptly than before. Bug: 36974160 Fix: 36974160 Test: system/connectivity/wificond/runtests.sh Test: manual - flash onto device and try connecting to Wifi Change-Id: Iefab0b3bbfd286c135b10ccc4fa946faaad86ce4
2018-06-19wificond: Mark scanner impl instance invalidRoshan Pius
The call to ScannerImpl.invalidate() does not reset the |valid_| field currently. This leads to unexpected behavior when any calls are made on that instance after invoking invalidate(). Note: The reported issue is not reproducible on Pixel devices. Bug: 110378816 Test: Unit test Test: Repeatedly toggled wifi state and ensured we connected back. Test: Ran WifiManager ACTS tests Change-Id: I8da3e1d9284ec9e27f8a0980a669611369810c34
2018-02-02wificond: Bug fix for parsing radio chain infoRoshan Pius
The signal strength (RSSI) field is stored as a list of uint8_t attributes in the kernel. Bug: 68335251 Test: Ensured radio chain info is present on crosshatch scan results. Test: ./system/connectivity/wificond/runtests.sh Change-Id: Ic11fca82e78d066ad0bf18fabad5162b5a834b81
2018-02-01wificond: Parse radio chain info in scan resultsRoshan Pius
Bug: 68335251 Test: Existing unit tests (./system/connectivity/wificond/runtests.sh) Note: There are no existing unit tests for scan result parsing because it's non trivial to add them. Test: Verified scans are working with DBS & without DBS flags on taimen. Change-Id: I2a34baa8a798043268a96e540ac375d1abaea67a
2018-02-01wificond: Send DBS scan flags if supportedRoshan Pius
If the device supports the new DBS scan params then, a) For single scans, set the scan flag attribute corresponding to the incoming scan type. b) For PNO scans, always set the low power scan flag attribute. Bug: 68335251 Test: ./system/connectivity/wificond/runtests.sh Change-Id: I9bca3c0dfc4217f9b9c2b9e625863978967ccdbe
2018-02-01wificond: Keep a local copy of the latest nl80211.hRoshan Pius
The libc version of nl80211.h is in sync with stable kernel version supported by Android. This inhibits us from using any new upstream nl80211 APIs, until the oldest supported Android kernel includes those APIs. So keep a local copy of the nl80211.h inside wificond's source tree. This header file need to be manually updated from the latest Pixel kernel tree for new features. Since the nl80211 command set itself is backward compatible, these new features should silently fail on devices runnning older kernels. The current nl80211.h file was picked from `p-dev-msm-bluecross-4.9` kernel branch. Bug: 72709703 Test: wificond compiles with the new headers. Test: Device boots up and connects to wifi networks. Test: Will send for regression tests along with the incoming DBS changes. Change-Id: I0621c78747d4bcca8e1dd198209f86f8ebb802bb
2018-01-19wificond: Add parcelable for DBS scansRoshan Pius
Add parameters in existing |scan_settings| & |scan_results| for supporting DBS scans. These changes are in line with the WifiScanner changes added in ag/3135564 & ag/3135563. Bug:68335251 Test: ./system/connectivity/wificond/runtests.sh Test: Manual Tests (Scans still work) Change-Id: I73f138c35f249c0eb9cbe260bccfbc5c7b5255a9
2017-12-15Support different rssi thresholds for 2g and 5g bandsNingyuan Wang
Bug: 36121542 Test: compile, unit tests Test: will do integration test Change-Id: Ia4528cd30eed5e45a661224fd948fad52eb43ac1
2017-10-24wificond: Move get*Channels() APIsNingyuan Wang
These get*Channels() APIs should be used by java framework in both client and AP mode. They are implemented by GetWiphy command which is associated to a wihpy instead of a interface. We need to move these APIs to wificond main interface for both correctness and convienience. This also removes the corresponding integration test. Since wificond no longer load/unload driver/fw, we are not able to run and verify these tests. It's reasonble to remove them for now. Bug: 35707768 Test: compile, unit tests Change-Id: I7ba562fbb788a6032832a0ab1ff917b5ba869670
2017-09-13Merge "Wificond: Remove mannual memory management in OffloadScanManager" ↵Sohani Rao
into oc-mr1-dev
2017-09-01Count failures on fallback to netlink for pno metricsMehdi Alizadeh
Call OnPnoScanFailed callback if failed to fallback to netlink pno Bug: 32842314 Test: runtests.sh Change-Id: I6aab3c7d95ee0cfd7adc4f5519fcd80caab60759
2017-09-01Wificond: Remove mannual memory management in OffloadScanManagerSohani Rao
Bug: 64853991 Test: Unit tests and on-device testing for finding APs in Offloaded PNO scans Change-Id: I88fcbaed00627a7d282b6214f93419a761764da6
2017-09-01Wificond: Provide a way to enable Offload scansSohani Rao
Enable use of adb shell setprop <property_string> <value> command to enable using offload HAL for disconnected mode PNO scans. Bug: 64944391 Test: Unit test and on device to test to ensure the command works Change-Id: I911a15177f98be6040d161093bf4c97089973b9c
2017-08-11Conditional compile flags not allowed in BoardConfigSohani Rao
The assumption that the Boardconfig.mk will export a flag that will determine support for a feature is incorrect. Remove using of this assumed flag from wificond. Bug: 32842314 Test: Unit tests, On device test Change-Id: I3aa33318a5e220a30f9950a7bb9488058f1421b9
2017-08-11Wificond ScannerImpl Unit testing Offload HALSohani Rao
Wificond ScannerImpl interfaces with Offload HAL to invoke APIs to perform disconnected mode PNO scans. This CL tests behavior of ScannerImpl. Bug: 32842314 Test: Unit test and VTS Change-Id: I070d17c98ce90a9aeded80eac7135d02e36f0231
2017-08-11Wificond: Address bugs in handling Offload scansSohani Rao
This CL addresses the following issues in handling of Offload HAL scan results from the Offload HAL service - Make cached scan results member variable a pointer so that the memory for the vector can be allocated on the heap - When an Async Error occurs in the Offload HAL service, switch to performing PNO scans over netlink instead of letting it decide again. - OffloadScanUtils convertToNativeScanResults() now needs to take in a pointer to the vector that will store the scan results for retrieval. - Populate tsf field fo the scanResult so that it doesn't get filtered out by the framework - Add logging to scan stats Bug: 63148974 Test: Unit tests, on-device testing for ensuring we connect to an available access point from screen off disconnected mode. Change-Id: Ida507d857faa8ea6dbee362cf0116f8ca858963f