summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2011-06-24 17:54:56 -0700
committerNick Pelly <npelly@google.com>2011-06-27 09:41:59 -0700
commit8d4d6a13c4c3bf4e966d12297cc9a9f6cf9d42a8 (patch)
tree1e4efeefb888534f8b33964235f6825e23ee39e5
parentfafed3cea5231f76bcebbe95b9d3b7c2ca69483d (diff)
downloadexternal_libnfc-nxp-8d4d6a13c4c3bf4e966d12297cc9a9f6cf9d42a8.zip
external_libnfc-nxp-8d4d6a13c4c3bf4e966d12297cc9a9f6cf9d42a8.tar.gz
external_libnfc-nxp-8d4d6a13c4c3bf4e966d12297cc9a9f6cf9d42a8.tar.bz2
Print warning if no FW file found.
Change-Id: Id1ab6a1176fe4e7c559e2348261d0902bdffb03c
-rw-r--r--src/phHal4Nfc.c6
-rw-r--r--src/phLibNfc.c3
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 <utils/Log.h>
#include <dlfcn.h>
+#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 <phLibNfc.h>
#include <phDal4Nfc.h>
#include <phHal4Nfc.h>
@@ -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,