Continous presence check even I93 tag is removed added fix for handling corrupted RF frames
diff --git a/halimpl/pn54x/hal/phNxpNciHal_ext.c b/halimpl/pn54x/hal/phNxpNciHal_ext.c
index f32699f..ed4453a 100644
--- a/halimpl/pn54x/hal/phNxpNciHal_ext.c
+++ b/halimpl/pn54x/hal/phNxpNciHal_ext.c
@@ -271,6 +271,7 @@
}
if(nxpncihal_ctrl.nci_info.nci_version != NCI_VERSION_2_0)
{
+#if 0 /* this is work around added initially. not required now */
if (p_ntf[p_ntf[2] + 2] == 0x00) {
NXPLOG_NCIHAL_D("> Data of ISO-15693");
p_ntf[2]--;
@@ -278,6 +279,7 @@
} else {
p_ntf[p_ntf[2] + 2] |= 0x01;
}
+#endif
}
} else if (p_ntf[2] == 0x02 && p_ntf[1] == 0x00 && icode_detected == 1) {
NXPLOG_NCIHAL_D("> ICODE EOF response do not send to upper layer");
diff --git a/src/nfc/nfc/nfc_ncif.c b/src/nfc/nfc/nfc_ncif.c
index d25bc03..d59ff87 100644
--- a/src/nfc/nfc/nfc_ncif.c
+++ b/src/nfc/nfc/nfc_ncif.c
@@ -2679,6 +2679,14 @@
data_cevt.status = *(p + p_evt->offset + p_evt->len);
}
}
+#if(NXP_EXTNS == TRUE)
+ if(p_cb->act_protocol == NCI_PROTOCOL_15693)
+ {
+ p_evt->len--;
+ p = (uint8_t *) (p_evt + 1);
+ data_cevt.status = *(p + p_evt->offset + p_evt->len);
+ }
+#endif
(*p_cb->p_cback)(p_cb->conn_id, NFC_DATA_CEVT, (void*)&data_cevt);
p_evt = NULL;
}
diff --git a/src/nfc/tags/rw_i93.c b/src/nfc/tags/rw_i93.c
index 402187d..fbe09fc 100644
--- a/src/nfc/tags/rw_i93.c
+++ b/src/nfc/tags/rw_i93.c
@@ -2733,13 +2733,26 @@
#endif
(void)conn_id;
- RW_TRACE_DEBUG1("rw_i93_data_cback () event = 0x%X", event);
+ if(p_data == NULL) {
+ RW_TRACE_ERROR0 ("rw_i93_data_cback (): p_data is NULL");
+ return;
+ }
- if ((event == NFC_DEACTIVATE_CEVT) || (event == NFC_ERROR_CEVT)||
- ((event == NFC_DATA_CEVT)&&(p_data->status != NFC_STATUS_OK))) {
+ RW_TRACE_DEBUG2 ("rw_i93_data_cback () event = 0x%X 0x%X", event, p_data->status);
+
+ if ((event == NFC_DEACTIVATE_CEVT) || (event == NFC_ERROR_CEVT)
+#if (NXP_EXTNS == TRUE)
+ || ((event == NFC_DATA_CEVT)&&(p_data->status != NFC_STATUS_OK))
+#endif
+ )
+ {
nfc_stop_quick_timer(&p_i93->timer);
-
- if (event == NFC_ERROR_CEVT) {
+#if(NXP_EXTNS == TRUE)
+ if ((event == NFC_ERROR_CEVT) || (p_data->status != NFC_STATUS_OK))
+#else
+ if (event == NFC_ERROR_CEVT)
+#endif
+ {
if ((p_i93->retry_count < RW_MAX_RETRIES) && (p_i93->p_retry_cmd)) {
p_i93->retry_count++;