summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-06-19 17:51:24 +0100
committerSteve Kondik <steve@cyngn.com>2015-11-05 17:53:40 -0800
commit1409df9d90ea66c26aa9e4ab5384b9f1b707260b (patch)
treef0b462e882507dd08a433345db6f3130a2b5d112
parente5d6c7639cd15f57f146f33303c319e095c729a7 (diff)
downloadandroid_external_libnfc-nci-1409df9d90ea66c26aa9e4ab5384b9f1b707260b.tar.gz
android_external_libnfc-nci-1409df9d90ea66c26aa9e4ab5384b9f1b707260b.tar.bz2
android_external_libnfc-nci-1409df9d90ea66c26aa9e4ab5384b9f1b707260b.zip
pn547: Don't attempt to downgrade firmware
As we just found, this makes things go boom in bad ways Change-Id: I381fcf77bea920b43f202e407ff0dd9626552bf9
-rw-r--r--halimpl/pn54x/hal/phNxpNciHal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/halimpl/pn54x/hal/phNxpNciHal.c b/halimpl/pn54x/hal/phNxpNciHal.c
index cc58003..3a11cdc 100644
--- a/halimpl/pn54x/hal/phNxpNciHal.c
+++ b/halimpl/pn54x/hal/phNxpNciHal.c
@@ -565,6 +565,11 @@ init_retry:
NXPLOG_NCIHAL_D ("FW uptodate not required");
phDnldNfc_ReSetHwDevHandle();
}
+ else if (wFwVer != 0 && (wFwVerRsp & 0x0000FFFF) > wFwVer)
+ {
+ NXPLOG_NCIHAL_D ("FW image older than device's, skip update");
+ phDnldNfc_ReSetHwDevHandle();
+ }
else
{
force_download: