Skip to content

Commit

Permalink
Avoid missing NFCIP inbound frame.
Browse files Browse the repository at this point in the history
If a NFCIP frame is received (NXP_EVT_NFC_RCV_DATA event) before a call to
phHal4Nfc_Receive() function, the frame was lost. This could happen if the local
host acts as a Target and the remote peer sends its first frame too fast.

The data is actually saved in a temporary buffer but, when the phHal4Nfc_Receive()
is eventualy called, it triggers a callback with a status code
NFCSTATUS_MORE_INFORMATION, which is handled as an error.

This patch fixes this behaviour and makes sure that the correct status
code is provided with the frame itself.

Change-Id: I5311762ca70c71f98dea0287b0844eb1c8dddb6b
  • Loading branch information
Sylvain Fonteneau authored and jham committed Apr 14, 2011
1 parent 46dbed4 commit 7b40e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/phHal4Nfc_P2P.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void phHal4Nfc_RecvCompleteHandler(phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,void *pInfo)
Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
= PH_OSALNFC_INVALID_TIMER_ID;
Hal4Ctxt->psTrcvCtxtInfo->RecvDataBufferStatus
= NFCSTATUS_MORE_INFORMATION;
= NFCSTATUS_PENDING;
}
}
if(NULL == Hal4Ctxt->psTrcvCtxtInfo)
Expand Down

0 comments on commit 7b40e6d

Please sign in to comment.