summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Stop "LLC length mis-match" log spamstaging/lineage-15.1staging/cm-14.1-cafrebaselineage-15.0cm-14.1_prerebasecm-14.1cm-14.0Vladislav Koldobskiy2016-09-021-1/+1
| | | | | | | | | | | Happens on all Sony fusion3 devices, probably others. The message is not present in stock libnfc.so, most probably Sony decided to remove/comment it too. PS2: change to ALOGV instead... Change-Id: Ib4faa0c571747a874eb582f411bf464622f25d92 (cherry picked from commit 6b8b533fb75d3c356d3fba382d70c4704ed01399)
* Updated path for seperate vendor partitionstaging/cm-12.0-cafstable/cm-13.0-ZNH2KBstable/cm-13.0-ZNH2Kstable/cm-13.0-ZNH0EDaniel Rosenberg2014-06-131-1/+1
| | | | | Change-Id: I116b76d844c5c89e068acc55430d93c7de8bc61e Signed-off-by: Daniel Rosenberg <drosen@google.com>
* Merge "libnfc-nxp: fix build for 64-bit"Colin Cross2014-03-2510-33/+35
|\
| * libnfc-nxp: fix build for 64-bitColin Cross2014-03-2110-33/+35
|/ | | | | | | | Turn off unused parameter warnings to unclutter the build output When storing an int in a void*, use intptr_t to cast between them Store pointer handles in an intptr_t or a uintptr_t Change-Id: If48290ca23dd295f1a87220c5b1d5232ebdc8d45
* am b4564787: Merge "Remove a dependency on a device-kernel-specific header."Elliott Hughes2013-11-221-2/+1
|\ | | | | | | | | * commit 'b4564787a7f8b5e7b9a0147c40a5bf2e83125424': Remove a dependency on a device-kernel-specific header.
| * Merge "Remove a dependency on a device-kernel-specific header."Elliott Hughes2013-11-231-2/+1
| |\
| | * Remove a dependency on a device-kernel-specific header.Elliott Hughes2013-11-221-2/+1
| |/ | | | | | | | | | | | | | | This header isn't in uapi (or in the main linux kernel tree, or in the android linux kernel tree). Bug: 11559337 Change-Id: Iaf4c4c3d0fd4957f5cc16c6422873d94593bd501
* / Fix crash in reader mode.Martijn Coenen2013-09-132-7/+9
|/ | | | | | | | | | | | | The connect callback wasn't cleared in error cases, which could cause spurious callbacks including data that used to be allocated on the stack, and has been freed by now. Also, always add the -3a tech for any IsoDep target, even if the remote device has the P2P bit set. Bug: 10360259 Change-Id: I73141c4a1106f66ff89c6b1c53c4977e9cb78fa1
* Return NFCSTATUS_BUSY in case of invalid state transition.Martijn Coenen2013-04-252-2/+9
| | | | | | | This allows the caller to recovery by trying again. Bug: 8552749 Change-Id: Iff979c097d33f9adda06654de9e588595daf89a3
* Restore SE activated mode in case of failure.Martijn Coenen2013-04-121-0/+3
| | | | | | | | | | | | | There is a tight race condition where opening of the SE can fail, due to a tag/p2p device having just come in. In that case, restore the original state of the SE activated mode. This will prevent future calls into this method and Connect() from immediately bailing out. Bug: 8599167 Change-Id: I1890e4efb73a9f5bdd6abe0644f88051b32e8c02
* Add liblogYing Wang2013-04-091-2/+2
| | | | | Bug: 8580410 Change-Id: Ia6f8b425e15b2cb1f7c5baf7a3db6d8c55afb147
* Make sure LLCP header fields are reset.Martijn Coenen2013-03-062-12/+11
| | | | | | | | | | | In some conditions these would persist over a link tear-down, causing them to be sent out the next time the link comes up. Also, don't overwrite them if a send is still in progress. Change-Id: I19dec5d79ae4b25f41fb5e8a0514e565ceca7a91
* Fix wrong callback being cleared.Martijn Coenen2013-03-054-9/+9
| | | | | | | | | | | When a call to disconnect() failed, the connect() callback was cleared, not the disconnect() one. This would cause deadlocks, where JNI threads were forever blocked on doConnect(). Bug: 7324226 Change-Id: I784c8d700c87d643315f2417610ca75ef8f9aa7c
* Fix some LLCP threading issues.Martijn Coenen2013-03-055-156/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android we now start connecting SNEP/other LLCP services as soon as the link comes up. That means we will have connect requests incoming, accept responses outgoing, connect requests outgoing and accept responses incoming. This lays bare a lot of threading issues in this lib. Since the receives come in serialized, those typically do not cause any issue. However, we may be sending something on a thread coming from the NfcService, while at the same time we'll receive for example a connect frame from the remote, to which the receive thread immediately wants to send a response. This is a first attempt at making sends thread-safe: already there was a lot of logic to deal with the fact that another send was in progress, in the form of the bSendPending variable. That variable was however not checked atomically, and some operations did not even set it correctly. This change tests and sets that variable atomically, more or less implementing a semaphore with try-acquires and fallbacks for the failure case. The generic structure is: if (testAndSetSendPending()) { // Another thread is sending, stash data // and most importantly do *NOT* change shared data } else { // We're now the only one sending, we're free // to change shared data until the callback is // called. } This is just a band-aid fix, but given the fact that this stack will be deprecated it is hopefully enough for our planned usecases. A decent fix would involve switching to a TX-queue per socket, and a generic TX-queue for the whole LLCP link. This allows us to fully decouple the connection layer from the transport layer, as it should be. Change-Id: Ibd8742f7350a58459771f5036a049af3a487f783
* Immediately bounce back SYMM packet when initiator.Martijn Coenen2013-02-281-6/+19
| | | | | | | | | | | | | | On first establishment of the LLCP link, if we are the initiator, we waited the full LTO before sending the SYMM to the target. This will prevent the target from communicating with us for 750ms! Old Android implementations only connected LLCP on touch, but newer ones will immediately connect LLCP. To solve this, bounce the SYMM back immediately, to allow the target to start sending as soon as it wants to. Change-Id: I2fb09599798527f2e6f908b8ba362e0061120be2
* Merge "NDEF Type 3 tag reading with padding bytes" into jb-mr1.1-devMartijn Coenen2012-11-281-1/+13
|\
| * NDEF Type 3 tag reading with padding bytesSunil Jogi2012-11-271-1/+13
| | | | | | | | | | | | | | | | NDEF Type 3 tag reading was not ignoring the padding bytes, which leads to failure of parsing the NDEF data. This patch fix that problem. Bug: 7600630 Change-Id: I45cf1841bdc343503a8a12d622ac8470c3e64ce4
* | Increase default IsoDep timeout to 1200ms.Martijn Coenen2012-11-271-1/+1
|/ | | | | | | | | | | An increasing number of IsoDep tags in the field requires more than 600ms to respond to initial NDEF commands. To make sure we can detect these tags properly, increase the default timeout for IsoDep to ~1200ms. Bug: 7600632 Change-Id: I690e2c1993b64c0f639423d5cf0c810f56ad1197
* am e4d3c945: Merge "Add support for target-customized NFC stack configuration"Martijn Coenen2012-08-302-19/+23
|\ | | | | | | | | * commit 'e4d3c945777c912ba71e79ac99cb11190cf8f90a': Add support for target-customized NFC stack configuration
| * Merge "Add support for target-customized NFC stack configuration"Martijn Coenen2012-08-302-19/+23
| |\
| | * Add support for target-customized NFC stack configurationSebastian Niciarz2012-08-232-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows inclusion of target-customized configuration of NFC stack. The target-specific configuration will be stored in a header file, outside of AOSP. To have it icluded, define TARGET_HAS_NFC_CUSTOM_CONFIG macro and export your header file using BUILD_COPY_HEADERS macro. Change-Id: Ifa2d08c2ae8860c3f0690a04c517025892bd4c16 Author: Sebastian Niciarz <sebastian.niciarz@intel.com> Signed-off-by: Sebastian Niciarz <sebastian.niciarz@intel.com> Singed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 23071
* | | am cbef2c80: Merge "HCI ANY_OPEN_PIPE on identity management gate crash fix"Jeff Hamilton2012-08-291-0/+1
|\| | | | | | | | | | | | | | * commit 'cbef2c806acfba5b63963844fccfe3fae975d6bd': HCI ANY_OPEN_PIPE on identity management gate crash fix
| * | Merge "HCI ANY_OPEN_PIPE on identity management gate crash fix"Jeff Hamilton2012-08-291-0/+1
| |\ \
| | * | HCI ANY_OPEN_PIPE on identity management gate crash fixDejan REBRACA2012-08-141-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, host identity management gate does not support HCI commands coming from another host (including host controller). This patch fixes a tombstone when receiving an HCI command from another host, but still doesn't have a mechanism to treat the command. Change-Id: Ib72df6bac8f503f2b66998ee6e687ae99c15d17b Author: Dejan Rebraca <dejanx.rebraca@intel.com> Signed-off-by: Dejan Rebraca <dejanx.rebraca@intel.com> Signed-off-by: Sebastian Niciarz <sebastian.niciarz@intel.com> Singed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 42426
* | | am 1985108c: Merge "Support of topaz tag NFC Forum version number 1.1"Jeff Hamilton2012-08-291-1/+4
|\| | | | | | | | | | | | | | * commit '1985108ceba65f0b01d5c4c41da49073c5d01230': Support of topaz tag NFC Forum version number 1.1
| * | Merge "Support of topaz tag NFC Forum version number 1.1"Jeff Hamilton2012-08-291-1/+4
| |\ \ | | |/ | |/|
| | * Support of topaz tag NFC Forum version number 1.1Dejan REBRACA2012-08-141-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest version of NFC forum Tag type 1 spec is 1.1. This version number needs to be supported by libnfc to support Topaz tags V1.1 with dynamic content. Version number is part of capability container which resides in segment 1 of EEPROM memory of the tag. For older versions of Tag type 1, NFC device may be backward compatible. Change-Id: Ibbfa720d2e34c2f2612579e368f31f4a5c66b465 Author: Dejan REBRACA <dejanx.rebraca@intel.com> Signed-off-by: Dejan REBRACA <dejanx.rebraca@intel.com> Signed-off-by: Sebastian Niciarz <sebastian.niciarz@intel.com> Singed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 33236
* | phHal4Nfc_ADD: fix memcpy overlapNick Kralevich2012-07-171-5/+8
| | | | | | | | | | | | | | | | | | | | Don't call memcpy when src==dest. It's undefined. When memcpy overlap detection is enabled, this causes the NFC process to crash and burn. Bug: 6826770 Change-Id: I199af98e453953de288964f47248cb59af4deecb
* | phFriNfc_OvrHal: fix memcpy overlapNick Kralevich2012-07-171-1/+4
| | | | | | | | | | | | | | | | | | | | Don't use the API workaround when OvrHal->TranceiveInfo.sRecvData.buffer == pRecvdata->buffer. When memcpy overlap detection is enabled, this causes the NFC process to crash and burn. memcpy is undefined when src=dest. Bug: 6826770 Change-Id: Iebc8f82a4f86d560e764cef2229a7f86fa642783
* | am b668d06f: Reconcile with jb-releaseThe Android Open Source Project2012-06-190-0/+0
|\| | | | | | | | | * commit 'b668d06f9447b613f6e8e65817e12ccd8d2b6225': Revert "Added addr field in response of Jewel command"
| * Reconcile with jb-releaseThe Android Open Source Project2012-06-190-0/+0
| |\ | | | | | | | | | Change-Id: I8d723033a1d479bd9ef5973cb098b488c54c6c62
| | * Revert "Added addr field in response of Jewel command"Martijn Coenen2012-06-141-63/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit c0da27e8f303bf459797f90f9f2e67c552ae8c27. Bug: 6666792 Change-Id: Icf6aa84a750d2e4855487a6e46959019a09e4a95
| | * merge in jb-release history after reset to jb-devThe Android Automerger2012-06-130-0/+0
| | |\
* | | | am f888888a: am 42fef9f8: Revert "Added addr field in response of Jewel command"Martijn Coenen2012-06-141-63/+0
|\| | | | | | | | | | | | | | | | | | | * commit 'f888888a6278d53192bd00b0665c0d39b3cdb6e0': Revert "Added addr field in response of Jewel command"
| * | | am 42fef9f8: Revert "Added addr field in response of Jewel command"Martijn Coenen2012-06-141-63/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '42fef9f8aa6d0878cb3f2c050c637afa7f8d8abd': Revert "Added addr field in response of Jewel command"
| | * | | Revert "Added addr field in response of Jewel command"Martijn Coenen2012-06-141-63/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c0da27e8f303bf459797f90f9f2e67c552ae8c27. Bug: 6666792 Change-Id: Icf6aa84a750d2e4855487a6e46959019a09e4a95
* | | | am 55d095b1: (-s ours) am 144d72d3: Remove some logs in case of abort() (DO ↵Martijn Coenen2012-06-120-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | NOT MERGE). * commit '55d095b160d7e11c5061e213ae2e1f365f556745': Remove some logs in case of abort() (DO NOT MERGE).
| * | | am 144d72d3: Remove some logs in case of abort() (DO NOT MERGE).Martijn Coenen2012-06-121-4/+2
| |\| | | | | | | | | | | | | | | | | | * commit '144d72d32ae420d5f4b25897a43210f56e287637': Remove some logs in case of abort() (DO NOT MERGE).
| | * | Remove some logs in case of abort() (DO NOT MERGE).Martijn Coenen2012-06-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to see more context of HCI timeout crashes. Bug: 6114991 Change-Id: Icfda5d4e15e3ceb471ab24f5cb42001c95e9d034
* | | | Remove some logs in case of abort().Martijn Coenen2012-06-081-4/+3
|/ / / | | | | | | | | | | | | | | | | | | This allows us to see more context of HCI timeout crashes. Change-Id: I5cf1f829f3d0db5afd8d2c753fba7c3f8ad70365
* | | Reconcile with jb-releaseThe Android Open Source Project2012-05-240-0/+0
|\ \ \ | | |/ | |/| | | | Change-Id: I33ff7dfbaeb2e3d39f3235647a4d87fad0d7c57d
| * | merge in jb-release history after reset to jb-devThe Android Automerger2012-05-240-0/+0
| |\ \ | | |/ | |/|
* | | am ba040759: Fix wrong extern variable sizeSunil Jogi2012-05-231-1/+1
|\| | | | | | | | | | | | | | * commit 'ba0407599b6271f47a4e6e6d539522ae5b207287': Fix wrong extern variable size
| * | Fix wrong extern variable sizeSunil Jogi2012-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | nxp_nfc_felica_timeout originally uint8_t but current source has uint32_t. Changed to uint8_t to fix the problem. Without fix it overwrite the other global memory region which can create problem in other section of code.
| | |
| \ \
*-. | | Reconcile with jb-release nakasi-factoryrom-releaseThe Android Open Source Project2012-05-160-0/+0
|\ \| | | |/ / |/| / | |/ Change-Id: Ieee9b73eaf1313ba6307349f72a7d16d980c89d8
| * merge in jb-release history after reset to masterThe Android Automerger2012-04-230-0/+0
|/|
| * merge in jb-release history after reset to masterThe Android Automerger2012-04-180-0/+0
| |\
| | * merge in jb-release history after reset to masterThe Android Automerger2012-04-090-0/+0
| | |\
| | | * merge in jb-release history after reset to masterThe Android Automerger2012-03-210-0/+0
| | | |\
| | | | * merge in jb-release history after reset to masterThe Android Automerger2012-03-200-0/+0
| | | | |\