summaryrefslogtreecommitdiff
path: root/qcwcn/wifi_hal/wifi_hal.cpp
AgeCommit message (Collapse)Author
2018-04-24WiFi-Hal: Add write/read and enable/disable ops to Android Packet Filterandroid-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42android-9.0.0_r41android-9.0.0_r40android-9.0.0_r39android-9.0.0_r38android-9.0.0_r37android-9.0.0_r36android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16android-9.0.0_r12android-9.0.0_r11pie-qpr3-s1-releasepie-qpr3-releasepie-qpr3-b-releasepie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-releasepie-dr1-devpie-devpie-b4s4-releasepie-b4s4-devmazumdar
Add write/read and enable/disable ops for APF (Android Packet Filter). Change-Id: Iae573751db0ec80d4404dccfd5056e2767ac113d Bug: 36221302 Test: dumpsys wifi with ag/3937960
2018-04-06WiFi-Hal: Fix checks on logger capabilities of driverBen Fennema
Not all devices support logger, so don't treat the lack of logger capability as a fatal error. Add checking in wifi_logger_ring_buffers_deinit to not cleanup logger when it was not initialized in the first place due to lack of logger support. Call wifi_logger_ring_buffers_deinit in the wifi_initialize failure path. Bug: 77649716 Test: Boot device without logger support and verify wifi works Change-Id: I135ea60b19e347f62b37da76a476f68e8f441501 Signed-off-by: Ben Fennema <fennema@google.com>
2018-03-30WiFi-Hal: Get the interface index only for wlan0mazumdar
The current implementation gets the interface index for the first interface name. This would result in getting the interface index for non wlan0 interfaces too. Hence, check for the specific interface name of "wlan0" for getting the interface index. CRs-Fixed: 2139907 Change-Id: I088be24cac54fa7f66c6106030d9cb39e60f0963 Bug: 76133856 (cherry-picked from 9207f79db9552595e8264bb944f60ac220d9852c)
2018-03-30WiFi-Hal: Add checks on logger capabilities of driverAjit Vaishya
Check the logger feature capabilities advertized by driver in logger APIs. Return WIFI_ERROR_NOT_SUPPORTED if the respective feature is not supported by driver. CRs-Fixed: 2150998 2174271 Change-Id: Icbac7b9cd34a547c4a371f490bf1ff24b6327dfe Bug: 71716861 (cherry-picked from 2d4390b47afd8e895d9ecb46c45e98080386fdd8)
2018-03-30WiFi-Hal: Correct the mapping of wifihal error codesSrinivas Dasari
Correct the mapping of wifihal error codes. Bug: 70872935 Change-Id: Ic8bf0e6796a4e84ec6b540a34af1e202d9501d9e (cherry-picked from 03ef1ab7c2dc2075d7691a396fc7f2547742ede6)
2018-03-30WiFi-Hal: Cleanup unused command register/deregister codeSrinivas Dasari
wifi_register_cmd and wifi_unregister_cmd APIs are not used anymore and can be cleaned up. Bug: 74215851 Change-Id: I2c7de027515ffa85a3c58cea2b41f02c3ee0e56e (cherry-picked from b690ce2542d5ec41014d760860704be50067136d)
2018-03-30WiFi-Hal: Free event_cb only after deregistering all event handlersSrinivas Dasari
event_cb contains the list of vendor commands registered to receive events. Deregister all events before flushing the event_cb. Bug: 74215851 Change-Id: Ic710f8c3f3c81b11c66855999fc12cbd61b52153 (cherry-picked from 158a66fd427b2116777b5b84f3a0b4d60ca66233)
2018-03-06WiFi: Vendor HAL function to wait for driver readyAhmed ElArabawy
This commit adds a vendor hal function to wait for the driver to be ready. This ensures the driver is ready for operatin before framework starts to use it Bug: 73482286 Test: Manual test (reboot and make sure wifi comes up consistently) Test: The reboot test has been performed more than 10 times in a row Test: Also, tested toggling wifi off/on then rebooted, wifi starts fine Change-Id: Ife5a15863b224d59cf04d6dc35b5b5fb85f9161c Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2018-02-05Wifi-HAL: Free the buffers allocated for interfacesSrinivas Dasari
Interfaces are getting freed but buffers allocated for the interfaces are not getting freed. Free the same. CRs-Fixed: 2106880 Change-Id: If62828814f1f2ac6b704207c052d0f75f57a57e6 Bug: 72683986 (cherry-picked from 58d77484f9ed7ac71d9b4866b103aa87847bd44f)
2018-01-23Wifi-HAL: Provision to get the Wi-Fi interface's MAC modeSrinivas Dasari
This commit introduces a call back to get the interface and hardware MAC mode information from the driver. This event is notified from the driver on any connection / disconnection of a specific interface. This shall depict the mode (SCC / MCC / DBS) of the MAC hardware at any given point of time. Bug: 68349158 Test: Compiles (cherry-picked from 0833d0fa4eac75ef172b09b51925ad0dafbfc8e7) Change-Id: Ic9ac81315a9dd50053e927892eb5cf43b999b0d3
2017-12-14WiFi-Hal: Clean up the return codes in wifi-halSubhani Shaik
Use error codes from "enum wifi_error" throughout the wifi-hal. Convert the error codes returned by kernel to "enum wifi_error" codes appropriately before passing them to upper layers. Change-Id: I62937e3c7870ba1b48b8aeedf38c89c2424532b4 (cherry-picked from d54aafdb39c095318c7fecab6551e018297069ed)
2017-07-28Wifi-Hal: Modify tx power API am: 9aebcc18e7Subhani Shaik
am: 4f9b291b88 Change-Id: I4ff1c13ba9ab8c07f842654df8e636a7e177bf16
2017-07-27Wifi-Hal: Modify tx power APISubhani Shaik
Modify the current tx power API to select predefined power settings and apply the same from the BDF file Bug: 62437848 Test: Manual tests Change-Id: Ie0b5a837f4b4e221f7045b1276e02f510f22e256 (cherry-picked from 06dcdb8f68a3d5751e708cd431ae56e62f251e36)
2017-07-27Merge "WiFi-HAL: Map kernel returned error code to wifihal error" into ↵Subhani Shaik
oc-dr1-dev am: 6feb8575f2 Change-Id: I144bce707bd54ca850fb020bd75e979731218924
2017-07-27WiFi-HAL: Map kernel returned error code to wifihal errorSubhani Shaik
Framework expects error codes of type wifi_error from wifihal. Map the error codes returned by kernel to wifi_error value and return the same to framework Bug: 63971485 Test: Ran VTS tests on marlin. Change-Id: Ifbb8cdb9c1177da0c6715ee2a63d4299b71f74e3
2017-07-11WiFi-HAL: Support to set tx_power_limits am: 1906cf3d29Subhani Shaik
am: 682b962975 Change-Id: I8129c6a48e90136f8648461f68ecc7af752b9784
2017-07-11WiFi-HAL: Support to set tx_power_limitsSubhani Shaik
Framework sends tx power limits to wifihal. Forward the same to WLAN driver with the help of nl80211 vendor command. Bug: 62437848 Test: Compiles Change-Id: I3073b98bacec33dc5ec544b8405330e820ed8bec (cherry-picked from 4735b5927aeb8ef7a4fa18a6f694be86478d3beb)
2017-06-30Building libwifi-hal-qcom with BOARD_VNDK_VERSIONJiyong Park
Add missing header dependency and include system headers such as unistd.h and pthread.h explicitly. Bug: 37342627 Test: BOARD_VNDK_VERSION=current m -j libwifi-hal-qcom Change-Id: Id844f42e02f5b1c83a697862204a52e8cdb8198d
2017-03-09WiFi-HAL: changes to support cld80211 familySrinivas Dasari
wifihal debug infrastructure recieves host logs, firmware logs and other debug stats from driver on NETLINK_USERSOCK. Use cld80211 library APIs to receive the same inorder to migrate from NETLINK_USERSOCK to NETLINK_GENERIC. Change-Id: I3eca2ff02ababd3255e3876b2e247eb0d3071e67
2016-12-12WiFiHAL: Add API to enable/disable roamingSubhani Shaik
Add API to enable/disable firmware roaming. Change-Id: I1eee5caf05bdabe79da2b6ad1997b13b6ac3e69f Merged-In: I1eee5caf05bdabe79da2b6ad1997b13b6ac3e69f
2016-12-12WiFiHAL: Configure Roaming parametersSubhani Shaik
Configure blacklist bssid and whitelist ssid information Change-Id: I348d504b55febeb3cc0328d85ad40882c6233d9e Merged-In: I348d504b55febeb3cc0328d85ad40882c6233d9e
2016-12-12WiFiHAL: Get Roaming capabilitiesSubhani Shaik
Get maximum number of blacklist bssids and maximum number of whitelist ssids supported by driver Change-Id: I0abfdd6f9c1c8d77ce5d16bd78a51483de72c947 Merged-In: I0abfdd6f9c1c8d77ce5d16bd78a51483de72c947
2016-12-12WiFiHAL: Isolate bssid_blacklist functionality to wifihalSubhani Shaik
To avoid duplication with roam APIs, blacklist_bssid changes have been removed from gscan.h. So, do not expose wifi_set_bssid_blacklist() API to framework and move the wifi_bssid_params structure definition to wifihal. Change-Id: I31f85b55a6ce6946ecf700bcfa4db440e3582d35 Merged-In: I31f85b55a6ce6946ecf700bcfa4db440e3582d35
2016-12-12WiFiHAL: Get wifi capabilities during initializationSubhani Shaik
Get wifi driver capabilities during wifiHAL initialization and save it locally. When framework queries for capabilities, these are populated from wifiHAL itself instead of sending command to driver Change-Id: If0f7a0e5dd49135f1adc58f3047f385ef352eff9 Merged-In: If0f7a0e5dd49135f1adc58f3047f385ef352eff9
2016-12-12Merge "Update for libnl 3.2.25"Paul Stewart
2016-11-14[AWARE] Add NAN data-path HAL function pointersEtan Cohen
am: e59a77eaa0 Change-Id: I228603ba9609d8b15e54cb7966f0a895ce307306
2016-11-13[AWARE] Add NAN data-path HAL function pointersEtan Cohen
Bug: 26562610 Change-Id: Ia4ed05ba09d0cc467bd0f76b494e323f40eba617
2016-11-11Update for libnl 3.2.25Paul Stewart
NL headers have moved. Private headers are now in their own subdirectory. Bug: 32700211 Test: Compile, connect to WiFi, run "iw link" Change-Id: I69fd006ebe3048538d563d1f91ccf15ebfabd8db
2016-08-30Do not start/stop the driver in HAL startChristopher Wiley
am: f71b2eb448 Change-Id: I06ead37bc4b8f65031d7d39b9e0ea87334da97e1
2016-08-26Do not start/stop the driver in HAL startandroid-n-mr1-preview-2android-n-mr1-preview-1Christopher Wiley
The framework expects to control the state of the driver. The HAL should not be touching it. This code is also a noop on all supported nexi, where the driver is always started. Bug: 29321445 Change-Id: If431b278222ca06a29232874bd0c9870bd0be785 Test: Compiles, wifi continues to work on bullhead (cherry picked from commit 236a52b136b7fdd802389ef1687bd3df37c1adb6)
2016-07-25Wifi-Hal: Set nl socket's local port with nl apiSubhani Shaik
The nl library maintains one local port pool for nl sockets, one port is occupied when new nl socket is allocated and it needs to released, otherwise the nl socket allocation will fail since no local port can be used in nl socket allocation. Wifi hal sets own local port for nl socket directly without calling api and causes leak. BUG: 30350620 Change-Id: I4bb1fd2c352c73cc246a2ba7f837e395f022651f
2016-07-25WiFi-HAL: Avoid race condition in RSSI monitoring commands/eventsSubhani Shaik
There is a possiblility while handling the wlan driver event in the handleEvent of the RssiMonitor, the RssiMonitor stop is also triggered. The stop monitor cleans RssiMonitor command instance. In this case the handleEvent will crash as the object is already deleted. To avoid this scenario moving the handler creation under hal_info and adding checks to ensure that handler is enabled/disabled prior to starting and stopping the monitor command. BUG: 29936203 Change-Id: Id0ab73313a03510f0b15b101e381112c4ace4aef
2016-07-15WiFi-HAL: Fix CLANG warningsSrinivas Girigowda
Fix CLANG warnings. Change-Id: If07194f34abc44e1e58e8b38af59ec705a62ce55 CRs-Fixed: 1015162 Bug: 28825972
2016-04-14Wifi-HAL: promote some messages from INFO to ERRORmukesh agrawal
Originally part of https://partner-android-review.googlesource.com/#/c/558740 BUG=28174258 TEST=compile Change-Id: I0ec26dcf0cffeb7c8d90461dfcddbc419cfaef99
2016-04-14Wifi-HAL: demote some messages from DEBUG to VERBOSEmukesh agrawal
Originally part of https://partner-android-review.googlesource.com/#/c/558740 BUG=27698661 TEST=compile Change-Id: I7264dd7a0095c24bf1f183c9f929bb79ef095703
2016-04-14Wifi-HAL: demote some messages from INFO to VERBOSEmukesh agrawal
Originally part of https://partner-android-review.googlesource.com/#/c/558740 BUG=27698661 TEST=compile Change-Id: I04a6dd680b23322a5382ff144d6ea533f37be2f8
2016-04-13Wifi-HAL: remove some calls to ALOGImukesh agrawal
Originally part of https://partner-android-review.googlesource.com/#/c/558740 BUG=27698661 TEST=compile Change-Id: I6c8d3e09eedd9675439d6a5a5ad17eabc16416db
2016-04-13Merge "WiFi-HAL: Protect packet fate stats resources with mutex" into nyc-devTreeHugger Robot
2016-04-13WiFi-HAL: Protect packet fate stats resources with mutexSubhani Shaik
Wifihal collects packet fate stats to a local buffer and the stats will be copied to the buffers provided by framework in get() APIs. Protect reads and writes to this buffer with a mutex to avoid read from get() while write is going on in the event context. BUG: 27799235
2016-04-08Wifi-HAL: RTT API EnhancementSubhani Shaik
RTT API's are modified to allow responder to indicate the RTT preamble which can be advertised in BLE Beacon. So, modify RTT HAL to comply with new API. BUG: 28071418 Change-Id: I04062e9c603c0f00cc90880f0d6a040b1fe8abe5
2016-03-16Wifi-HAL: Avoid illegal memory access in wifi_set_packet_filter fn.Subhani Shaik
In requestResponse(), nl message is getting freed after receiving a response for the nl message, and wifi_hal is trying to fill the same message again in wifi_set_packet_filter() for next fragment of data. This is causing an invalid memory access. To avoid this, destroy the object after sending each fragment to driver and allocate a fresh object which in turn creates nl message and initializes it. BUG: 27595799 Change-Id: I654203a55206a5efe820146bde43c20b76b55880
2016-03-16Revert "WifiHal: Address Debug framework bugs and misc issues"Mukesh Agrawal
Will land more targeted CLs, with more detail about what's being fixed. This reverts commit c193fd5cb051a566bd1a0e9fd565504cab46ff23. Change-Id: I95d4856ffa69c575790927a6cc90e6c246a39e67
2016-03-16WifiHal: Address Debug framework bugs and misc issuesSubhani Shaik
Fix multiple issues 1) Extract wmsg length from nlmsg_hdr with ntohs() 2) Do not free local frame_content in get() 3) Avoid illegal memory access in wifi_set_packet_filter fn 4) Updating new enums related to WIFI Configuration BUG: 27502434 BUG: 27595799 Change-Id: I369a6b278f3e587f07d3a57be97b61eda658104d
2016-03-08WiFi-HAL: Monitor for packet fate statsAmarnath Hullur Subramanyam
Driver collects stats for first few packets after association. Framework can query for these stats to know the reason if association/any other failure happens. Change-Id: Icc413f503e518a24b6d89578b07b45d11422bb5e CRs-Fixed: 964555
2016-03-08Wifi-HAL: Support for wake reason stats APIAmarnath Hullur Subramanyam
This API gives wifi wake reason accounting info like: - Total cmd event wake count - Total count of driver fw wake - Total data rx packets, that woke up host Change-Id: Ied9a7b97d363ad0b224dcd0c0aa26d1b970ffd4f
2016-02-29Fix a typo in get_available_channel API.Wei Wang
Change-Id: Id6bf290cc69c7a3c192259231845055eb72da3c1
2016-02-09Merge changes I6ac688a1,Ia9a4c6fc,I73b1941a,I23100918 into mm-wireless-devEtan Cohen
* changes: WiFi-HAL: Use separate enum and attribute to get bus size WiFi-HAL: Support for timeout and resource failure events Wifi-HAL: Support for wifi_get_driver_dump API Wifi-HAL: Remove CLANG Warnings and errors.
2016-02-03Wifi-HAL: Support for wifi_get_driver_dump APISubhani Shaik
Add support to collect driver memory dump
2016-02-03Wifi-HAL: Remove CLANG Warnings and errors.Subhani Shaik
Enable LOCAL_CLANG flag. Remove CLANG Errors and warnings.
2016-01-27Enable Rtt Responder Role (4/4).Wei Wang
Change-Id: I280422e5e160b9db741a37b6bb185ec79c155f91