diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2015-10-25 22:54:35 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-10-26 06:53:17 +0100 |
commit | ba723199d18eeb5021cd6ace4aaf90670d6b3133 (patch) | |
tree | 3fdb41be5d611b83389d9ed48fc0a5270daadc49 /drivers/nfc/st21nfca | |
parent | d3f13c558f2501d4bd0212030f692bc56fbcb755 (diff) | |
download | linux-ba723199d18eeb5021cd6ace4aaf90670d6b3133.tar.bz2 |
NFC: st21nfca: Fix st21nfca_gates offset
It is useless to start from index 0 when looking for a gate
because only dynamic pipes are retrieved with
ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/st21nfca')
-rw-r--r-- | drivers/nfc/st21nfca/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index b4451f83d000..814d8ff4ffa0 100644 --- a/drivers/nfc/st21nfca/core.c +++ b/drivers/nfc/st21nfca/core.c @@ -85,12 +85,13 @@ static DECLARE_BITMAP(dev_mask, ST21NFCA_NUM_DEVICES); static struct nfc_hci_gate st21nfca_gates[] = { {NFC_HCI_ADMIN_GATE, NFC_HCI_ADMIN_PIPE}, + {NFC_HCI_LINK_MGMT_GATE, NFC_HCI_LINK_MGMT_PIPE}, + {ST21NFCA_DEVICE_MGNT_GATE, ST21NFCA_DEVICE_MGNT_PIPE}, + {NFC_HCI_LOOPBACK_GATE, NFC_HCI_INVALID_PIPE}, {NFC_HCI_ID_MGMT_GATE, NFC_HCI_INVALID_PIPE}, - {NFC_HCI_LINK_MGMT_GATE, NFC_HCI_LINK_MGMT_PIPE}, {NFC_HCI_RF_READER_B_GATE, NFC_HCI_INVALID_PIPE}, {NFC_HCI_RF_READER_A_GATE, NFC_HCI_INVALID_PIPE}, - {ST21NFCA_DEVICE_MGNT_GATE, ST21NFCA_DEVICE_MGNT_PIPE}, {ST21NFCA_RF_READER_F_GATE, NFC_HCI_INVALID_PIPE}, {ST21NFCA_RF_READER_14443_3_A_GATE, NFC_HCI_INVALID_PIPE}, {ST21NFCA_RF_READER_ISO15693_GATE, NFC_HCI_INVALID_PIPE}, @@ -183,7 +184,7 @@ static int st21nfca_hci_load_session(struct nfc_hci_dev *hdev) continue; } - for (j = 0; (j < ARRAY_SIZE(st21nfca_gates)) && + for (j = 3; (j < ARRAY_SIZE(st21nfca_gates)) && (st21nfca_gates[j].gate != info->dst_gate_id) ; j++) ; |