summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-23Fix native crash in nfc_ncif_proc_activateandroid-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-7.1.1_r23nougat-mr1-releasenougat-mr1-cts-releasefang.x.chen
The destination of memcpy is allocated with a predetermined maximum length, but in some cases the length of information being copied is greater than the maximum length of the destination. This is the root cause of crash. Add length check before memcpy to avoid memory overflow Test: Repeat reading and writing tag Bug: 33434992 Bug: 32688507 Change-Id: I09ee3c734e9be38a35b1d48679d74e42e0432d78 (cherry picked from commit 09cb3b3dc46c8bab51346a4163b130857d806418)
2016-07-20Fix the syncronization issue between read thread and write threadandroid-cts_7.1_r1android-cts-7.1_r3android-cts-7.1_r2android-cts-7.1_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r6android-7.1.1_r4android-7.1.1_r3android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1nougat-mr1.2-releasenougat-mr1-devJizhou Liao
NFC stack hang if Read Interrupt is notified even before the write callback is notified. Add 2ms delay to give priority to write thread if it is busy. Bug: 30240780 Change-Id: I732fd3c5412276d12f84103562997182b0e77aa1
2016-07-20Fix ISO15693 crash with >= 255 bytes NDef message.Jizhou Liao
There is a null pointer crash if the data of block doesn't contain any NDef message data. Bug: 30240338 Change-Id: Iff54f11b76317bac21f148bf9298ae8c3201093a
2016-07-12Bump AOSP stack version to N.Martijn Coenen
Bug: 29112855 Change-Id: Ib52057dc5528513982e236c641cd7a68a8450edb
2016-06-24Fix warnings in HAL.Jizhou Liao
Fix warnings in HAL. Change-Id: I65367c9d9d90b8cf0897880b01d4930f1a836294
2016-06-15Retry system calls on EINTR.Martijn Coenen
am: 923afa2d76 Change-Id: I7c29c8e577093a36bcb5c1c894514d364fd05e3f
2016-06-14Retry system calls on EINTR.android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1nougat-releasenougat-devnougat-cts-releasenougat-bugfix-releaseMartijn Coenen
Bug: 28792238 Change-Id: Iaeb03a5be6d04cbc8dcf838ed7a0489d790e0028
2016-06-13Retry system calls on EINTR.Martijn Coenen
Bug: 28792238 Change-Id: Iaeb03a5be6d04cbc8dcf838ed7a0489d790e0028
2016-05-12Free memory in case of error responseJizhou Liao
am: 5340dae86f * commit '5340dae86f4e2bb697cccd0f586501b52a784db5': Free memory in case of error response Change-Id: I19503a2d67ae3b5576705d82bb54d21e1f12b5e1
2016-05-11Free memory in case of error responseJizhou Liao
In case of NFC_DATA_CEVT with error response, p_data is allocated as p_msg from nfc_main_hal_data_cback(), here to free this buffer to avoid memory leak. Bug: 28181917 Change-Id: I74bbb5c2f7956eb246b38c25a1e8c56922ee56ab
2016-04-27Support NXP PN551 NFC controllerJizhou Liao
The changes to support PN551 controller: - New firmware download sequence - New build option&configuration file - Remove all warnings - Bug fix Change-Id: I49c0a26a116c1c513968fc58d2736ee71eb05a22
2016-04-27Configure nfc device node through .conf fileJizhou Liao
NXP_NFC_DEV_NODE is used to specify nfc device node name in libnfc-nxp.conf. Change-Id: Ibb95248723aa56597cb092da97ac6d4a1b925a6a
2016-04-26Abort NFC initialization if chip type doesn't match to HAL implemetation.Jizhou Liao
Compare firmware versions on chip and HAL implemetation, if mismatch, abort nfc initialization. Change-Id: If9bdf3d38750131ac18175d791f176288b8bcec2
2016-04-25Update customized settings to eeprom after firmware downloadJizhou Liao
am: b1b86f9 * commit 'b1b86f94acdddb55f0f13bc959ddfa9289f4cf2e': Update customized settings to eeprom after firmware download Change-Id: Ife896fda54716f1bec80dd204f4e0ee3c0ee33e7
2016-04-25Update customized settings to eeprom after firmware downloadJizhou Liao
The customized RF, clock settings have to be updated to eeprom after firmware download Bug: 28181917 Change-Id: I5261590206b0cc15587fc8c6ea240b97b91da429
2016-02-22Swap LF_T3T_FLAGS bytes for PN548Jizhou Liao
PN548 firmware implements LF_T3T_FLAGS in big endian. As NCI spec required, it should present as little endian. This patch is a workaround to swap LF_T3T_FLAGS byte from little endian to big endian. Bug: 22379408
2016-02-04Merge "Set RC=1 when only polling for T3T." am: 68f7145da1Martijn Coenen
am: 3f75b3a6c9 * commit '3f75b3a6c9789c329139a4f2c76e4c729215217c': Set RC=1 when only polling for T3T.
2016-02-04Merge "Set RC=1 when only polling for T3T."Martijn Coenen
am: 68f7145da1 * commit '68f7145da1fafd91cd5500f219008a1921f54a01': Set RC=1 when only polling for T3T.
2016-02-04Merge "Set RC=1 when only polling for T3T."Martijn Coenen
2016-02-03Set RC=1 when only polling for T3T.Martijn Coenen
According to the NFC Forum Activity spec, controllers must: 1) Poll with RC=0 and SC=FFFF to find NFC-DEP targets 2) Poll with RC=1 and SC=FFFF to find T3T targets Many controllers don't do this yet, and seem to be activating NFC-DEP by default. We can at least fix the scenario where we're not interested in NFC-DEP, by setting RC=1 in that case. Otherwise, keep the default of RC=0. Change-Id: Icc27950c38bf0b0a10fc1325e85e4a526557b641
2016-01-22Merge "libnfc-nci: silence some uninteresting warnings." am: 25fcb25880Elliott Hughes
am: 393c91f7f6 * commit '393c91f7f6effc7c84d0635918cf872df6fa718b': libnfc-nci: silence some uninteresting warnings.
2016-01-22Merge "libnfc-nci: silence some uninteresting warnings."Elliott Hughes
am: 25fcb25880 * commit '25fcb2588094bc08b9b4a96eb0e2442bcf782ad7': libnfc-nci: silence some uninteresting warnings.
2016-01-22Merge "libnfc-nci: silence some uninteresting warnings."Elliott Hughes
2016-01-21libnfc-nci: silence some uninteresting warnings.Elliott Hughes
Change-Id: I24c65e8d5fbe80e23d3469a55efe4469c251530c
2016-01-08Merge "Implementation of HCE for NFC-F." am: ae2dabbe32Martijn Coenen
am: 53494e7730 * commit '53494e77309c2ebe58cf8b6347e51ed5494617b3': Implementation of HCE for NFC-F.
2016-01-08Merge "Implementation of HCE for NFC-F."Martijn Coenen
am: ae2dabbe32 * commit 'ae2dabbe3237514bf7398333026840d36f458505': Implementation of HCE for NFC-F.
2016-01-08Merge "Implementation of HCE for NFC-F."Martijn Coenen
2015-11-25Merge "Fix rf discover notification type." am: 7d7160dda3 am: dc0e6b6249Martijn Coenen
am: ca3f49d6e0 * commit 'ca3f49d6e019def467d61fe1996574f4c08f5573': Fix rf discover notification type.
2015-11-25Merge "Fix rf discover notification type." am: 7d7160dda3Martijn Coenen
am: dc0e6b6249 * commit 'dc0e6b62493b650bed4a26f55a61f50bebf7121c': Fix rf discover notification type.
2015-11-25Merge "Fix rf discover notification type."Martijn Coenen
am: 7d7160dda3 * commit '7d7160dda3b206c4135a0bff1299d2f8d7bfe5ed': Fix rf discover notification type.
2015-11-25Merge "Fix rf discover notification type."Martijn Coenen
2015-11-24Fix rf discover notification type.Martijn Coenen
Should be a UINT8; fix the JNI instead. Change-Id: I0d4fda2015ac0cb9aa517ce01608181a8d59fa84
2015-11-05Don\'t free memory that shouldn\'t be freed. am: 633b73f890 am: 53b8f70e4bMartijn Coenen
am: 5a920b2da9 * commit '5a920b2da9c8a53a6c79567f767af61b8463555e': Don't free memory that shouldn't be freed.
2015-11-05Don\'t free memory that shouldn\'t be freed. am: 633b73f890Martijn Coenen
am: 53b8f70e4b * commit '53b8f70e4bb222b85f904f26cc04076242e9244c': Don't free memory that shouldn't be freed.
2015-11-05Don\'t free memory that shouldn\'t be freed.android-6.0.1_r68android-6.0.1_r67android-6.0.1_r62android-6.0.1_r54android-6.0.1_r53android-6.0.1_r45android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21marshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-devMartijn Coenen
am: 633b73f890 * commit '633b73f8909c8bc52868848399d61fa3b8df3e72': Don't free memory that shouldn't be freed.
2015-11-05Merge "Don\'t free memory that shouldn\'t be freed." am: c4ea0a696e am: ↵Martijn Coenen
30af63ccfe am: 5656a6b488 * commit '5656a6b488ae84bbd80f13f8ff1007134c328f50': Don't free memory that shouldn't be freed.
2015-11-05Merge "Don\'t free memory that shouldn\'t be freed." am: c4ea0a696eMartijn Coenen
am: 30af63ccfe * commit '30af63ccfe160852e82e71f253b7c14986eb8fd5': Don't free memory that shouldn't be freed.
2015-11-05Merge "Don\'t free memory that shouldn\'t be freed."Martijn Coenen
am: c4ea0a696e * commit 'c4ea0a696e0d09c1f69d629e1aa5d49de63d7b1e': Don't free memory that shouldn't be freed.
2015-11-05Merge "Don't free memory that shouldn't be freed."Martijn Coenen
2015-11-05Don't free memory that shouldn't be freed.Martijn Coenen
In case of NFC_ERROR_CEVT, p_data is just a pointer to an uint8_t, and doesn't contain data that needs to be freed. Note that there's a fall-through from NFC_DATA_CEVT above which warrants further investigation, but for now this is the safe fix. Bug: 25489121 Change-Id: Ibab5b42ca9defca04b2310c8d9a441c89f0f722d
2015-11-05Don't free memory that shouldn't be freed.android-6.0.1_r63android-6.0.1_r55android-6.0.1_r5android-6.0.1_r4android-6.0.1_r33android-6.0.1_r32android-6.0.1_r31android-6.0.1_r18android-6.0.1_r16marshmallow-dr-dragon-releaseMartijn Coenen
In case of NFC_ERROR_CEVT, p_data is just a pointer to an uint8_t, and doesn't contain data that needs to be freed. Note that there's a fall-through from NFC_DATA_CEVT above which warrants further investigation, but for now this is the safe fix. Bug: 25489121 Change-Id: Ibab5b42ca9defca04b2310c8d9a441c89f0f722d
2015-11-03Merge commit \'02de621133c35cbdb7012866d11cf10627540074\' into HEAD am: ↵Bill Yi
59f2e9f65e am: fbb5677882 * commit 'fbb56778822183f46d024ef2c4d46634bff4dab8':
2015-11-03Merge commit \'02de621133c35cbdb7012866d11cf10627540074\' into HEADBill Yi
am: 59f2e9f65e * commit '59f2e9f65e2549c1fecb2629e821160b5ea934f6':
2015-11-03Merge commit '02de621133c35cbdb7012866d11cf10627540074' into HEADBill Yi
2015-11-03Merge "add PN54x chip selection" am: 8c3bbf44cb am: f644e0182eMartijn Coenen
am: 761cf10d8a * commit '761cf10d8ad8aaa793d5d88de8e7f70de8bffbfa': add PN54x chip selection
2015-11-03Merge "add PN54x chip selection" am: 8c3bbf44cbMartijn Coenen
am: f644e0182e * commit 'f644e0182e68dd9488594e729408a71dad330f72': add PN54x chip selection
2015-11-03Merge "add PN54x chip selection"Martijn Coenen
am: 8c3bbf44cb * commit '8c3bbf44cbb767b12d79e7402dc8178bd5db07c7': add PN54x chip selection
2015-11-03Merge "add PN54x chip selection"Martijn Coenen
2015-11-02Merge "Fix 256-bit Thinfilm NFC barcode." am: ce926cf46d am: dacb0c215dMartijn Coenen
am: 12807b8e5a * commit '12807b8e5a1bb435eae58489ec2bdc7ff58ad6f5': Fix 256-bit Thinfilm NFC barcode.
2015-11-02Merge "Fix 256-bit Thinfilm NFC barcode." am: ce926cf46dMartijn Coenen
am: dacb0c215d * commit 'dacb0c215d2423f460ca9e8e716ca3c7328192e0': Fix 256-bit Thinfilm NFC barcode.