diff options
| author | anil.hiranniah <anil.hiranniah@nxp.com> | 2018-05-25 18:50:31 +0530 |
|---|---|---|
| committer | anil.hiranniah <anil.hiranniah@nxp.com> | 2018-05-25 18:50:31 +0530 |
| commit | 4ce359eec443343ba928b41dd69f894601cb09ee (patch) | |
| tree | 0d2d9e5624a2fc847e7c2a2df00204931696a602 /halimpl/hal | |
| parent | ffa47aecf04a2545aa640562fc4a4ab52f1d471c (diff) | |
| download | android_hardware_nxp_nfc-4ce359eec443343ba928b41dd69f894601cb09ee.tar.gz android_hardware_nxp_nfc-4ce359eec443343ba928b41dd69f894601cb09ee.tar.bz2 android_hardware_nxp_nfc-4ce359eec443343ba928b41dd69f894601cb09ee.zip | |
Enable CE-PhoneOff feature during NFC Enable
Commands to enable CE-PhoneOff can't be sent while
powering off phone, as, in case of force-shutdown, services
are killed abruptly. So commands to Enable/Disable
CE-PhoneOff feature are sent during NFC Enable/Disable.
Bug: 79954924
Test: NFC Enable/Disable, Test CE-eSE in Phone Off state.
Change-Id: I0489463d56c74ce8e4511fff011afb3bba91f0fc
Diffstat (limited to 'halimpl/hal')
| -rwxr-xr-x | halimpl/hal/phNxpNciHal.cc | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/halimpl/hal/phNxpNciHal.cc b/halimpl/hal/phNxpNciHal.cc index 27d38c1..8e09660 100755 --- a/halimpl/hal/phNxpNciHal.cc +++ b/halimpl/hal/phNxpNciHal.cc @@ -1173,8 +1173,8 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) { uint8_t swp_full_pwr_mode_on_cmd[] = {0x20, 0x02, 0x05, 0x01, 0xA0, 0xF1, 0x01, 0x01}; - static uint8_t cmd_ven_enable[] = {0x20, 0x02, 0x05, 0x01, - 0xA0, 0x07, 0x01, 0x01}; + static uint8_t cmd_ven_pulld_enable_nci[] = {0x20, 0x02, 0x05, 0x01, + 0xA0, 0x07, 0x01, 0x03}; static uint8_t android_l_aid_matching_mode_on_cmd[] = { 0x20, 0x02, 0x05, 0x01, 0xA0, 0x91, 0x01, 0x01}; @@ -1278,16 +1278,17 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) { } } - status = phNxpNciHal_send_ext_cmd(sizeof(cmd_ven_enable), cmd_ven_enable); - if (status != NFCSTATUS_SUCCESS) { - NXPLOG_NCIHAL_E("CMD_VEN_ENABLE: Failed"); - retry_core_init_cnt++; - goto retry_core_init; - } + status = phNxpNciHal_send_ext_cmd(sizeof(cmd_ven_pulld_enable_nci), + cmd_ven_pulld_enable_nci); + if (status != NFCSTATUS_SUCCESS) { + NXPLOG_NCIHAL_E("cmd_ven_pulld_enable_nci: Failed"); + retry_core_init_cnt++; + goto retry_core_init; + } - if (fw_download_success == 1) { - phNxpNciHal_hci_network_reset(); - } + if (fw_download_success == 1) { + phNxpNciHal_hci_network_reset(); + } // Check if firmware download success status = phNxpNciHal_get_mw_eeprom(); @@ -2071,39 +2072,6 @@ void phNxpNciHal_close_complete(NFCSTATUS status) { ******************************************************************************/ int phNxpNciHal_configDiscShutdown(void) { NFCSTATUS status; - /*NCI_RESET_CMD*/ - static uint8_t cmd_reset_nci[] = {0x20, 0x00, 0x01, 0x00}; - - static uint8_t cmd_disable_disc[] = {0x21, 0x06, 0x01, 0x00}; - - static uint8_t cmd_ce_disc_nci[] = {0x21, 0x03, 0x07, 0x03, 0x80, - 0x01, 0x81, 0x01, 0x82, 0x01}; - - static uint8_t cmd_ven_pulld_enable_nci[] = {0x20, 0x02, 0x05, 0x01, - 0xA0, 0x07, 0x01, 0x03}; - - CONCURRENCY_LOCK(); - - status = phNxpNciHal_send_ext_cmd(sizeof(cmd_disable_disc), cmd_disable_disc); - if (status != NFCSTATUS_SUCCESS) { - NXPLOG_NCIHAL_E("CMD_DISABLE_DISCOVERY: Failed"); - } - - status = phNxpNciHal_send_ext_cmd(sizeof(cmd_ven_pulld_enable_nci), cmd_ven_pulld_enable_nci); - if (status != NFCSTATUS_SUCCESS) { - NXPLOG_NCIHAL_E("CMD_VEN_PULLD_ENABLE_NCI: Failed"); - } - - status = phNxpNciHal_send_ext_cmd(sizeof(cmd_ce_disc_nci), cmd_ce_disc_nci); - if (status != NFCSTATUS_SUCCESS) { - NXPLOG_NCIHAL_E("CMD_CE_DISC_NCI: Failed"); - } - - status = phNxpNciHal_send_ext_cmd(sizeof(cmd_reset_nci), cmd_reset_nci); - if (status != NFCSTATUS_SUCCESS) { - NXPLOG_NCIHAL_E("NCI_CORE_RESET: Failed"); - } - CONCURRENCY_UNLOCK(); status = phNxpNciHal_close(true); if(status != NFCSTATUS_SUCCESS) { |
