summaryrefslogtreecommitdiff
path: root/net/nfc/nci/hci.c
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-10-26 00:54:24 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-26 08:53:13 +0300
commit8a49943f5bc5ff4f835d50451ecf2380eab44d2e (patch)
tree6cfe300aaae966e7cf5f50c569c78814ae697030 /net/nfc/nci/hci.c
parentfa6fbadea5d3618339fae8f9d5136a470bad4fa7 (diff)
downloadlinux-8a49943f5bc5ff4f835d50451ecf2380eab44d2e.tar.xz
NFC: nci: Call nci_hci_clear_all_pipes at HCI initial activation.
When session_id is filled to 0xff, the pipe configuration is probably incorrect and needs to be cleared. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/nci/hci.c')
-rw-r--r--net/nfc/nci/hci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index 6f477d21adfd..af401fff72d9 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -706,6 +706,10 @@ int nci_hci_dev_session_init(struct nci_dev *ndev)
/* Restore gate<->pipe table from some proprietary location. */
r = ndev->ops->hci_load_session(ndev);
} else {
+ r = nci_hci_clear_all_pipes(ndev);
+ if (r < 0)
+ goto exit;
+
r = nci_hci_dev_connect_gates(ndev,
ndev->hci_dev->init_data.gate_count,
ndev->hci_dev->init_data.gates);