From 8d4d6a13c4c3bf4e966d12297cc9a9f6cf9d42a8 Mon Sep 17 00:00:00 2001 From: Nick Pelly Date: Fri, 24 Jun 2011 17:54:56 -0700 Subject: Print warning if no FW file found. Change-Id: Id1ab6a1176fe4e7c559e2348261d0902bdffb03c --- src/phHal4Nfc.c | 6 ++++-- src/phLibNfc.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/phHal4Nfc.c b/src/phHal4Nfc.c index 399cb3e..e103525 100644 --- a/src/phHal4Nfc.c +++ b/src/phHal4Nfc.c @@ -302,15 +302,17 @@ phHal4Nfc_Configure_Layers( #include #include +#define FW_PATH "/system/vendor/firmware/libpn544_fw.so" + const unsigned char *nxp_nfc_full_version = NULL; const unsigned char *nxp_nfc_fw = NULL; int dlopen_firmware() { void *p; - void *handle = dlopen("/system/vendor/firmware/libpn544_fw.so", RTLD_NOW); + void *handle = dlopen(FW_PATH, RTLD_NOW); if (handle == NULL) { - LOGE("Could not open libpn544.so"); + LOGE("Could not open %s", FW_PATH); return -1; } diff --git a/src/phLibNfc.c b/src/phLibNfc.c index efd186c..1245960 100644 --- a/src/phLibNfc.c +++ b/src/phLibNfc.c @@ -31,6 +31,8 @@ ************************* Header Files **************************************** */ +#define LOG_TAG "NFC" + #include #include #include @@ -841,6 +843,7 @@ NFCSTATUS phLibNfc_Mgt_GetstackCapabilities( /* Check the firmware version */ if (nxp_nfc_full_version == NULL) { // Couldn't load firmware, just pretend we're up to date. + LOGW("Firmware image not available: this device might be running old NFC firmware!"); phLibNfc_StackCapabilities->psDevCapabilities.firmware_update_info = 0; } else { phLibNfc_StackCapabilities->psDevCapabilities.firmware_update_info = memcmp(phLibNfc_StackCapabilities->psDevCapabilities.full_version, nxp_nfc_full_version, -- cgit v1.1