diff options
author | Eric Lapuyade <eric.lapuyade@linux.intel.com> | 2012-10-17 16:47:13 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-19 23:56:58 +0100 |
commit | 07887e92205c5808820de0be53bf326b4019d060 (patch) | |
tree | 68976461b293d8b77fc8efe4e40456b8903c8d20 /net/nfc | |
parent | ath9k: Fix BTCOEX debugfs file usage (diff) | |
download | linux-07887e92205c5808820de0be53bf326b4019d060.tar.xz linux-07887e92205c5808820de0be53bf326b4019d060.zip |
NFC: Fix hci_connect_gate() when a pre-opened pipe is passed
In some cases, pre-opened pipes don't stay open when a clear all pipes
command is sent. They stay created however. Therefore, one can never
assume that such a pipe is already open. As re-opening a pipe seems not
to be a problem, we do that now.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/hci/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/hci/command.c b/net/nfc/hci/command.c index 07659cfd6d7b..7d99410e6c1a 100644 --- a/net/nfc/hci/command.c +++ b/net/nfc/hci/command.c @@ -344,7 +344,7 @@ int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate, return -EADDRINUSE; if (pipe != NFC_HCI_INVALID_PIPE) - goto pipe_is_open; + goto open_pipe; switch (dest_gate) { case NFC_HCI_LINK_MGMT_GATE: @@ -361,6 +361,7 @@ int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate, break; } +open_pipe: r = nfc_hci_open_pipe(hdev, pipe); if (r < 0) { if (pipe_created) @@ -371,7 +372,6 @@ int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate, return r; } -pipe_is_open: hdev->gate2pipe[dest_gate] = pipe; return 0; |