SemDemon triple mode test are failing due to NFC service crash
diff --git a/halimpl/pn54x/hal/phNxpNciHal.c b/halimpl/pn54x/hal/phNxpNciHal.c
index fd81212..111aec8 100644
--- a/halimpl/pn54x/hal/phNxpNciHal.c
+++ b/halimpl/pn54x/hal/phNxpNciHal.c
@@ -1209,6 +1209,8 @@
long bufflen = 260;
long retlen = 0;
unsigned long num = 0;
+ static uint8_t init_param;
+ init_param = *p_core_init_rsp_params;
phNxpNci_EEPROM_info_t mEEPROM_info = {.request_mode = 0};
static uint8_t android_l_aid_matching_mode_on_cmd[] = {
0x20, 0x02, 0x05, 0x01, 0xA0, 0x91, 0x01, 0x01};
@@ -1226,6 +1228,7 @@
/*MW recovery -- begins*/
if ((*p_core_init_rsp_params > 0) && (*p_core_init_rsp_params < 4)) {
retry_core_init:
+ *p_core_init_rsp_params = init_param;
config_access = false;
if (mGetCfg_info != NULL) {
mGetCfg_info->isGetcfg = false;
diff --git a/src/nfc/nfc/nfc_ncif.c b/src/nfc/nfc/nfc_ncif.c
index 6d2cdca..e5b2bd9 100644
--- a/src/nfc/nfc/nfc_ncif.c
+++ b/src/nfc/nfc/nfc_ncif.c
@@ -1894,6 +1894,7 @@
nfc_cb.bCeActivatedeSE = true;
nfc_ncif_resume_dwp_wired_mode();
}
+ nfc_main_flush_cmd_queue();
}
}
#endif
@@ -2236,8 +2237,11 @@
nci_snd_core_init();
#endif
} else {
- NFC_TRACE_ERROR0("Failed to reset NFCC");
- nfc_enabled(status, NULL);
+ if(!core_reset_init_num_buff)
+ {
+ NFC_TRACE_ERROR0 ("Failed to reset NFCC");
+ nfc_enabled (status, NULL);
+ }
}
}