summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-10Fix leaked nl_msg objectsandroid-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-wear-7.1.1_r1android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-iot-preview-2android-6.0.1_r68android-6.0.1_r67android-6.0.1_r62android-6.0.1_r54android-6.0.1_r53android-6.0.1_r45android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21nougat-mr1-wear-releasen-iot-preview-2marshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-devVinit Deshpande
Colin (ccross@google.com) found out that create() gets called on same object multiple times; without a call to destroy() in between; this causes leaks. This change will destroy the request object, before allowing create to proceed. BUG: 25392275 Change-Id: Id2199346020dd69f735f50fe3b2f11bfe251cad0
2015-09-24Wifi-HAL: Fix incorrect firmware log entryandroid-n-preview-1android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r66android-6.0.1_r65android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r20android-6.0.1_r17android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r41marshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr-devAmarnath Hullur Subramanyam
The commit "Add the fw diag msg hdr" introduced an error while calculating the offset to the next buffer. This caused incorrect firmware log entries in the ring buffer. Change-Id: Iccce94c33a41f62f4e7c3477f603a6c8d33a1efa CRs-Fixed: 913224 Bug: 24350330
2015-09-22WiFi-HAL: Cleanup additional unnecessary logsAmarnath Hullur Subramanyam
In earlier log cleanup few logs got missed, cleaning up the same. This change involves cleanup of wifilogger module as well. Bug: 24266530 Change-Id: I270a9d295e04938df75a5f15f38d3cfc05360a5b
2015-09-22WiFi-HAL: Initialize the bssid hotlist ap lost member variablesAmarnath Hullur Subramanyam
Member variables related to bssid hotlist ap lost were not initialized resulting in invalid values. This change corrects it by initializing this appropriately. Bug: 24266530 Change-Id: I686cb43c860e8f61682d8276461cd7f204dc19b8
2015-09-14NAN: Fix invalid dereference in nan_ind.cppAmarnath Hullur Subramanyam
Fix incorrect pRsp assignment for the getFurtherAvailabilityMap. Add a check to verify the length is always greater than the TLVs passed as response. Bug: 24066021 Change-Id: I987deded13c3dae93fe81dd8a9e4b96b73fc1eff
2015-09-14WiFi-HAL: Fix Nan compilation issueAmarnath Hullur Subramanyam
There was some changes done in NAN files to fix compilation error which were incorrect. Correcting these appropriately as part of this CL. Bug: 24066021 Change-Id: I1131a8be34f9dc6318c98005a05f958214800fb2
2015-09-11WiFi-HAL: Cleanup unnecessary logsAmarnath Hullur Subramanyam
Cleanup unnecessary logs from llstats, gscan, rssi monitor common and tdls modules. Change-Id: If66a8f61b11a101d84546a06514aeb5e0d8fcbfa Bug: 23942132
2015-09-09WiFi-HAL: Consider min threshold only if complete record availableAmarnath Hullur Subramanyam
Buffers will be read if ring buffer reaches minimum configured threshold. It is possible to reach minimum threshold after writing header to the buffer and before writing actual payload. Incomplete buffer will be read out in this case. This commit ensures to read the data from buffer only if complete record is available. Change-Id: I0c558e4cf73ea31892c8c086f2310405ebc49c74 CRs-Fixed: 904848 Bug: 23934884
2015-09-03WiFi-HAL: Write header and payload to same bufferAmarnath Hullur Subramanyam
In case of driver prints and firmware prints, events will be split into write to ring buffer as header and payload. Write header and payload to same buffer so that complete record will be available in a single buffer. Bug:23783279 Change-Id: I54d3f813fbb14932b483cd6423d41c7187a464a9
2015-09-03WiFi-HAL: Write and read data to/from ring buffers record wiseAmarnath Hullur Subramanyam
Currently, ring buffer writes and reads happens with byte boundary. Add support to write only records and do not split any records. BUG=23783279 Change-Id: I2342f86cc4c3a678f21f1595b81e0cdf6d24b2c0
2015-09-02WiFi-HAL: Read complete ring buffer when it is fullAmarnath Hullur Subramanyam
Ring buffer write fails if the ring buffer is full. Push the ring buffer data to upper layer and then try writing the same data again to the ring buffer. Bug: 23758463 Change-Id: I3c9c310bec43d60c580af43157ca174aa524f378
2015-09-02Wifi-Hal: Add the fw diag msg hdrAmarnath Hullur Subramanyam
Include the fw diag msg hdr as part of payload being passed to ring buffer. The firmware logs require the diag hdr info while parsing the logs collected as part of the bugreport. Bug: 23758463 Change-Id: Iacdfc0d380990bb6b1dc7acf8edf95a2302abb63
2015-08-27WiFi-HAL: Unlock mutex before calling framework callbackAmarnath Hullur Subramanyam
As part of earlier commit log_handler and alert_handler were protected by mutex. However, calling framework callback within mutex context would cause deadlock, thus unlock mutex before calling the framework callback and reacquire again when required. Bug: 23530883 Change-Id: If4cd92be906307a9e5ff7a8002b219f93f1bda64
2015-08-26WiFi-HAL: Update handler if an event is already registeredAmarnath Hullur Subramanyam
If an already registered vendor event tries to register for the second time, update the call back function but do not add a new entry to the handlers. Bug: 23483365 Change-Id: I93446721b2e75b768c8f7b40583e7ac7d1e5c282
2015-08-26WiFi-HAL: Handle registerHandler() return value properlyAmarnath Hullur Subramanyam
Treat non zero as error instead of checking explicitly for ret < 0 only. Bug: 23483365 Change-Id: Ic3a331b323eede958cf811086e1f2d7e0cfb2ff7
2015-08-26WiFi-HAL: Do not consider request id to rssi-monitor deregisterAmarnath Hullur Subramanyam
RSSI monitoring gets issued from multiple places and request id can be different. So, no need to consider request id for deregistration. Bug: 23483365 Change-Id: Idf93098e0273b6afaff161d85d805a317714dc24
2015-08-23Wifi-HAL: Avoid Gscan race-condition between events/commandsAmarnath Hullur Subramanyam
We are seeing a race-condition when the event handler function is getting events from the driver and at the same time cleanup is also happening from the command side. Due to the race-condition we are seeing a crash. This commit addresses this by ensuring that the cleanup of event handler happens only when wifihal cleanup is happening and also would happen in the same context in which events are processed. BUG: 23277168 Change-Id: Ib0cbcbd23e2c0424d6f81597685d085d95df340d
2015-08-20WiFi-HAL: Introduce a delay after country code setAmarnath Hullur Subramanyam
Querying for valid channels immediately after country code change may result in invalid channel list as kernel takes some time to populate the channels in driver. A little delay(50 ms) between set_country_code and get_valid_channels can solve the issue. Bug: 22937052 Change-Id: If252ca9512be1cbc9d0b3e4fc80cb703657fc6f2
2015-08-19WiFi-HAL: Protect log_handler and alert_handler with mutexAmarnath Hullur Subramanyam
Protect log_handler and alert_handler with mutex as these can be accessed in both command and event paths. Bug: 23292340 Change-Id: I0565d818e97f81609152b288cc9074d995232744
2015-08-19WiFi-HAL: Populate stats of previous AMPDU if first MPDU missesAmarnath Hullur Subramanyam
Per packet stats module collects below stats from first MPDU of the AMPDU. 1. RxMCS 2. last_transmit_rate 3. rssi 4. tid But the first MPDU may not be received by hardware/corrupted sometimes. Populate the cached stats from first MPDU of the previous AMPDU in such cases. Don't parse Rx packets if the REORDER flag is set as parsing of these packets may show duplicate entries in the stats. Change-Id: I8cf78f42e055b0c22d123f21c91f2c204087afe0
2015-08-10WiFi-HAL: Fix TID issue in Rx per packet statsSubhani Shaik
Firmware sends valid TID only for first MPDU. Populate the same to all other MPDUs. Change-Id: Ie06b1e032c105c3bcd2ccf3ddf9c92524b71c518
2015-08-10WiFi-HAL: Validate debug events with sufficient length onlySubhani Shaik
Frequent updations are expected to the stats structures from firmware. Validating the events received based on its exact size may not be correct in this case. So, consider events as valid only if the size of events is not less than expected. Rx peer info event has been handled with the help flags already. So, remove the duplicate check from parse_rx_stats() Change-Id: I42f2a3f402684fd3de049d7d9fe011068fabb45b
2015-08-10WiFi-HAL: Add missing handlers to function tableSubhani Shaik
There were few handlers missing initialization in the function table which are added as part of this commit. Change-Id: I136879fd6471b5d424ba86fbe085a66313bc2d6a
2015-08-10WiFi-HAL: Removing usage of rand and srand functionsSubhani Shaik
Usage of rand and srand function is a moderate security vulnerability, thus removing the usage of this and replacing with arc4random. Change-Id: I5f24e96817bf3de09848f5626278ac65b00e07ed
2015-08-10WiFi-HAL: Process wifi_get_firmware_memory_dump synchronouslySubhani Shaik
Earlier wifi_get_firmware_memory_dump was processed asynchronously resulting in the event getting dropped. Resolving that by processing that synchronously. Change-Id: I93a4bb9a22d9de98c43ecc93b792fe47785b1cfa
2015-08-07WiFi-HAL: Donot initialize Lowi module for gscan callsAmarnath Hullur Subramanyam
Lowi module initialization is causing crash and this happens as part of gscan functionality. Since, Lowi is not processing GSCAN functionality now do not initialize Lowi module to avoid the crash. Bug: 23004442 Change-Id: Ibadd2f78eb2511054c671fa7434ee3d024e45fc9
2015-08-03WiFi-HAL: Reducing the log prints in case of gscanAmarnath Hullur Subramanyam
In case of report_event being 2 each scan result is forwarded resulting in lot of logs, reducing the logs for the same. Change-Id: I0002939e529fb1eb9bc03895efd3bc4d3fcb64c6
2015-07-24WiFi-HAL: Maintaining Gscan Event Handlers as part of hal_infoAmarnath Hullur Subramanyam
This commit removes the global usage of various Gscan event handlers and makes it part of hal_info structure so that it gets cleaned up as part of wifihal cleanup. This commit also addresses the appropriate cleanup as part of wifihal cleanup. Bug: 22504320 Change-Id: I56ea636e6d47b5fcdd66a9e6db4e2a36e8dac8ba
2015-07-22Wifi-HAL: Add GSCAN CAPABILITIES eventAmarnath Hullur Subramanyam
Add support for GSCAN CAPABILITIES event as part of the Debug Framework. Change-Id: I8c90e56637171a9719f97dc112042037a600e79e
2015-07-22WiFi-HAL: Add reset_log handlers to function tableAmarnath Hullur Subramanyam
Add reset_alert and reset_log handlers to function table to facilitate the upper layers to call these APIs using the callbacks. Change-Id: I33e40a5ffe563e1dd19f63287270a8031bb35a64
2015-07-22Wi-Fi HAL: Remove gscan feature dependency to get valid channelsAmarnath Hullur Subramanyam
Get valid channels is independent of gscan feature. Hence remove the dependency. Change-Id: I33d6196722a27aea19053afefadb9f670baf1a25
2015-07-22WiFi-HAL: Add channel list and scan interval to EPNO attributesAmarnath Hullur Subramanyam
Add an attibute to send channel list in nested format. This attribute can carry information about multiple channels. Scan interval is to indicate interval between PNO scan cycles in msec. Change-Id: I86d9520dc09573676bca000c627d73b6fef8dbc3
2015-07-22WiFi-HAL: Choose appropriate series_bw based on seriesAmarnath Hullur Subramanyam
try_status has a parameter "series" which needs to be considered to select the appropriate series_bw structure. Change-Id: If4cb8c4e54dccf60d083dcaf8ea44a4e51c09046
2015-07-10Wifi-HAL: Increase socket buffer size of event_sockAmarnath Hullur Subramanyam
It was observed that during reportevent 2 case the scan status event was lost since there are multiple back to back fullscan event coming. This commit increases the buffer size and also removes some unnecessary gscan logs. Change-Id: Id35ef90dc435ec9d4a0d56c8bfc20d02eb7b8abc
2015-07-10WiFi-HAL: Log link layer stats with ALOGV levelAmarnath Hullur Subramanyam
Remove the redundant logs and print stats in a structured format with ALOGV log level. Change-Id: I65e604717389e72998924156089c0e5f1d4f2e42
2015-07-09WiFi-HAL: Decode rate and set status for Rx packets properlyAmarnath Hullur Subramanyam
1. Firmware sends stats for failed Rx packets with corresponding error code. Set Rx packet status as success only if none of the error bits are set. 2. Indicate tsf timestamp as the packet timestamp for Rx packets. 3. Correct the rate index calculation. Change-Id: Icbe0c0bb8d8d61d55d1f01b247eb784365dcf8f4
2015-07-09WiFi-HAL: Process Rx events only if it carries Rx descriptorAmarnath Hullur Subramanyam
Process only relevant Rx events coming from driver/firmware to generate Rx per packet stats. Change-Id: I3e3aa309f0cfee828f8075a78f8ff47f1f6da37a
2015-07-09WiFi-HAL: Use correct bandwidth to compute MCS for Tx statsAmarnath Hullur Subramanyam
Get the bandwidth value from Tx stats try list based on total tries and calculate rate based on its value. Set the RSSI value for failed Tx packets to 255, which indicates an invalid value. Change-Id: I7c4b43268627eef1ae6576bd6afd37f1bf55c630
2015-07-09WiFi-HAL: Decode short gi parameter for Rx packetsAmarnath Hullur Subramanyam
Decode short gi value from Rx stats and correct rate calculation based on short gi value. Change-Id: I5db98d3363298820095ee3d0bcd809745b935a4f
2015-07-09WiFi-HAL: populate tx stats for AMPDU packetsAmarnath Hullur Subramanyam
Firmware sends stats only for the first msdu of the AMPDU. Populate stats for other packets based on the tx packet bitmap and block ack bitmap. Change-Id: I530fccc251228962b105d9c18961d29777417d82
2015-07-09WiFi-HAL: Remove returning unnecessary error codesAmarnath Hullur Subramanyam
There is no need of returning error code if the ring buffer write fails because the ring buffer is not enabled yet. Hence donot return error codes in these cases. Change-Id: I8518f341c0057b24cf97e8d63592cb8b034422c4
2015-07-09Wifi-HAL: Fix possible page faults in parsing debug eventsAmarnath Hullur Subramanyam
Fix wrong pointers passed to addLoggerTLV() to avoid possible page faults. Change-Id: I70b67f950d9036199ff13901d44285cfc250e1a2
2015-07-09Wifi-HAL: Fix null check while setting on_alert handlerAmarnath Hullur Subramanyam
While setting on_alert handler, check should be for non-null handler but not null handler. Change-Id: I1823e72cf6d05779f1cfd018fdb5c69a5f570187
2015-07-09WiFi-HAL: Cache and populate Rx aggregated statsAmarnath Hullur Subramanyam
Aggregated Rx packets may have valid data in a specific MSDU of the MPDU. We need to cache the stats received so far and update once the expected MSDU received. Below stats for Rx aggregated packets contains valid values only in the first mpdu of the AMPDU. 1. RxMCS 2. last_transmit_rate 3. RSSI and timestamp is valid only in the last msdu of the last mpdu. Write the updated stats to ring buffer. Change-Id: Ie09992926ae447995946b64c3e8e07dd0650cd5d
2015-07-09WiFi-HAL: Maintain request id in the object of wifiVendorCommandAmarnath Hullur Subramanyam
We may need request id in WifiVendorCommand class to compare with the request id received in asynchronous events. Maintain the request id received from invoker in the object of WifiVendorCommand Change-Id: I6514c912dc41212dc22703af11220378d19551bc
2015-07-09Wifi-HAL: Fix ROAM connectivity event mismatchAmarnath Hullur Subramanyam
Roam Auth complete event is incorrectly mapped in Wifi-HAL, remapping the event to match the driver. Change-Id: If627ce33afc73513be0ae73e7105f4777968a1d5
2015-07-09Wifi-HAL: Fix incorrect PE event mappingAmarnath Hullur Subramanyam
The ASSOC complete event is incorrectly mapped. This event is generated when the connection is complete. Change-Id: Ice68f13b9748c617238a22feea3ed2ec5d08460f
2015-07-09Wifi-HAL: Add Channel Switch eventAmarnath Hullur Subramanyam
Include the Channel Switch anouncement event as apart of the connectivity events. Change-Id: Id702940ece7aa2d2f94e1c05c314887b9ba2a93f
2015-07-09Wifi-HAL: Add new vendor attribute in ePNO configAmarnath Hullur Subramanyam
Add a new attribute to notify the driver whether to use the current EPNO request as PNO or EPNO. Driver can take decision based on its value. Change-Id: I1c8b05fb6c555ecf436ec5832ce0a4ea92c8aec0 CRs-fixed: 855802
2015-07-09Wifi-HAL: Support for LCI/LCRAmarnath Hullur Subramanyam
LCI/LCR related changes Change-Id: Ib5f2cf83bbfeb041e4f6fd4302dd9a45af2e0284