diff options
author | Sunil Jogi <sunil.jogi@nxp.com> | 2012-01-24 11:11:38 -0800 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-01-27 12:17:34 -0800 |
commit | 32060a1ad89a5791039bf4a7e89db6cbc3e669d0 (patch) | |
tree | c4530293f616745716d137091b349a307d0b1fe2 /src/phHal4Nfc_Reader.c | |
parent | 7b187e70a5f0ffc021cc06a9f1a2bf2c0f8f8767 (diff) | |
download | external_libnfc-nxp-32060a1ad89a5791039bf4a7e89db6cbc3e669d0.zip external_libnfc-nxp-32060a1ad89a5791039bf4a7e89db6cbc3e669d0.tar.gz external_libnfc-nxp-32060a1ad89a5791039bf4a7e89db6cbc3e669d0.tar.bz2 |
Adding support for handling maximum length supported by peer
Support for chaining is added based on maximum length supported by and passed in ATS
by peer and maximum length supported by the device.
Change-Id: I8f9f8468ff8ac9d3579bc8b6afbe3e2072e56de8
Diffstat (limited to 'src/phHal4Nfc_Reader.c')
-rw-r--r-- | src/phHal4Nfc_Reader.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/phHal4Nfc_Reader.c b/src/phHal4Nfc_Reader.c index 5a91e85..f27bb09 100644 --- a/src/phHal4Nfc_Reader.c +++ b/src/phHal4Nfc_Reader.c @@ -558,7 +558,7 @@ NFCSTATUS phHal4Nfc_Transceive( Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext; /*Register upper layer callback*/ Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = pTrcvCallback; - if(PH_HAL4NFC_MAX_SEND_LEN + if(psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.MaxFrameLength >= psTransceiveInfo->sSendData.length) { Hal4Ctxt->psTrcvCtxtInfo-> @@ -577,17 +577,17 @@ NFCSTATUS phHal4Nfc_Transceive( Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer = Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer; Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length - = PH_HAL4NFC_MAX_SEND_LEN; + = psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.MaxFrameLength; #if 0 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer - += PH_HAL4NFC_MAX_SEND_LEN; + += psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.MaxFrameLength; #else Hal4Ctxt->psTrcvCtxtInfo->NumberOfBytesSent - += PH_HAL4NFC_MAX_SEND_LEN; + += psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.MaxFrameLength; #endif /*Number of bytes remaining for next send*/ Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->length - -= PH_HAL4NFC_MAX_SEND_LEN; + -= psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.MaxFrameLength; } Hal4Ctxt->Hal4NextState = eHal4StateTransaction; #ifdef TRANSACTION_TIMER |