artf228078-OSP-GEN-Transceive-timeout-is-reduced-to
diff --git a/src/nfa/hci/nfa_hci_main.c b/src/nfa/hci/nfa_hci_main.c
index 9d0af37..0dc08fa 100755
--- a/src/nfa/hci/nfa_hci_main.c
+++ b/src/nfa/hci/nfa_hci_main.c
@@ -280,6 +280,9 @@
#if (NXP_EXTNS == TRUE)
nfa_ee_ce_p61_completed = 0;
nfa_hci_cb.bIsHciResponseTimedout = FALSE;
+ nfa_hci_cb.IsHciTimerChanged = FALSE;
+ nfa_hci_cb.IsWiredSessionAborted = FALSE;
+ nfa_hci_cb.IsLastEvtAbortFailed = FALSE;
read_config_timeout_param_values();
#endif
/* register message handler on NFA SYS */
@@ -909,6 +912,11 @@
nfa_sys_start_timer (&nfa_hci_cb.timer, NFA_HCI_RSP_TIMEOUT_EVT, NFA_HCI_DWP_RSP_WAIT_TIMEOUT);
nfa_hci_cb.IsHciTimerChanged = FALSE;
}
+ else if(nfa_hci_cb.IsWiredSessionAborted)
+ {
+ nfa_sys_start_timer (&nfa_hci_cb.timer, NFA_HCI_RSP_TIMEOUT_EVT, NFA_HCI_DWP_SESSION_ABORT_TIMEOUT);
+ nfa_hci_cb.IsWiredSessionAborted = FALSE;
+ }
else
{
nfa_sys_start_timer (&nfa_hci_cb.timer, NFA_HCI_RSP_TIMEOUT_EVT, nfa_hci_cb.hciResponseTimeout);
@@ -1208,7 +1216,22 @@
GKI_freebuf (p_pkt);
return;
}
+#if (NXP_EXTNS == TRUE)
+ if((pipe == NFA_HCI_APDU_PIPE) && nfa_hci_cb.IsLastEvtAbortFailed)
+ {
+ if(nfa_hci_cb.inst == NFA_HCI_ABORT)
+ {
+ nfa_hci_cb.IsLastEvtAbortFailed = FALSE;
+ }
+ if(nfa_hci_cb.evt_sent.evt_type != NFA_EVT_ABORT)
+ {
+ /*Ignore the response after rsp timeout due to ese/uicc concurrency scenarios*/
+ GKI_freebuf (p_pkt);
+ return;
+ }
+ }
+#endif
/* If we got a response, cancel the response timer. Also, if waiting for */
/* a single response, we can go back to idle state */
if ( (nfa_hci_cb.hci_state == NFA_HCI_STATE_WAIT_RSP) &&
@@ -1489,6 +1512,10 @@
break;
}
}
+ if(nfa_hci_cb.IsEventAbortSent)
+ {
+ nfa_hci_cb.IsLastEvtAbortFailed = TRUE;
+ }
NFC_FlushData(nfa_hci_cb.conn_id);
nfa_hci_cb.IsEventAbortSent = FALSE;
#endif
diff --git a/src/nfa/int/nfa_hci_int.h b/src/nfa/int/nfa_hci_int.h
index 6a76e13..c428417 100755
--- a/src/nfa/int/nfa_hci_int.h
+++ b/src/nfa/int/nfa_hci_int.h
@@ -97,7 +97,8 @@
#define NFA_HCI_MAX_RSP_WAIT_TIME 0x0C
#define NFA_HCI_CHAIN_PKT_RSP_TIMEOUT 30000 /* After the reception of WTX, maximum response timeout value is 30 sec */
#define NFA_HCI_WTX_RESP_TIMEOUT 3000 /* Wait time to give response timeout to application if WTX not received*/
-#define NFA_HCI_DWP_RSP_WAIT_TIMEOUT 2000 /* time out for wired mode response after RF deativation */
+#define NFA_HCI_DWP_RSP_WAIT_TIMEOUT 2000 /* time out for wired mode response after RF deativation */
+#define NFA_HCI_DWP_SESSION_ABORT_TIMEOUT 5000 /* time out for wired session aborted(0xE6 ntf) due to SWP switched to UICC*/
#define NFA_HCI_SESSION_ID_POLL_DELAY 50 /* delay between session ID poll to check if the reset host is initilized or not */
#define NFA_HCI_MAX_SESSION_ID_RETRY_CNT 0x0A /* retry count for session ID poll*/
#define NFA_HCI_NFCEE_DISC_TIMEOUT 0x02 /* NFCEE disc timeout default value in sec*/
@@ -497,6 +498,7 @@
UINT8 host_controller_version; /* no of host controller version */
UINT8 current_nfcee; /* current Nfcee under execution */
BOOLEAN IsHciTimerChanged;
+ BOOLEAN IsWiredSessionAborted;
UINT32 hciResponseTimeout;
BOOLEAN IsChainedPacket;
BOOLEAN bIsHciResponseTimedout;
diff --git a/src/nfc/nfc/nfc_ncif.c b/src/nfc/nfc/nfc_ncif.c
index 782fef9..9f1f02c 100644
--- a/src/nfc/nfc/nfc_ncif.c
+++ b/src/nfc/nfc/nfc_ncif.c
@@ -1015,6 +1015,7 @@
if(status == NFC_STATUS_WIRED_SESSION_ABORTED)
{
nfc_cb.bIsDwpResPending = TRUE;
+ nfa_hci_cb.IsWiredSessionAborted = TRUE;
}
nfa_sys_stop_timer(&nfa_hci_cb.timer);
if(p_cb && p_cb->p_cback)