summaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-10-26 00:54:29 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-26 08:53:15 +0300
commit6443ce97d2266b24f8315cb7e3ff99adf822a597 (patch)
tree1dd5274b19ead79b2143e7e0654ded4bae8b2a13 /drivers/nfc
parent9dfe29f1796f9d92db6e7d33a3fc8ed8e496912a (diff)
downloadlinux-6443ce97d2266b24f8315cb7e3ff99adf822a597.tar.xz
NFC: st21nfca: Open NFC_HCI_LINK_MGMT_PIPE
NFC_HCI_LINK_MGMT_PIPE was never opened in nfc_hci_load_session. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/core.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index 67d1c27a41ee..819a94af3964 100644
--- a/drivers/nfc/st21nfca/core.c
+++ b/drivers/nfc/st21nfca/core.c
@@ -203,22 +203,13 @@ static int st21nfca_hci_load_session(struct nfc_hci_dev *hdev)
}
/*
- * 3 gates have a well known pipe ID.
- * They will never appear in the pipe list
+ * 3 gates have a well known pipe ID. Only NFC_HCI_LINK_MGMT_GATE
+ * is not yet open at this stage.
*/
- if (skb_pipe_list->len + 3 < ARRAY_SIZE(st21nfca_gates)) {
- for (i = skb_pipe_list->len + 3;
- i < ARRAY_SIZE(st21nfca_gates) - 2; i++) {
- r = nfc_hci_connect_gate(hdev,
- NFC_HCI_HOST_CONTROLLER_ID,
- st21nfca_gates[i].gate,
- st21nfca_gates[i].pipe);
- if (r < 0)
- goto free_list;
- }
- }
+ r = nfc_hci_connect_gate(hdev, NFC_HCI_HOST_CONTROLLER_ID,
+ NFC_HCI_LINK_MGMT_GATE,
+ NFC_HCI_LINK_MGMT_PIPE);
-free_list:
kfree_skb(skb_pipe_list);
return r;
}