<feed xmlns='http://www.w3.org/2005/Atom'>
<title>android_external_libnfc-nxp/src, branch stable/cm-13.0-ZNH2KB</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/'/>
<entry>
<title>Updated path for seperate vendor partition</title>
<updated>2014-06-13T20:40:23+00:00</updated>
<author>
<name>Daniel Rosenberg</name>
<email>drosen@google.com</email>
</author>
<published>2014-06-13T20:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=76f8fa7177767cb377f9212e207e3ac16f9b8d48'/>
<id>76f8fa7177767cb377f9212e207e3ac16f9b8d48</id>
<content type='text'>
Change-Id: I116b76d844c5c89e068acc55430d93c7de8bc61e
Signed-off-by: Daniel Rosenberg &lt;drosen@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I116b76d844c5c89e068acc55430d93c7de8bc61e
Signed-off-by: Daniel Rosenberg &lt;drosen@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnfc-nxp: fix build for 64-bit</title>
<updated>2014-03-22T06:07:36+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2014-03-22T06:05:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=a5282496f1c25f5c8cfefd3b8bc4220ee2192881'/>
<id>a5282496f1c25f5c8cfefd3b8bc4220ee2192881</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash in reader mode.</title>
<updated>2013-09-13T14:15:29+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-09-13T14:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=9e987ccb716624d658f98abc7db2097e11e3d8ed'/>
<id>9e987ccb716624d658f98abc7db2097e11e3d8ed</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Return NFCSTATUS_BUSY in case of invalid state transition.</title>
<updated>2013-04-26T00:27:48+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-04-26T00:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=42f5b41d22bbbad1b16b9cd3aba0512a399f32a6'/>
<id>42f5b41d22bbbad1b16b9cd3aba0512a399f32a6</id>
<content type='text'>
This allows the caller to recovery by trying again.

Bug: 8552749
Change-Id: Iff979c097d33f9adda06654de9e588595daf89a3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows the caller to recovery by trying again.

Bug: 8552749
Change-Id: Iff979c097d33f9adda06654de9e588595daf89a3
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore SE activated mode in case of failure.</title>
<updated>2013-04-12T22:50:29+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-04-12T22:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=d508d9900a7d318073bd7b308d094755df316527'/>
<id>d508d9900a7d318073bd7b308d094755df316527</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure LLCP header fields are reset.</title>
<updated>2013-03-06T21:31:30+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-03-06T21:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=3cbab5882f6d89a52068a3fa72a7223971d6b7fd'/>
<id>3cbab5882f6d89a52068a3fa72a7223971d6b7fd</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix wrong callback being cleared.</title>
<updated>2013-03-06T01:32:58+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-03-06T01:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=837efc3194a03beaaa32b370c63a9270ed9664d8'/>
<id>837efc3194a03beaaa32b370c63a9270ed9664d8</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some LLCP threading issues.</title>
<updated>2013-03-06T01:06:36+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-03-02T01:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=7c4b4fadb66959c50c170182847886e83393eebf'/>
<id>7c4b4fadb66959c50c170182847886e83393eebf</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Immediately bounce back SYMM packet when initiator.</title>
<updated>2013-02-28T21:52:55+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2013-02-28T21:48:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=65e86fce1fe9e3f9aff98861c5e1e9d9ba6df9d5'/>
<id>65e86fce1fe9e3f9aff98861c5e1e9d9ba6df9d5</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>NDEF Type 3 tag reading with padding bytes</title>
<updated>2012-11-28T01:35:13+00:00</updated>
<author>
<name>Sunil Jogi</name>
<email>sunil.jogi@nxp.com</email>
</author>
<published>2012-09-24T21:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_libnfc-nxp/commit/?id=35f614f9db6e01ed6d07eda5fba5d647839d50a3'/>
<id>35f614f9db6e01ed6d07eda5fba5d647839d50a3</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
