]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFC: nci: Fix improper management of HCI return code
authorChristophe Ricard <christophe.ricard@gmail.com>
Sun, 25 Oct 2015 21:54:21 +0000 (22:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:15 +0000 (14:31 -0500)
commit58a531a3b13a8501660377b33f82c34c4e18c3e7
tree4050a4c47dec5f47604dffbfeb6c1624f60ea591
parent12cd7a677da483ee9d7e0d97b8fd608753e9a281
NFC: nci: Fix improper management of HCI return code

commit d8cd37ed2fc871c66b4c79c59f651dc2cdf7091c upstream.

When sending HCI data over NCI, HCI return code is part
of the NCI data. In order to get correctly the HCI return
code, we assume the NCI communication is successful and
extract the return code for the nci_hci functions return code.

This is done because nci_to_errno does not match hci return
code value.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/nfc/nci/hci.c