summaryrefslogtreecommitdiffstats
path: root/halimpl
Commit message (Collapse)AuthorAgeFilesLines
* nfc: Deprecate register keywordHEADlineage-17.1lineage-17.0Alessandro Astone2019-09-081-3/+3
| | | | | | | * C++17 deprecates the register keyword Let the compiler decide where the variables will live Change-Id: I7ac7aee12105b6697c7d4f3aceb4e3bc8b6df367
* nfc: inform compilers of deliberate fallthroughAlessandro Astone2019-09-081-1/+1
| | | | Change-Id: Ibd2555da5ae7a71da42ce4d54ea9158f490b002c
* Move include files into halimpl folderlineage-16.0Arne Coucheron2018-09-2317-0/+6843
| | | | Change-Id: I975517a3b8b8db39046fe1adab7b07e0dcd0832e
* Change config name for PieArne Coucheron2018-09-231-2/+2
| | | | Change-Id: Ic859adc00744f3b56f93bc60db9de3d191b49acc
* Move CrcChecksum to bcm2079x HALMichael Bestas2018-09-232-0/+172
| | | | Change-Id: Ia09b37492847a3d853198707f9006bc17311be5f
* Remove nfca_version.hHiroki Yamamoto2018-09-231-3/+0
| | | | | | | Test: compile Bug: 76393999 Change-Id: Ic3a34e7028f9e6b01e4230c203c6b9bb0bbdeb65 (cherry picked from commit 4ef0bb964d27066fcb26e7602d6007a1d20dc862)
* Remove all files not related to bcm2079x NFC HALMichael Bestas2018-09-2357-21545/+0
| | | | | | * Initial pass of cleanup Change-Id: I441257389c89fc488889594e80a8fa8a96205f9c
* bcm2079x: Hardcode nci_ctrl_size to the Nougat valueDániel Járai2018-03-251-1/+1
| | | | | | | | | | | | | | | | | | * A race condition was dicovered wherein the value of the pointer 'p' is not given the value 255 (as per the NFC specification) by the time the code is ran. * To mitigate this, the value is hardcoded to 255, thus matching the value used for Broadcom NFC back in Nougat. * In explanation of the value being converted to a pointer, it looks like they were preparing to have future chips store different values. Although as upstream dropped Broadcom NFC support, said work will never take place. Change-Id: I78f3fab7587c9003ed6922eac807de7f1c7c84c5 Signed-off-by: D. Andrei Măceș <andrei@unlegacy-android.org> Signed-off-by: Nolen Johnson <johnsonnolen@gmail.com>
* bcm2079x: fix chip id format stringsDaniel Jarai2018-03-021-3/+3
| | | | | | Fixes loading chip specific configuration files. Change-Id: I094b8281503e843dab1ed447b0187ad77fa7415f
* bcm2079x: fix crash in userial_close_thread()Daniel Jarai2018-02-271-5/+13
| | | | | | | | | | On Oreo, calling pthread_join() on an exited thread results in a crash. Fix this by only calling pthread_join() if the thread didn't exit yet, with the help of a C11 atomic bool. Eliminates a frequent crash happening while turning off NFC. Change-Id: Ief322eb9907fa2dbb1893915830d5c5bc69d4f03
* bcm2079x: Add checks to prevent NULL pointer deference in gki_init_free_queue()Ruchi Kandoi2018-02-271-2/+3
| | | | | | | Bug: 36172044 Test: Boot coverage build Change-Id: Iea84249868fe1b27af4c9d3086dc383563bc2ba8 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* bcm2079x: Exit gracefully if there was an error in GKI_wait()Ruchi Kandoi2018-02-273-8/+8
| | | | | | | Bug: 37566767 Test: manual Change-Id: Id7922d9e257b9bd0ce0d970fdc9f7d6a0c4561d5 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* bcm2079x: Replace pthread_exit with return to avoid memory leakRuchi Kandoi2018-02-271-4/+2
| | | | | | | Test: Android Malloc Debug and dumpsys meminfo Bug: 35680718 Change-Id: I7cea8141da7c11a054970044749b5c7b39448a3b Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* bcm2079x: Log all thread exitsAndre Eisenbach2018-02-271-3/+5
| | | | | | Bug: 35710290 Test: manual Change-Id: Iad35d8bc05a45adeeda81624bf434d456ffd8279
* Fix misc-macro-parentheses warnings in system/nfc.Chih-Hung Hsieh2018-02-141-3/+3
| | | | | | | | Bug: 28705665 Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \ WITH_TIDY_FLAGS=-header-filter=system/nfc/.* Change-Id: I96c51baad1d2fc8ede2d19aba557cad76ed9d9df
* nfc: Set nq1xx chips to pn547 and nq2xx to pn548Rashed Abdel-Tawab2017-12-051-2/+2
| | | | Change-Id: I5c75549a6975879f397b596941fa5f0cde0500e2
* nfc: set NXP_CHIP_TYPE based on BOARD_NFC_CHIPSETHendrik Hagendorn2017-12-051-0/+11
| | | | Change-Id: Idad4c3b31dfc9095b70920bec9e4d3828398c39f
* pn54x: Allow modifing hal suffixLuca Stefani2017-12-051-2/+8
| | | | Change-Id: I962bddee6cefb62cbf97b4071835e629100dfd08
* Use checksum to determine if config has been modifiedAndre Eisenbach2017-11-023-136/+206
| | | | | | | | | | | | | | | Using a timestamp is not reliable as some partitions on Android reset the modification timestamp in certain partitions on all files. This leads to the NFC chip configuration not being loaded in some instances, even so it has been modified. This patch switches the file modification check from a timestamp to calculate a simple CRC32 checksum instead. Bug: 67959484 Test: manual; Verify configuration is loaded when modified Change-Id: I57723dd5d2e10813806f492551d7ed502124a295 (cherry picked from commit 814446d7da4ebb3f3387d8d2b20cf14acdaf1e56)
* Revert "isNxpConfigModified() is only used for debug purpose, removing it."Ruchi Kandoi2017-09-121-2/+3
| | | | | | | | | | | | This reverts commit 80b1177ac7782c2870d16a32795761d89b4884f2. NXP_CORE_CONF_EXTN should be updated even if there isn't a firmware upgrade. Bug: 65582747 Test: Modify libnfc-nxp.conf Change-Id: If0b96b08dbbbb1fa1c5e1df1b9b920e0003a8bfa (cherry picked from commit 210fc92332b13067c0a2c4bc234167eeab6f2e85)
* Correct parsing Kovio Tag detect notificationJizhou Liao2017-09-084-293/+2
| | | | | | | | | With this fix, HAL Kovio workaround is also removed. Bug: 64778003 Test: Compiles Change-Id: I87d834780d363e897ecbec617106b1d170aa0760 (cherry picked from commit afe16e2ebc6934431abf7493c96f2ce15f935c66)
* Fix NXP_CHIP_TYPE and compile errorsRuchi Kandoi2017-08-012-4/+1
| | | | | | | | | | NXP_CHIP_TYPE should be set in the device.mk for respective device and not hard-coded. Fix compile time errors for the same. Bug: 64264750 Test: HCE-F Emulator/Reader CTS tests Change-Id: I6dc55d319784be0bc2b54d4801ac1f1695ebbe7e (cherry picked from commit 79d3baa4e140dc82e19aafa63e6e432e189bc837)
* Make firmware version on the chip as error logsRuchi Kandoi2017-07-272-8/+8
|\ | | | | | | | | | | am: 3a53eb7ecc Change-Id: I793750fa13db5ad1e8268d467b11773ed9be618c
| * Make firmware version on the chip as error logsRuchi Kandoi2017-07-272-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logcat should have the following info: NxpFwDnld: FW Image Length - ImageInfoLen <> NxpFwDnld: FW Image Info Pointer - pImageInfo <> NxpFwDnld: FW Major Version Num - <> NxpFwDnld: FW Minor Version Num - <> NxpFwDnld: FW Image Length - <> NxpHal : FW version for FW file = <> NxpHal : FW version from device = <> Test: check logcat Bug: 64098000 Change-Id: I575f3e51c6a148c7377c38be2ac2888662451aaf
* | Fix NFC stack crash when firmware download failedJizhou Liao2017-07-211-15/+18
|\| | | | | | | | | | | am: a3c7a1f452 Change-Id: I115a7731d0b14f074686e04f19050ead66724928
| * Fix NFC stack crash when firmware download failedJizhou Liao2017-07-201-15/+18
| | | | | | | | | | | | | | | | | | | | This is a freed memory issue. The buffer to read response from NFCC which has linked to firmware task has been already freed. Test: Compiles Bug: 63679165 Change-Id: I5f68228c3eb41d3369af0c107c9e3b4003b91368 (cherry picked from commit 08e4a9a16b6cb585a455309fc5d025fdd9af2ed2)
* | Build nfc_nci.bcm2079x.default with VNDK. am: e0e5b011e0 am: d13d64e230Tri Vo2017-07-123-0/+3
|\ \ | | | | | | | | | | | | | | | am: 1aa47b1b8c Change-Id: Id5e0ceb315d4eebe5a89b703f5b22966422ee391
| * | Build nfc_nci.bcm2079x.default with VNDK.Tri Vo2017-07-123-0/+3
| | | | | | | | | | | | | | | | | | Bug: 37342627 Test: cd system/nfc && BOARD_VNDK_VERSION=current mma -j64 -k Change-Id: Ie50d7c4c86514059d281459ad54314c41882a22e
| * | IWYU + remove unneeded dependencies.Steven Moreland2017-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Dependency on libbase + libutils not required. Test: links Bug: 33241851 Merged-In: I0b1b91fea9a60e732e6610d6ff2975984e7508ac Change-Id: I0b1b91fea9a60e732e6610d6ff2975984e7508ac
* | | halimpl: Removed hardcoaded routing table.Love Khanna2017-07-121-20/+1
|\ \ \ | | |/ | |/| | | | | | | | | | am: fd831a5211 Change-Id: Ibfaa438c9e89a78d55363ed07a5d5b1be0613efb
| * | halimpl: Removed hardcoaded routing table.Love Khanna2017-07-121-20/+1
| | | | | | | | | | | | | | | | | | | | | Test: Routing table updated with tech routing. Change-Id: If0b8338a9326fd398d5ece794abcf1d0f4794203 (cherry picked from commit 2d49ad628806b125739368aac403f90f3a8ad931)
| * | Allow FW DNLD for PN553/PN81A, when NFCC is notLove Khanna2017-07-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | responding in NCI mode. Bug: 63146248 Test: compiles Change-Id: I314763b1fa3bcfea48d3631cf0c486397971a9e7 (cherry picked from commit 39a61a54f8f4fdf6f719bbbf490a8e1f04c9a1f4)
| * | halimpl: NCI2.0 config params added to the configuration file.Love Khanna2017-07-062-9/+19
| | | | | | | | | | | | | | | | | | | | | Bug: 63146248 Test: Compiles Change-Id: I6eb698c5482bdcdbb1c79c5127999cb615e7f447 (cherry picked from commit 8e7351be7287c5ea0d760f62511d0299ee67fb65)
| * | halimpl: Remove ISO15693 workaround for NCI2.0Love Khanna2017-07-061-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 63146248 Test: compiles. Change-Id: I8aa95408588cb3a41acf83ed1853e7a513b6f48b (cherry picked from commit f4b940105821e44bfca47164e11429249eab9864)
| * | halimpl: PN81A FW download supportLove Khanna2017-07-063-32/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PN553/PN81A chip specific changes added for FW download and clk source change. Bug: 63146248 Test: FW DNLD for FW v 11.2.x Change-Id: I8a63bbeda0ec3e1d37db8564edd216a50993f9db (cherry picked from commit 7202e66fd2d463c75feca95d26d75d3cf71a4d92)
| * | halimpl: NCI 2.0 init support added.Love Khanna2017-07-068-44/+1549
| | | | | | | | | | | | | | | | | | | | | Bug: 63146248 Test: manual; NCI2.0 init works; Switching b/w NCI1.0 and NCI2.0 works. Change-Id: I13a50b216aa6f3287e31a00eb910e88915582c73 (cherry picked from commit 6c57a73e2934df21a36b43db696a4812dab42ec9)
| * | Increase write error retry delay from 1ms to 10msRuchi Kandoi2017-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to prevent timeouts when the NFC controller is is in standby. 10ms should give it sufficient time to resume. Bug: 63343132 Test: manual Change-Id: I108216a1bc983ff8a944ba22c45dc134b34897a5 (cherry picked from commit d40635b33f889471b7b3951a7f3e7f2a70343f6e)
| * | Add delay before retrying write to NFCCRuchi Kandoi2017-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFC controller might throw a write error if it's in stand by mode. Add 10 ms delay before retrying to make sure the NFCC has resumed. Bug: 62068060 Test: Nfc tag reading Change-Id: I26d810cbb657cbf38d3df8ad366ff23d9ace594d (cherry picked from commit 71794bd233b9c284451c2a6e12f20aed8aa2b03b)
* | | Merge "Fix pointer sign conversion warnings in bcm2079x halimpl."George Burgess IV2017-07-072-3/+3
|\ \ \ | | |/ | |/| | | | | | | | | | am: eabe61ea9c Change-Id: I86260da8958fc3cf002cdc286cb5c367d708915b
| * | Merge "Fix pointer sign conversion warnings in bcm2079x halimpl."Treehugger Robot2017-07-072-3/+3
| |\ \
| | * | Fix pointer sign conversion warnings in bcm2079x halimpl.George Burgess IV2017-07-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two warnings like: system/nfc/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c:895:12: warning: returning 'int8_t *' (aka 'signed char *') from a function with result type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign All of the other similar-looking pieces of code return an `int8_t *`, and gki_cb.com.OSTName[N] is an `int8_t *`. Given that it looks like this is only used in one place (a debugging printf), changing the return type doesn't seem problematic. Bug: None Test: mma. No more warning. Change-Id: Icbad3e3a90f68957775de162740a958cc6ccc6d5
* | | | Fix signed/unsigned comparison warning in bcm2079x halimplGeorge Burgess IV2017-07-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | am: d2c6be9daf Change-Id: I9ab1d657470530d04a3c1aa0b5865d7574cedfac
| * | | Fix signed/unsigned comparison warning in bcm2079x halimplGeorge Burgess IV2017-07-071-1/+1
| |/ / | | | | | | | | | | | | Test: Compile; Warning no longer appears. Change-Id: I7ddac2d88bba2e33d22a169598a5c76933ac8874
* | | Increase write error retry delay from 1ms to 10msRuchi Kandoi2017-07-061-2/+2
|\| | | | | | | | | | | | | | | | | am: c8b9c065b2 Change-Id: Ifd599ced43305099075d47044cad5d0835eb959f
| * | Increase write error retry delay from 1ms to 10msRuchi Kandoi2017-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is to prevent timeouts when the NFC controller is is in standby. 10ms should give it sufficient time to resume. Bug: 63343132 Test: manual Change-Id: I108216a1bc983ff8a944ba22c45dc134b34897a5
* | | Build nfc_nci.* with BOARD_VNDK_VERSIONJiyong Park2017-07-052-1/+2
|\| | | | | | | | | | | | | | | | | am: d897d6db79 Change-Id: I03302fc7799a547c9799255323a3500f0cf4239b
| * | Build nfc_nci.* with BOARD_VNDK_VERSIONJiyong Park2017-07-032-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly included stdio.h as global include path is not provided when building with BOARD_VNDK_VERSION. Furthermore, cutils/log.h is changed to log/log.h as the former has been deprecated. Bug: 37342627 Test: BOARD_VNDK_VERSION=current m -j nfc_nci.<target> where <target> is the name of a device Change-Id: I953c0606032efafc5f020ba8d4eafd2637b64948
* | | Merge "Add delay before retrying write to NFCC"Ruchi Kandoi2017-06-291-0/+2
|\| | | | | | | | | | | | | | | | | am: bdb53f8487 Change-Id: Ifc80b1d046cebbea5887311294b10a4ef906b643
| * | Merge "Add delay before retrying write to NFCC"Treehugger Robot2017-06-291-0/+2
| |\ \
| | * | Add delay before retrying write to NFCCRuchi Kandoi2017-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFC controller might throw a write error if it's in stand by mode. Add 10 ms delay before retrying to make sure the NFCC has resumed. Bug: 62068060 Test: Nfc tag reading Change-Id: I26d810cbb657cbf38d3df8ad366ff23d9ace594d