diff options
author | Sunil Jogi <sunil.jogi@nxp.com> | 2012-01-26 17:07:20 -0800 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-01-27 13:03:12 -0800 |
commit | 49adea74868aa2bac7b3f0a1c82be9d956d3a86e (patch) | |
tree | 68f0d604df79a8c4ed03b06152cdcf46ade86ade /src | |
parent | d25018da04378bf0529f82ed03d9e25390216b0b (diff) | |
download | external_libnfc-nxp-49adea74868aa2bac7b3f0a1c82be9d956d3a86e.zip external_libnfc-nxp-49adea74868aa2bac7b3f0a1c82be9d956d3a86e.tar.gz external_libnfc-nxp-49adea74868aa2bac7b3f0a1c82be9d956d3a86e.tar.bz2 |
Update for LLCP V(SA) internal variable
The V(SA) is an internal variable used in LLCP connection-oriented
data links to check receive window conditions. It corresponds to
the last frame number acknowledged by remote peer + 1.
The patch makes sure this variable is updated evry time it is needed.
Change-Id: Ie5ac925a6f1dfa19b22ac2b6e96659440d5daf21
Diffstat (limited to 'src')
-rw-r--r-- | src/phFriNfc_LlcpTransport_Connection.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c index a40c505..54e8610 100644 --- a/src/phFriNfc_LlcpTransport_Connection.c +++ b/src/phFriNfc_LlcpTransport_Connection.c @@ -1016,6 +1016,9 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, } else { + /* Update VSA */ + psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; + /* Test if the Linear Buffer length is null */ if(psLocalLlcpSocket->bufferLinearLength == 0) { @@ -1032,9 +1035,6 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, /* Update VR */ psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; - /* Update VSA */ - psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; - /* Call the Receive CB */ psLocalLlcpSocket->pfSocketRecv_Cb(psLocalLlcpSocket->pRecvContext, NFCSTATUS_SUCCESS); psLocalLlcpSocket->pfSocketRecv_Cb = NULL; @@ -1100,9 +1100,6 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, /* Update VR */ psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; - /* Update VSA */ - psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; - /* Update the length */ psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localRW)].length = 0x00; |