summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/nci
Commit message (Collapse)AuthorAgeFilesLines
* selftests: nci: replace unsigned int with intXiang wangx2021-09-161-1/+1
| | | | | | | Should not use comparison of unsigned expressions < 0. Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Add the NCI testcase reading T4T TagBongsu Jeon2021-08-181-5/+287
| | | | | | | | Add the NCI testcase reading T4T Tag that has NFC TEST in plain text. the virtual device application acts as T4T Tag in this testcase. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Extract the start/stop discovery functionBongsu Jeon2021-08-181-15/+38
| | | | | | | To reuse the start/stop discovery code in other testcase, extract the code. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Add the flags parameter for the send_cmd_mt_nlaBongsu Jeon2021-08-181-8/+8
| | | | | | | | To reuse the send_cmd_mt_nla for NLM_F_REQUEST and NLM_F_DUMP flag, add the flags parameter to the function. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Fix the wrong conditionBongsu Jeon2021-08-181-1/+1
| | | | | | | memcpy should be executed only in case nla_len's value is greater than 0. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Fix the code for next nlattr offsetBongsu Jeon2021-08-181-2/+2
| | | | | | | | nlattr could have a padding for 4 bytes alignment. So next nla's offset should be calculated with a padding. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Fix the typoBongsu Jeon2021-08-181-12/+12
| | | | | | | Fix typo: rep_len -> resp_len Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: nci: Remove the polling code to read a NCI frameBongsu Jeon2021-08-181-22/+11
| | | | | | | | | Because the virtual NCI device uses Wait Queue, the virtual device application doesn't need to poll the NCI frame. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: Add .gitignore for nci test suiteDavid Matlack2021-05-201-0/+1
| | | | | | | | Building the nci test suite produces a binary, nci_dev, that git then tries to track. Add a .gitignore file to tell git to ignore this binary. Signed-off-by: David Matlack <dmatlack@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: Add nci suiteBongsu Jeon2021-01-293-0/+608
This is the NCI test suite. It tests the NFC/NCI module using virtual NCI device. Test cases consist of making the virtual NCI device on/off and controlling the device's polling for NCI1.0 and NCI2.0 version. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>