OSDN Git Service

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)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 26 Oct 2015 05:53:12 +0000 (06:53 +0100)
commitd8cd37ed2fc871c66b4c79c59f651dc2cdf7091c
tree4fcc84a67e9cc2c259ecf6e3cf34f5ff67e49722
parent500c4ef02277eaadbfe20537f963b6221f6ac007
NFC: nci: Fix improper management of HCI return code

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.

Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/nci/hci.c